distcloud/distributedcloud/dcmanager/tests
Tao Liu 58a7186bea Support subcloud deploy upload the common files
Add new REST APIs to upload and display the deploy manager
common files on the System Controller.

The deploy manager common files which include playbook,
overrides and helm charts are uploaded to
/opt/platform/deploy/<version>:
/opt/platform/deploy/<version>/deploy_playbook_<original name>
/opt/platform/deploy/<version>/deploy_overrides_<original name>
/opt/platform/deploy/<version>/deploy_chart_<original name>

Modify the subcloud post request to accept the bootstrap-values,
install-values and deploy-config as file contents. The deploy
config file is only used by the deploy manager and it is
uploaded to /opt/dc/ansible.

The information that used to create the overrides for the
playbook are extracted and sent to the dcmanager, which include
bootstrap values, install values and the full path of deploy
file names, if the deploy-config is presented in the request.

Testcases:
REST APIs:
1. curl -X POST -H "X-Auth-Token: $TOKEN" $APIURL/subcloud-deploy \
-F deploy_playbook=@<full path of the playbook name> \
-F deploy_overrides=@<full path of the override file name> \
-F deploy_chart=@full path of the helm chart name>

2. curl -X GET -H "X-Auth-Token: $TOKEN" $APIURL/subcloud-deploy

3. curl -X POST -H "X-Auth-Token: $TOKEN" \
$APIURL/subclouds \
-F bootstrap_values=@<full path of the bootstrap override file> \
-F sysadmin_password=<encoded password> \
-F bootstrap-address=<bootstrap IP>

4. curl -X POST -H "X-Auth-Token: $TOKEN" \
$APIURL/subclouds \
-F bootstrap_values=@<full path of the bootstrap override file> \
-F install_values=@<full path of the install value file> \
-F deploy_config=@<full path of the deploy config file> \
-F sysadmin_password=<encoded password> \
-F bmc_password=<encoded password> \
-F bootstrap-address=<bootstrap IP> \

CLI:
1. dcmanager subcloud-deploy upload \
--deploy-playbook <full path of the playbook name> \
--deploy-chart <full path of the override file name> \
--deploy-overrides <full path of the override file name>

2. dcmanager subcloud-deploy show

3. dcmanager subcloud add --bootstrap-address <IP>  \
--bootstrap-values <full path of the bootstrap override> \
--deploy-config <full path of the deploy config file> \

4. dcmanager subcloud add --bootstrap-address <IP> \
--bootstrap-values <full path of the bootstrap override> \
--install-values <full path of the install value file> \

5.dcmanager subcloud add --bootstrap-address <IP> \
--bootstrap-values <full path of the bootstrap override> \
--install-values <full path of the install value file> \
--deploy-config <full path of the deploy config file> \

Host swact and deploy of a subcloud

Closes-Bug: 1864508

Change-Id: I3ce0da6efb8c2d78a213647789fc6bdb3b348b2d
Signed-off-by: Tao Liu <tao.liu@windriver.com>
2020-04-21 09:09:38 -04:00
..
unit Support subcloud deploy upload the common files 2020-04-21 09:09:38 -04:00
__init__.py Move content to subdir to support relocated packaging 2019-11-04 13:57:02 -05:00
base.py Adding DistributedCloud subcloud group feature 2020-04-14 06:21:06 -05:00
utils.py Adding DistributedCloud subcloud group feature 2020-04-14 06:21:06 -05:00