From 28d9889c0552554bcd60a253b144b13cecfdca3d Mon Sep 17 00:00:00 2001 From: blsaws Date: Sun, 22 May 2016 21:25:38 -0700 Subject: Fix mode bugs found in testing again on Centos. JIRA: COPPER-4 Change-Id: I1629ad60e990f9909c0ca08d2d7367b5e5abb1cc Signed-off-by: blsaws --- .../test-webapp/setup/install_congress_testserver.sh | 12 ++++++++---- components/congress/test-webapp/www/proxy/index.php | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'components') diff --git a/components/congress/test-webapp/setup/install_congress_testserver.sh b/components/congress/test-webapp/setup/install_congress_testserver.sh index 9db8167..4b4cd90 100644 --- a/components/congress/test-webapp/setup/install_congress_testserver.sh +++ b/components/congress/test-webapp/setup/install_congress_testserver.sh @@ -35,6 +35,8 @@ if [ $# -eq 1 ]; then cubranch=$1; fi echo "Install prerequisites" dist=`grep DISTRIB_ID /etc/*-release | awk -F '=' '{print $2}'` +if [ ! -d /tmp/copper ]; then mkdir /tmp/copper; fi + if [ "$dist" == "Ubuntu" ]; then # Docker setup procedure from https://docs.docker.com/engine/installation/linux/ubuntulinux/ echo "Install docker and prerequisites" @@ -49,7 +51,7 @@ EOF apt-cache policy docker-engine sudo apt-get install -y linux-image-extra-$(uname -r) sudo apt-get install -y docker docker-engine - echo "Copy copper environment files" + echo "Copy copper environment files" cp ~/congress/env.sh /tmp/copper/ cp ~/congress/admin-openrc.sh /tmp/copper/ else @@ -66,8 +68,7 @@ EOF fi echo "Clone copper" -if [ ! -d /tmp/copper ]; then - mkdir /tmp/copper +if [ ! -d /tmp/copper/copper ]; then cd /tmp/copper git clone https://gerrit.opnfv.org/gerrit/copper cd copper @@ -82,7 +83,10 @@ echo "Setup copper environment" source /tmp/copper/env.sh echo "Setup webapp files" -if [ ! -d /tmp/copper/log ]; then mkdir /tmp/copper/log; fi +if [ ! -d /tmp/copper/log ]; then + mkdir /tmp/copper/log + chmod 777 /tmp/copper/log +fi source /tmp/copper/env.sh echo "Point proxy.php to the Congress server" sed -i -- "s/CONGRESS_HOST/$CONGRESS_HOST/g" /tmp/copper/copper/components/congress/test-webapp/www/proxy/index.php diff --git a/components/congress/test-webapp/www/proxy/index.php b/components/congress/test-webapp/www/proxy/index.php index 8a2833a..5beece5 100644 --- a/components/congress/test-webapp/www/proxy/index.php +++ b/components/congress/test-webapp/www/proxy/index.php @@ -23,7 +23,7 @@ if ($method == 'OPTIONS') { exit(); } -$url = "http://192.168.10.117:1789".$_GET['~url']; +$url = "http://CONGRESS_HOST:1789".$_GET['~url']; $curlop = curl_init(); curl_setopt($curlop, CURLOPT_URL, $url); curl_setopt($curlop, CURLOPT_CUSTOMREQUEST, $method); -- cgit 1.2.3-korg