From a22809ec23a271746de91342763ad76dd2603b8b Mon Sep 17 00:00:00 2001 From: blsaws Date: Sun, 10 Apr 2016 21:15:03 -0700 Subject: Remove user parameter (use $USER instead) JIRA: COPPER-4 Change-Id: I927ace2460cfb1045c11c78ec02c85576e5c03e5 Signed-off-by: blsaws (cherry picked from commit 06cb04ba10dc740d2e58a13817f48973b9341eb4) --- .../test-webapp/setup/install_congress_testserver_1.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'components/congress/test-webapp/setup/install_congress_testserver_1.sh') diff --git a/components/congress/test-webapp/setup/install_congress_testserver_1.sh b/components/congress/test-webapp/setup/install_congress_testserver_1.sh index 57a39e4..b69cf3f 100644 --- a/components/congress/test-webapp/setup/install_congress_testserver_1.sh +++ b/components/congress/test-webapp/setup/install_congress_testserver_1.sh @@ -21,21 +21,20 @@ # - Congress installed through install_congress_1.sh # - ~/env.sh created as part of Congress install (install_congress_1.sh) # How to use: -# $ source install_congress_testserver_1.sh +# $ source install_congress_testserver_1.sh # is the name of the controller node in MAAS -# and is the name of the account where you are installing this # Create and Activate the Container # Earlier versions of the JOID installer installed lxc and created local templates # but now we have to get the ubuntu template from the controller -if [ $# -lt 2 ]; then - echo 1>&2 "$0: arguments required " +if [ $# -lt 1 ]; then + echo 1>&2 "$0: arguments required " return 2 fi -if [ $# -eq 3 ]; then - if [ $3 == "debug" ]; then set -x #echo on +if [ $# -eq 2 ]; then + if [ $2 == "debug" ]; then set -x #echo on fi fi @@ -45,7 +44,7 @@ echo "Copy lxc-ubuntu container from the controller" juju scp ubuntu@$1:/usr/share/lxc/templates/lxc-ubuntu ~/lxc-ubuntu sudo cp ~/lxc-ubuntu /usr/share/lxc/templates/lxc-ubuntu echo "Create the trusty-copper container" -sudo lxc-create -n trusty-copper -t /usr/share/lxc/templates/lxc-ubuntu -l DEBUG -- -b $2 ~/$2 +sudo lxc-create -n trusty-copper -t /usr/share/lxc/templates/lxc-ubuntu -l DEBUG -- -b $USER ~/$USER echo "Start trusty-copper" sudo lxc-start -n trusty-copper -d if (($? > 0)); then @@ -78,6 +77,6 @@ export NOVA_HOST=$(juju status --format=short | awk "/nova-cloud-controller\/0/ EOF echo "Invoke install_congress_testserver_2.sh on trusty-copper" -ssh -t -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $2@$COPPER_HOST "source ~/git/copper/components/congress/test-webapp/setup/install_congress_testserver_2.sh; exit" +ssh -t -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $USER@$COPPER_HOST "source ~/git/copper/components/congress/test-webapp/setup/install_congress_testserver_2.sh; exit" set +x -- cgit 1.2.3-korg