diff options
-rwxr-xr-x | ci/deploy/deploy.sh | 18 | ||||
-rw-r--r-- | docs/release/configguide/index.rst | 2 | ||||
-rw-r--r-- | docs/release/configguide/installerconfig.rst | 2 | ||||
-rw-r--r-- | docs/release/configguide/kollaconfig.rst | 56 | ||||
-rw-r--r-- | docs/release/installation/index.rst | 3 | ||||
-rw-r--r-- | docs/release/installation/recovery.rst | 80 | ||||
-rw-r--r-- | docs/release/installation/upgrade.rst | 90 |
7 files changed, 242 insertions, 9 deletions
diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh index 056f6b41..a104230d 100755 --- a/ci/deploy/deploy.sh +++ b/ci/deploy/deploy.sh @@ -32,6 +32,7 @@ OPTIONS: -w Workdir for temporary usage, optional -h Print this message and exit -s Deployment scenario + -S Skip recreate Daisy VM during deployment Description: Deploys the Daisy4NFV on the indicated lab resource @@ -62,6 +63,7 @@ POD_NAME='' TARGET_HOSTS_NUM=0 DRY_RUN=0 IS_BARE=1 +SKIP_DEPLOY_DAISY=0 VM_MULTINODE=("computer01" "computer02" "controller02" "controller03" "controller01") VALID_DEPLOY_SCENARIO=("os-nosdn-nofeature-noha" "os-nosdn-nofeature-ha" "os-odl_l3-nofeature-noha" "os-odl_l2-nofeature-noha" "os-odl_l3-nofeature-ha" "os-odl_l2-nofeature-ha" @@ -74,7 +76,7 @@ VALID_DEPLOY_SCENARIO=("os-nosdn-nofeature-noha" "os-nosdn-nofeature-ha" "os-odl ############################################################################ # BEGIN of main # -while getopts "b:B:Dd:n:l:p:r:w:s:h" OPTION +while getopts "b:B:Dd:n:l:p:r:w:s:Sh" OPTION do case $OPTION in b) @@ -104,6 +106,9 @@ do s) DEPLOY_SCENARIO=${OPTARG} ;; + S) + SKIP_DEPLOY_DAISY=1 + ;; h) usage exit 0 @@ -427,11 +432,12 @@ function config_daisy() clean_up_target_vms_and_networks -#TODO: These steps shall be done only for the first time -clean_up_daisy_vm_and_networks -create_daisy_vm_and_networks -install_daisy -config_daisy +if [ ! $SKIP_DEPLOY_DAISY -eq 1 ]; then + clean_up_daisy_vm_and_networks + create_daisy_vm_and_networks + install_daisy + config_daisy +fi echo "====== prepare cluster and pxe ======" diff --git a/docs/release/configguide/index.rst b/docs/release/configguide/index.rst index 7b531f45..a4829422 100644 --- a/docs/release/configguide/index.rst +++ b/docs/release/configguide/index.rst @@ -13,4 +13,4 @@ Release notes for Daisy4nfv :maxdepth: 2 installerconfig.rst - + kollaconfig.rst diff --git a/docs/release/configguide/installerconfig.rst b/docs/release/configguide/installerconfig.rst index 10fa9ad8..a8ef8144 100644 --- a/docs/release/configguide/installerconfig.rst +++ b/docs/release/configguide/installerconfig.rst @@ -10,7 +10,7 @@ Abstract ======== -This document compiles the release notes for the D 2.0 release of +This document compiles the release notes for the E 1.0 release of OPNFV when using Daisy as a deployment tool. diff --git a/docs/release/configguide/kollaconfig.rst b/docs/release/configguide/kollaconfig.rst new file mode 100644 index 00000000..6da50ed3 --- /dev/null +++ b/docs/release/configguide/kollaconfig.rst @@ -0,0 +1,56 @@ + +.. This document is protected/licensed under the following conditions +.. (c) Sun Jing (ZTE corporation) +.. Licensed under a Creative Commons Attribution 4.0 International License. +.. You should have received a copy of the license along with this work. +.. If not, see <http://creativecommons.org/licenses/by/4.0/>. + + +OpenStack Configuration Guide +============================= + +Before The First Deployment +--------------------------- + +When executing deploy.sh, before doing real deployment, Daisy utilizes +Kolla's service configuration functionality [1] to specify the following +changes to the default OpenStack configuration which comes from Kolla as +default. + +a) If is it is a VM deployment, set virt_type=qemu amd cpu_mode=none for +nova-compute.conf. + +b) In nova-api.conf set default_floating_pool to the name of the external +network which will be created by Daisy after deployment for nova-api.conf. + +c) In heat-api.conf and heat-engine.conf, set deferred_auth_method to +trusts and unset trusts_delegated_roles. + +Those above changes are requirements of OPNFV or environment's +constraints. So it is not recommended to change them. But if the user +wants to add more specific configurations to OpenStack services before +doing real deployment, we suggest to do it in the same way as deploy.sh +do. Currently, this means hacking into deploy/prepare.sh or +deploy/prepare/execute.py then add config file as described in [1]. + +Notes: +Suggest to pass the first deployment first, then reconfigure and deploy +again. + + +After The First Deployment +-------------------------- + +After the first time of deployment of OpenStack, its configurations can +also be changed and applied by using Kolla's service configuration +functionality [1]. But user has to issue Kolla's command to do it in this +release: + + +.. code-block:: console + cd /home/kolla_install/kolla-ansible/ + ./tools/kolla-ansible reconfigure -i /home/kolla_install/kolla-ansible/ansible/inventory/multinode + + + +[1] https://docs.openstack.org/kolla-ansible/latest/advanced-configuration.html#openstack-service-configuration-in-kolla diff --git a/docs/release/installation/index.rst b/docs/release/installation/index.rst index 8c5a3da7..20d1e3b7 100644 --- a/docs/release/installation/index.rst +++ b/docs/release/installation/index.rst @@ -15,4 +15,5 @@ OPNFV Daisy4nfv Installation Guide installation_guide.rst bmdeploy.rst vmdeploy.rst - + recovery.rst + upgrade.rst diff --git a/docs/release/installation/recovery.rst b/docs/release/installation/recovery.rst new file mode 100644 index 00000000..7a49e693 --- /dev/null +++ b/docs/release/installation/recovery.rst @@ -0,0 +1,80 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International Licence. +.. http://creativecommons.org/licenses/by/4.0 + +Deployment Error Recovery Guide +=============================== + +Deployment may fail due to different kinds of reasons, such as Daisy VM creation +error, target nodes failure during OS installation, or Kolla deploy command +error. Different errors can be grouped into several error levels. We define +Recovery Levels below to fulfill recover requirements in different error levels. + +1. Recovery Level 0 +------------------- + +This level restart whole deployment again. Mainly to retry to solve errors such +as Daisy VM creation failed. For example we use the following command to do +virtual deployment(in the jump host): + + +.. code-block:: console + + sudo ./ci/deploy/deploy.sh -b ./ -l zte -p virtual1 -s os-nosdn-nofeature-ha + + + +If command failed because of Daisy VM creation error, then redo above command +will restart whole deployment which includes rebuild the daisy VM image and +restart Daisy VM. + + +2. Recovery Level 1 +------------------- + +If Daisy VM was created successfully, but bugs was encountered in Daisy code +or software of target OS which prevent deployment from being done, in this case, +the user or the developer does not want to recreate the Daisy VM again during +next deployment process but just to modify some pieces of code in it. To achieve +this, he/she can redo deployment by deleting all clusters and hosts first(in the +Daisy VM): + + +.. code-block:: console + + source /root/daisyrc_admin + for i in `daisy cluster-list | awk -F "|" '{print $2}' | sed -n '4p' | tr -d " "`;do daisy cluster-delete $i;done + for i in `daisy host-list | awk -F "|" '{print $2}'| grep -o "[^ ]\+\( \+[^ ]\+\)*"|tail -n +2`;do daisy host-delete $i;done + + + +Then, adjust deployment command as below and run it again(in the jump host): + + +.. code-block:: console + + sudo ./ci/deploy/deploy.sh -S -b ./ -l zte -p virtual1 -s os-nosdn-nofeature-ha + + + +Pay attention to the "-S" argument above, it lets the deployment process to +skip re-creating Daisy VM and use the existing one. + + +3. Recovery Level 2 +------------------- + +If both Daisy VM and target node's OS are OK, but error ocurred when doing +OpenStack deployment, then there is even no need to re-install target OS for +the deployment retrying. In this level, all we need to do is just retry the +Daisy deployment command as follows(in the Daisy VM): + + +.. code-block:: console + + source /root/daisyrc_admin + daisy uninstall <cluster-id> + daisy install <cluster-id> + + + +This basically do kolla-ansible destroy and kolla-asnible deploy. diff --git a/docs/release/installation/upgrade.rst b/docs/release/installation/upgrade.rst new file mode 100644 index 00000000..8b9965c3 --- /dev/null +++ b/docs/release/installation/upgrade.rst @@ -0,0 +1,90 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International Licence. +.. http://creativecommons.org/licenses/by/4.0 + +OpenStack Minor Version Update Guide +==================================== + +Thanks for the Kolla's kolla-ansible upgrade function, Daisy enable to +update OpenStack minor version as the follows: + +1. Get new version file only from Daisy team. +Since Daisy's Kolla images are build by meeting the OPNFV requirements +and have their own file packaging layout, Daisy requires user to +always use Kolla image file built by Daisy team. Currently, it can be +got from http://120.24.17.215/. + +2. Put new version file into /var/lib/daisy/kolla/, for example, +/var/lib/daisy/kolla/kolla-image-ocata-170811155446.tgz + +3. Add version file to Daisy's version management database then get the +version ID. + + +.. code-block:: console + + [root@daisy ~]# daisy version-add kolla-image-ocata-170811155446.tgz kolla + +-------------+--------------------------------------+ + | Property | Value | + +-------------+--------------------------------------+ + | checksum | None | + | created_at | 2017-08-28T06:45:25.000000 | + | description | None | + | id | 8be92587-34d7-43e8-9862-a5288c651079 | + | name | kolla-image-ocata-170811155446.tgz | + | owner | None | + | size | 0 | + | status | unused | + | target_id | None | + | type | kolla | + | updated_at | 2017-08-28T06:45:25.000000 | + | version | None | + +-------------+--------------------------------------+ + + + +4. Get cluster ID + + +.. code-block:: console + + [root@daisy ~]# daisy cluster-list + +--------------------------------------+-------------+... + | ID | Name |... + +--------------------------------------+-------------+... + | d4c1e0d3-c4b8-4745-aab0-0510e62f0ebb | clustertest |... + +--------------------------------------+-------------+... + + + +5. Issuing update command passing cluster ID and version ID + + + +.. code-block:: console + + [root@daisy ~]# daisy update d4c1e0d3-c4b8-4745-aab0-0510e62f0ebb --update-object kolla --version-id 8be92587-34d7-43e8-9862-a5288c651079 + +----------+--------------+ + | Property | Value | + +----------+--------------+ + | status | begin update | + +----------+--------------+ + + +6. Since step 5's command is non-blocking, the user need to run the +following command to get updating progress. + + + +.. code-block:: console + + [root@daisy ~]# daisy host-list --cluster-id d4c1e0d3-c4b8-4745-aab0-0510e62f0ebb + ...+---------------+-------------+-------------------------+ + ...| Role_progress | Role_status | Role_messages | + ...+---------------+-------------+-------------------------+ + ...| 0 | updating | prechecking envirnoment | + ...+---------------+-------------+-------------------------+ + + + +Notes. The above command returns many fields. User only have to take care +about the Role_xxx fields in this case. |