config/sysinv/cgts-client/cgts-client/cgtsclient/v1
Angie Wang 28d069bccc Application update support
A new command "system application-update" is introduced in this
commit to support updating an applied application to a new version
with a new versioned app tarfile.

The application update leverages the existing application upload
workflow to first validating/uploading the new app tarfile, then
invokes Armada apply or rollback to deploy the charts for the new
versioned application. If the version has ever applied before,
Armada rollback will be performed, otherwise, Armada apply will be
performed.

After apply/rollback to the new version is done, the files for the
old application version will be cleaned up as well as the releases
which are not in the new application version. Once the update is
completed successfully, the status will be set to "applied" so that
user can continue applying app with user overrides.

If there has any failure during updating, application recover will be
triggered to recover the app to the old version. If application recover
fails, the application status will be populated to "apply-failed" so
that user can re-apply app.

In order to use Armada rollback, a new sysinv table "kube_app_releases"
is created to record deployed helm releases versions. After each app
apply, if any helm release version changed, the corresponding release
needs to be updated in sysinv db as well.

The application overrides have been changed to tie to a specific
application in commit https://review.opendev.org/#/c/660498/. Therefore,
the user overrides is preserved when updating.

Note: On the AIO-SX, always use Armada apply even it was applied issue
      on AIO-SX(replicas is 1) to leverage rollback, Armada/helm
      rollback --wait does not wait for pods to be ready before it
      returns.
      Related helm issue,
      https://github.com/helm/helm/issues/4210
      https://github.com/helm/helm/issues/2006

Tests conducted(AIO-SX, DX, Standard):
  - functional tests (both stx-openstack and simple custom app)
    - upload stx-openstack-1.0-13-centos-stable-latest tarfile
      which uses latest docker images
    - apply stx-openstack
    - update to stx-openstack-1.0-13-centos-stable-versioned
      which uses versioned docker images
    - update back to stx-openstack-1.0-13-centos-stable-latest
    - update to a version that has less/more charts compared to
      the old version
    - remove stx-openstack
    - delete stx-openstack
  - failure tests
    - application-update rejected
      (app not found, update to a same version,
       operation not permitted etc...)
    - application-update fails that trigger recover
      - upload failure
        ie. invalid tarfile, manifest file validation failed ...
      - apply/rollback failure
        ie. download images failure, Armada apply/rollback fails

