summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/congress/test-webapp/setup/install_congress_testserver.sh12
-rw-r--r--components/congress/test-webapp/www/proxy/index.php2
2 files changed, 9 insertions, 5 deletions
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);