diff options
author | Martin Kulhavy <martin.kulhavy@nokia.com> | 2017-08-15 16:04:11 +0300 |
---|---|---|
committer | Martin Kulhavy <martin.kulhavy@nokia.com> | 2017-08-15 16:04:11 +0300 |
commit | 0ab327d6ccdc62f75d6693bea29f3bf41e60c14c (patch) | |
tree | 3b8d884bf758c9843a7e7404a51b865c1b36e01a /ci/openstack.sh | |
parent | b46de9e8a6d2a87d6e475b6ee9bf66c2c2b9761f (diff) |
Improve and highlight logging to console (2)
xtrace produces a lot of output that can be hard to read. This commit
uses extra functions for formatted output (info and error),
so that they stand out in the log and make it easier for the user to
understand what is currently happening.
Building up on change #38909: https://gerrit.opnfv.org/gerrit/38909
Change-Id: I0ddf9e0d3a12a62ae45c56d33a8d48c335b618a0
Signed-off-by: Martin Kulhavy <martin.kulhavy@nokia.com>
Diffstat (limited to 'ci/openstack.sh')
-rwxr-xr-x | ci/openstack.sh | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/ci/openstack.sh b/ci/openstack.sh index 9020fd7c..98ebb145 100755 --- a/ci/openstack.sh +++ b/ci/openstack.sh @@ -1,5 +1,4 @@ #!/bin/bash -ex - ############################################################################## # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 @@ -7,6 +6,10 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +set -ex + +source tools.sh + #./openstack.sh "$opnfvsdn" "$opnfvlab" "$opnfvdistro" "$openstack" || true opnfvsdn=$1 @@ -84,6 +87,8 @@ keystoneIp() { # create external network and subnet in openstack create_openrc() { + echo_info "Creating the openrc (OpenStack client environment scripts)" + mkdir -m 0700 -p cloud keystoneIp=$(keystoneIp) if [[ "$jujuver" < "2" ]]; then @@ -150,7 +155,9 @@ export OS_AUTH_URL=$4 EOF } -if ([ $API_FQDN ] && [ $API_FQDN != "null" ] && [ $API_FQDN != "None"]); then +if ([ $API_FQDN ] && [ $API_FQDN != "null" ] && [ $API_FQDN != "None" ]); then + echo_info "OS domain name was specified - injecting API FQDN to nodes" + # Push api fqdn local ip to all /etc/hosts if [[ "$jujuver" < "2" ]]; then API_FQDN=$(juju get keystone | python -c "import yaml; import sys;\ @@ -187,13 +194,13 @@ create_openrc . ~/joid_config/admin-openrc -echo "...... deploy public api proxy ......" - if ([ "$opnfvlab" == "orangepod1" ] \ || [ "$opnfvlab" == "intelpod6" ]) \ && [ "$opnfvsdn" == "nosdn" ] \ && [ "$API_FQDN" != "None" ]; then # only for first test phase if [ -e ./labconfig.yaml ]; then + echo_info "Deploying public API proxy" + PUB_API_MASK=$(grep floating-ip-range ./labconfig.yaml |cut -d/ -f2) PUB_API_NET=$(grep floating-ip-range ./labconfig.yaml |cut -d, -f4) PUB_API_IP=$(grep public-api-ip ./labconfig.yaml |cut -d: -f2) @@ -218,10 +225,11 @@ if ([ "$opnfvlab" == "orangepod1" ] \ juju run --unit nodes/0 "sudo ip l set dev br-ex up" || true python genPublicAPIProxyBundle.py -l labconfig.yaml >> bundles.yaml juju-deployer -vW -d -t 7200 -r 5 -c bundles.yaml $opnfvdistro-"$opnfvos" || true + + echo_info "Public API proxy deployed!" fi fi -echo "...... deploy end public api proxy ......" ## ## removing the swift API endpoint which is created by radosgw. @@ -238,6 +246,8 @@ echo "...... deploy end public api proxy ......" ## Create external subnet Network ## +echo_info "Creating external network with neutron" + if [ "onos" == "$opnfvsdn" ]; then launch_eth neutron net-show ext-net > /dev/null 2>&1 || neutron net-create ext-net \ |