Change-Id: I4e094427e673639e2bdafd8c476b897b7b4327a3
Story: 2005350
Task: 33568
Signed-off-by: Angie Wang <angie.wang@windriver.com>
2019-06-07 12:29:14 -04:00
..
__init__.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
address.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
address_pool.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
address_pool_shell.py Ansible Bootstrap Deployment 2019-04-11 08:40:34 -04:00
address_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
app.py Application update support 2019-06-07 12:29:14 -04:00
app_shell.py Application update support 2019-06-07 12:29:14 -04:00
ceph_mon.py Ceph for standard: System Inventory CLI, API, DB 2019-01-16 18:12:15 +02:00
ceph_mon_shell.py Ceph for standard: System Inventory CLI, API, DB 2019-01-16 18:12:15 +02:00
certificate.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
certificate_shell.py Cleaning up murano references on bare metal. 2019-05-31 17:13:45 -05:00
client.py Add Commands For Docker Registry Image Cleanup 2019-05-16 10:28:51 -04:00
cluster.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
cluster_shell.py Ceph for standard: Add deployment model to System Inventory cluster API 2019-02-05 18:01:42 +00:00
controller_fs.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
controller_fs_shell.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
datanetwork.py Create DataNetworks modelling in System Configuration 2019-01-22 17:43:45 -05:00
datanetwork_shell.py Create DataNetworks modelling in System Configuration 2019-01-22 17:43:45 -05:00
drbdconfig.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
drbdconfig_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
ethernetport.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
ethernetport_shell.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
fernet.py Fernet key synchronization 2018-10-26 14:56:42 -05:00
health.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
health_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
helm.py Application dirs and overrides updates 2019-05-23 12:02:42 -04:00
helm_shell.py Application dirs and overrides updates 2019-05-23 12:02:42 -04:00
iHost_shell.py Enable configurable vswitch memory 2019-01-22 14:08:48 -05:00
icommunity.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
icommunity_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
icpu.py Change compute node to worker node personality 2018-12-13 14:15:55 -05:00
icpu_shell.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
idisk.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
idisk_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
idns.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
idns_shell.py Provide API to enable/disable NTP service in SysInv 2018-08-16 09:29:15 -04:00
iextoam.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
iextoam_shell.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
ihost.py Support an Alternative Backup Restore Procedure 2018-11-08 18:36:46 -05:00
iinterface.py Create DataNetworks modelling in System Configuration 2019-01-22 17:43:45 -05:00
iinterface_shell.py Integration with latest SR-IOV CNI images 2019-05-29 13:36:28 -05:00
ilvg.py Fixing tox pylint errors in cgts-client component 2018-08-24 14:21:43 -04:00
ilvg_shell.py Merge "Enhancement for Controller Filesystem Extension" 2018-11-30 17:34:10 +00:00
imemory.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
imemory_shell.py Update hugepage function name for apps 2019-05-23 12:39:29 -04:00
inode.py Fixing tox pylint errors in cgts-client component 2018-08-24 14:21:43 -04:00
inode_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
interface_datanetwork.py Create DataNetworks modelling in System Configuration 2019-01-22 17:43:45 -05:00
interface_datanetwork_shell.py Create DataNetworks modelling in System Configuration 2019-01-22 17:43:45 -05:00
interface_network.py Multiple networks to interface association 2018-09-13 13:28:24 -04:00
interface_network_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
intp.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
intp_shell.py Fixing tox pep8 errors in cgts-client component 2018-08-24 15:29:45 -04:00
iprofile.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
iprofile_shell.py Create DataNetworks modelling in System Configuration 2019-01-22 17:43:45 -05:00
ipv.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
ipv_shell.py Use GiB for storage related size display 2018-06-28 22:07:38 -04:00
isensor.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
isensor_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
isensorgroup.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
isensorgroup_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
iservice.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
iservice_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
iservicegroup.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
iservicegroup_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
istor.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
istor_shell.py CEPH: Adding OSD storage devices no longer need nodes to be locked 2019-03-11 10:34:18 +02:00
isystem.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
isystem_shell.py Support 'True' and 'False' input for system commands 2019-01-23 09:15:04 +08:00
itrapdest.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
itrapdest_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
iuser.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
iuser_shell.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
label.py Extend sysinv to assign kubernetes labels to nodes 2018-08-24 15:40:48 -04:00
label_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
license.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
license_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
lldp_agent.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
lldp_agent_shell.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
lldp_neighbour.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
lldp_neighbour_shell.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
load.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
load_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
network.py Display network name in interface show command 2018-09-14 12:08:14 -04:00
network_shell.py Support 'True' and 'False' input for system commands 2019-01-23 09:15:04 +08:00
options.py Integrate gnocchi for OpenStack Telemetry 2018-07-31 15:48:44 -04:00
partition.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
partition_shell.py Use GiB for storage related size display 2018-06-28 22:07:38 -04:00
pci_device.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
pci_device_shell.py Change compute node to worker node personality 2018-12-13 14:15:55 -05:00
port.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
port_shell.py Integration with latest SR-IOV CNI images 2019-05-29 13:36:28 -05:00
ptp.py Implementation of PTP support in SysInv and Puppet 2018-08-22 11:57:14 -04:00
ptp_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
registry_image.py Add Commands For Docker Registry Image Cleanup 2019-05-16 10:28:51 -04:00
registry_image_shell.py Add Commands For Docker Registry Image Cleanup 2019-05-16 10:28:51 -04:00
remotelogging.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
remotelogging_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
route.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
route_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
sdn_controller.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
sdn_controller_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
service_parameter.py Integrate gnocchi for OpenStack Telemetry 2018-07-31 15:48:44 -04:00
service_parameter_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
shell.py Add Commands For Docker Registry Image Cleanup 2019-05-16 10:28:51 -04:00
sm_service.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
sm_service_nodes.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
sm_service_nodes_shell.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
sm_service_shell.py Fix: "filter" issue for Python 2/3 compatible code 2018-12-19 10:14:36 +08:00
sm_servicegroup.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
sm_servicegroup_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00
storage_backend.py Remove unused system command "storage-usage-list" 2019-05-13 01:44:48 +00:00
storage_backend_shell.py Remove unused system command "storage-usage-list" 2019-05-13 01:44:48 +00:00
storage_ceph.py CEPH persistent storage backend for Kubernetes 2018-10-23 11:33:38 -06:00
storage_ceph_external.py Add support for external Ceph 2018-07-31 15:48:43 -04:00
storage_external.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
storage_file.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
storage_lvm.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
storage_tier.py StarlingX open source release updates 2018-05-31 07:35:52 -07:00
storage_tier_shell.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
upgrade.py Convert cgtsclient from setuptools to pbr. Add tox. 2018-06-28 22:07:37 -04:00
upgrade_shell.py Fix 'print' issue for Python 2/3 compatible code. 2018-12-06 12:59:33 +08:00