summaryrefslogtreecommitdiffstats
path: root/components/congress/test-webapp
diff options
context:
space:
mode:
authorblsaws <bs3131@att.com>2016-04-10 21:15:03 -0700
committerblsaws <bs3131@att.com>2016-04-10 21:15:03 -0700
commit06cb04ba10dc740d2e58a13817f48973b9341eb4 (patch)
tree19bf623f5c5ee79a82c17c17aff630f9c3bb7e66 /components/congress/test-webapp
parenta2f91422a9df51e4088577c6e7388bdc58d69e97 (diff)
Remove user parameter (use $USER instead)
JIRA: COPPER-4 Change-Id: I927ace2460cfb1045c11c78ec02c85576e5c03e5 Signed-off-by: blsaws <bs3131@att.com>
Diffstat (limited to 'components/congress/test-webapp')
-rw-r--r--components/congress/test-webapp/setup/install_congress_testserver_1.sh15
-rw-r--r--components/congress/test-webapp/setup/install_congress_testserver_2.sh6
2 files changed, 12 insertions, 9 deletions
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 <controller_hostname> <user>
+# $ source install_congress_testserver_1.sh <controller_hostname>
# <controller_hostname> is the name of the controller node in MAAS
-# and <user> 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 <controller_hostname> <user>"
+if [ $# -lt 1 ]; then
+ echo 1>&2 "$0: arguments required <controller_hostname>"
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
diff --git a/components/congress/test-webapp/setup/install_congress_testserver_2.sh b/components/congress/test-webapp/setup/install_congress_testserver_2.sh
index aacc0fe..93d58d8 100644
--- a/components/congress/test-webapp/setup/install_congress_testserver_2.sh
+++ b/components/congress/test-webapp/setup/install_congress_testserver_2.sh
@@ -20,7 +20,8 @@
# On jumphost:
# - Congress installed through install_congress_1.sh
# How to use:
-# $ source ~/git/copper/tests/setup/install_congress_testserver_1.sh
+# $ source install_congress_testserver_1.sh <controller_hostname>
+# <controller_hostname> is the name of the controller node in MAAS
echo "Setup OpenStack environment variables per your OPNFV install"
source ~/env.sh
@@ -120,6 +121,9 @@ sudo sed -i -- "s/COPPER_HOST/$COPPER_HOST/g" /var/www/html/copper.js
echo "Point proxy.php to the Congress server per your install"
sudo sed -i -- "s/CONGRESS_HOST/$CONGRESS_HOST/g" /var/www/html/proxy/index.php
+echo "Set user so log files are stored"
+sudo sed -i -- "s/opnfv/$USER/g" /var/www/html/proxy/index.php
+
echo "Make webapp log directory and set permissions"
mkdir ~/coppertest/logs
chmod 777 ~/coppertest/logs