diff options
-rwxr-xr-x | bifrost/scripts/bifrost-provision.sh | 10 | ||||
-rwxr-xr-x | xci/config/user-vars | 6 | ||||
-rwxr-xr-x | xci/xci-deploy.sh | 18 |
3 files changed, 18 insertions, 16 deletions
diff --git a/bifrost/scripts/bifrost-provision.sh b/bifrost/scripts/bifrost-provision.sh index d4d1f96a..bd9493e6 100755 --- a/bifrost/scripts/bifrost-provision.sh +++ b/bifrost/scripts/bifrost-provision.sh @@ -91,10 +91,10 @@ cd $BIFROST_HOME/playbooks # Syntax check of dynamic inventory test path for task in syntax-check list-tasks; do - ${ANSIBLE} -i inventory/localhost \ + ${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} -i inventory/localhost \ test-bifrost-create-vm.yaml \ --${task} - ${ANSIBLE} -i inventory/localhost \ + ${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} -i inventory/localhost \ ${TEST_PLAYBOOK} \ --${task} \ -e testing_user=${TESTING_USER} @@ -111,7 +111,8 @@ if [[ -e /etc/centos-release ]]; then fi # Create the VMS -${ANSIBLE} -i inventory/localhost \ +${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} \ + -i inventory/localhost \ test-bifrost-create-vm.yaml \ -e test_vm_num_nodes=${TEST_VM_NUM_NODES} \ -e test_vm_memory_size=${VM_MEMORY_SIZE} \ @@ -120,7 +121,8 @@ ${ANSIBLE} -i inventory/localhost \ -e ${INVENTORY_FILE_FORMAT}=${BAREMETAL_DATA_FILE} # Execute the installation and VM startup test -${ANSIBLE} -i inventory/bifrost_inventory.py \ +${ANSIBLE} ${XCI_ANSIBLE_VERBOSITY} \ + -i inventory/bifrost_inventory.py \ ${TEST_PLAYBOOK} \ -e use_cirros=${USE_CIRROS} \ -e testing_user=${TESTING_USER} \ diff --git a/xci/config/user-vars b/xci/config/user-vars index ecde6db9..7c99ee9d 100755 --- a/xci/config/user-vars +++ b/xci/config/user-vars @@ -49,10 +49,10 @@ export OPNFV_OSA_PLAYBOOK=${OPNFV_OSA_PLAYBOOK:-"$OPENSTACK_OSA_PATH/playbooks/s # Set the verbosity for ansible # # Examples: -# ANSIBLE_VERBOSITY="-v" +# XCI_ANSIBLE_VERBOSITY="-v" # or -# ANSIBLE_VERBOSITY="-vvvv" -export ANSIBLE_VERBOSITY=${ANSIBLE_VERBOSITY:-""} +# XCI_ANSIBLE_VERBOSITY="-vvvv" +export XCI_ANSIBLE_VERBOSITY=${XCI_ANSIBLE_VERBOSITY:-""} export LOG_PATH=${LOG_PATH:-${XCI_DEVEL_ROOT}/opnfv/logs} export RUN_TEMPEST=${RUN_TEMPEST:-false} # Set this to to true to force XCI to re-create the target OS images diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh index 0ee52624..80ff53b6 100755 --- a/xci/xci-deploy.sh +++ b/xci/xci-deploy.sh @@ -123,7 +123,7 @@ cd $XCI_PATH/playbooks sudo pip uninstall -y ansible || true sudo -H pip uninstall -y ansible || true sudo pip install ansible==${XCI_ANSIBLE_PIP_VERSION} -ansible-playbook -i inventory provision-vm-nodes.yml +ansible-playbook ${XCI_ANSIBLE_VERBOSITY} -i inventory provision-vm-nodes.yml cd ${OPENSTACK_BIFROST_PATH} bash ./scripts/bifrost-provision.sh echo "-----------------------------------------------------------------------" @@ -153,7 +153,7 @@ sudo pip install --force-reinstall ansible==${XCI_ANSIBLE_PIP_VERSION} # Start fresh hash -r cd $XCI_PATH/playbooks -ansible-playbook -i inventory configure-localhost.yml +ansible-playbook ${XCI_ANSIBLE_VERBOSITY} -i inventory configure-localhost.yml echo "-----------------------------------------------------------------------" echo "Info: Configured localhost host for openstack-ansible" @@ -171,7 +171,7 @@ echo "Info: Configured localhost host for openstack-ansible" echo "Info: Configuring opnfv deployment host for openstack-ansible" echo "-----------------------------------------------------------------------" cd ${XCI_DEVEL_ROOT} -ansible-playbook -i ${OPNFV_XCI_PATH}/playbooks/inventory ${OPNFV_XCI_PATH}/playbooks/configure-opnfvhost.yml +ansible-playbook ${XCI_ANSIBLE_VERBOSITY} -i ${OPNFV_XCI_PATH}/playbooks/inventory ${OPNFV_XCI_PATH}/playbooks/configure-opnfvhost.yml echo "-----------------------------------------------------------------------" echo "Info: Configured opnfv deployment host for openstack-ansible" @@ -190,7 +190,7 @@ if [[ $XCI_FLAVOR != "aio" ]]; then echo "Info: Configuring target hosts for openstack-ansible" echo "-----------------------------------------------------------------------" cd $OPNFV_XCI_PATH/playbooks - ansible-playbook -i inventory configure-targethosts.yml + ansible-playbook ${XCI_ANSIBLE_VERBOSITY} -i inventory configure-targethosts.yml echo "-----------------------------------------------------------------------" echo "Info: Configured target hosts" fi @@ -202,7 +202,7 @@ fi #------------------------------------------------------------------------------- echo "Info: Setting up target hosts for openstack-ansible" echo "-----------------------------------------------------------------------" -ssh root@$OPNFV_HOST_IP "openstack-ansible \ +ssh root@$OPNFV_HOST_IP "openstack-ansible ${XCI_ANSIBLE_VERBOSITY} \ $OPENSTACK_OSA_PATH/playbooks/setup-hosts.yml | tee setup-hosts.log " scp root@$OPNFV_HOST_IP:~/setup-hosts.log $LOG_PATH/setup-hosts.log echo "-----------------------------------------------------------------------" @@ -224,7 +224,7 @@ echo "Info: Set up target hosts for openstack-ansible successfuly" echo "Info: Gathering facts" echo "-----------------------------------------------------------------------" ssh root@$OPNFV_HOST_IP "cd $OPENSTACK_OSA_PATH/playbooks; \ - ansible -m setup -a gather_subset=network,hardware,virtual all" + ansible ${XCI_ANSIBLE_VERBOSITY} -m setup -a gather_subset=network,hardware,virtual all" echo "-----------------------------------------------------------------------" #------------------------------------------------------------------------------- @@ -235,7 +235,7 @@ echo "-----------------------------------------------------------------------" echo "Info: Setting up infrastructure" echo "-----------------------------------------------------------------------" echo "xci: running ansible playbook setup-infrastructure.yml" -ssh root@$OPNFV_HOST_IP "openstack-ansible \ +ssh root@$OPNFV_HOST_IP "openstack-ansible ${XCI_ANSIBLE_VERBOSITY} \ $OPENSTACK_OSA_PATH/playbooks//setup-infrastructure.yml | tee setup-infrastructure.log" scp root@$OPNFV_HOST_IP:~/setup-infrastructure.log $LOG_PATH/setup-infrastructure.log echo "-----------------------------------------------------------------------" @@ -269,7 +269,7 @@ echo "Info: Database cluster verification successful!" #------------------------------------------------------------------------------- echo "Info: Installing OpenStack on target hosts" echo "-----------------------------------------------------------------------" -ssh root@$OPNFV_HOST_IP "openstack-ansible \ +ssh root@$OPNFV_HOST_IP "openstack-ansible ${XCI_ANSIBLE_VERBOSITY} \ $OPENSTACK_OSA_PATH/playbooks/setup-openstack.yml | tee opnfv-setup-openstack.log" scp root@$OPNFV_HOST_IP:~/opnfv-setup-openstack.log $LOG_PATH/opnfv-setup-openstack.log echo "-----------------------------------------------------------------------" @@ -299,4 +299,4 @@ USERNAME=$(ssh -q root@192.168.122.2 awk "/OS_USERNAME=./" openrc) PASSWORD=$(ssh -q root@192.168.122.2 awk "/OS_PASSWORD=./" openrc) echo "Info: Admin username - ${USERNAME##*=}" echo "Info: Admin password - ${PASSWORD##*=}" -echo "Info: It is recommended to change the default password."
\ No newline at end of file +echo "Info: It is recommended to change the default password." |