diff options
author | blsaws <bryan.sullivan@att.com> | 2016-04-01 16:33:47 -0700 |
---|---|---|
committer | Bryan Sullivan <bs3131@att.com> | 2016-04-01 23:41:35 +0000 |
commit | a3e84efc371d4a13811f208dc0754da56de1ece9 (patch) | |
tree | 5c169d45ca3ab0bab1434cdec1b8a4aae228983f /components/congress/joid/install_congress_1.sh | |
parent | 62b5815004e69a2ffd63beac3cd76eacbf9c7f4e (diff) |
Add check for parameters; add echo statements
JIRA: COPPER-2
Change-Id: I031f4d13bc25c2b6c72cdd7ae3e64537532f7c6f
Signed-off-by: blsaws <bryan.sullivan@att.com>
(cherry picked from commit 5c5a34a44b3d5677624e37e2666f7f2db7b81943)
Diffstat (limited to 'components/congress/joid/install_congress_1.sh')
-rw-r--r-- | components/congress/joid/install_congress_1.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/components/congress/joid/install_congress_1.sh b/components/congress/joid/install_congress_1.sh index 7bf45af..8c15076 100644 --- a/components/congress/joid/install_congress_1.sh +++ b/components/congress/joid/install_congress_1.sh @@ -27,19 +27,20 @@ if [ $# -lt 1 ]; then return 2 fi -set -x +if [ $1 == "debug" ]; then set -x #echo on +fi -# Create the congress container +echo "Create the congress container" juju ssh ubuntu@$1 "sudo lxc-clone -o juju-trusty-lxc-template -n juju-trusty-congress; sudo lxc-start -n juju-trusty-congress -d; exit" -# Get the congress server address +echo "Get the congress server address" CONGRESS_HOST="" while [ "$CONGRESS_HOST" == "" ]; do sleep 5 CONGRESS_HOST=$(juju ssh ubuntu@$1 "sudo lxc-info --name juju-trusty-congress | grep IP" | awk "/ / { print \$2 }" | tr -d '\r') done -# Create the environment file and copy to the congress server +echo "Create the environment file and copy to the congress server" cat <<EOF >~/env.sh export CONGRESS_HOST=$CONGRESS_HOST export KEYSTONE_HOST=$(juju status --format=short | awk "/keystone\/0/ { print \$3 }") @@ -53,8 +54,8 @@ source ~/env.sh juju scp ~/admin-openrc.sh ubuntu@$CONGRESS_HOST:/home/ubuntu juju scp ~/env.sh ubuntu@$CONGRESS_HOST:/home/ubuntu -# Copy the install script to the congress server and execute +echo "Copy the install script to the congress server and execute" juju scp ~/git/copper/components/congress/joid/install_congress_2.sh ubuntu@$CONGRESS_HOST:/home/ubuntu ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$CONGRESS_HOST "source ~/install_congress_2.sh; exit" -set +x +set +x #echo off |