diff options
author | blsaws <bryan.sullivan@att.com> | 2016-06-14 13:39:53 -0700 |
---|---|---|
committer | blsaws <bryan.sullivan@att.com> | 2016-06-14 13:39:53 -0700 |
commit | 79b6ffd37b153558a8ef9172137842041439cb9f (patch) | |
tree | 916de962e00eb399edb9e90e9d9bd85eb8e11967 /components/congress | |
parent | c4f488ed136d875e6cbe2454b10caef0d1285cd2 (diff) |
Fixes to test web server
JIRA: COPPER-4
Change-Id: Icfe6cba0cbe15122d4edf28c672aff0b5711d0b5
Signed-off-by: blsaws <bryan.sullivan@att.com>
Diffstat (limited to 'components/congress')
4 files changed, 14 insertions, 11 deletions
diff --git a/components/congress/install/bash/setenv.sh b/components/congress/install/bash/setenv.sh index 0997345..60065ba 100644 --- a/components/congress/install/bash/setenv.sh +++ b/components/congress/install/bash/setenv.sh @@ -22,6 +22,8 @@ # $ wget https://git.opnfv.org/cgit/copper/plain/components/congress/install/bash/setenv.sh # $ bash setenv.sh +if [ ! -d /tmp/copper ]; then mkdir /tmp/copper; fi + dist=`grep DISTRIB_ID /etc/*-release | awk -F '=' '{print $2}'` if [ "$dist" == "Ubuntu" ]; then @@ -29,7 +31,7 @@ if [ "$dist" == "Ubuntu" ]; then echo "Ubuntu-based install" echo "Create the environment file" KEYSTONE_HOST=$(juju status --format=short | awk "/keystone\/0/ { print \$3 }") - cat <<EOF >~/env.sh + cat <<EOF >/tmp/copper/env.sh export CONGRESS_HOST=$(juju status --format=short | awk "/openstack-dashboard/ { print \$3 }") export HORIZON_HOST=$(juju status --format=short | awk "/openstack-dashboard/ { print \$3 }") export KEYSTONE_HOST=$KEYSTONE_HOST @@ -52,7 +54,7 @@ else echo "Get address of Controller node" export CONTROLLER_HOST1=$(openstack server list | awk "/overcloud-controller-0/ { print \$8 }" | sed 's/ctlplane=//g') echo "Create the environment file" - cat <<EOF >~/env.sh + cat <<EOF >/tmp/copper/env.sh export CONGRESS_HOST=$CONTROLLER_HOST1 export KEYSTONE_HOST=$CONTROLLER_HOST1 export CEILOMETER_HOST=$CONTROLLER_HOST1 @@ -61,13 +63,13 @@ export GLANCE_HOST=$CONTROLLER_HOST1 export NEUTRON_HOST=$CONTROLLER_HOST1 export NOVA_HOST=$CONTROLLER_HOST1 EOF - cat ~/overcloudrc >>~/env.sh + cat ~/overcloudrc >>/tmp/copper/env.sh source ~/overcloudrc export OS_REGION_NAME=$(openstack endpoint list | awk "/ nova / { print \$4 }") # sed command below is a workaound for a bug - region shows up twice for some reason - cat <<EOF | sed '$d' >>~/env.sh + cat <<EOF | sed '$d' >>/tmp/copper/env.sh export OS_REGION_NAME=$OS_REGION_NAME EOF fi -source ~/env.sh +source /tmp/copper/env.sh diff --git a/components/congress/test-webapp/setup/clean_congress_testserver.sh b/components/congress/test-webapp/setup/clean_congress_testserver.sh index fd41e43..1d06811 100755 --- a/components/congress/test-webapp/setup/clean_congress_testserver.sh +++ b/components/congress/test-webapp/setup/clean_congress_testserver.sh @@ -29,4 +29,5 @@ echo "Stop copper-webapp container" sudo docker stop $CID echo "Remove copper-webapp container" sudo docker rm $CID +# docker rm `docker ps -aq` set +x diff --git a/components/congress/test-webapp/setup/install_congress_testserver.sh b/components/congress/test-webapp/setup/install_congress_testserver.sh index 4b4cd90..9f2aaa9 100644 --- a/components/congress/test-webapp/setup/install_congress_testserver.sh +++ b/components/congress/test-webapp/setup/install_congress_testserver.sh @@ -21,6 +21,8 @@ # - Congress installed through install_congress_1.sh # - admin-openrc.sh downloaded from Horizon # - env.sh and admin-openrc.sh in the current folder +# - For Apex installs, on the jumphost, ssh to the undercloud VM and +# $ su stack # How to use: # Retrieve the copper install script as below, optionally specifying the # branch to use as a URL parameter, e.g. ?h=stable%2Fbrahmaputra @@ -36,6 +38,8 @@ echo "Install prerequisites" dist=`grep DISTRIB_ID /etc/*-release | awk -F '=' '{print $2}'` if [ ! -d /tmp/copper ]; then mkdir /tmp/copper; fi +wget https://git.opnfv.org/cgit/copper/plain/components/congress/install/bash/setenv.sh -O /tmp/copper/setenv.sh +source /tmp/copper/setenv.sh if [ "$dist" == "Ubuntu" ]; then # Docker setup procedure from https://docs.docker.com/engine/installation/linux/ubuntulinux/ @@ -51,9 +55,6 @@ 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" - cp ~/congress/env.sh /tmp/copper/ - cp ~/congress/admin-openrc.sh /tmp/copper/ else sudo tee /etc/yum.repos.d/docker.repo <<-'EOF' [dockerrepo] @@ -63,8 +64,7 @@ enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg EOF - echo "Copy copper environment files" - sudo scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no stack@192.0.2.1:/home/stack/congress/*.sh /tmp/copper + sudo yum install docker fi echo "Clone copper" diff --git a/components/congress/test-webapp/www/copper.js b/components/congress/test-webapp/www/copper.js index f32c139..8c087aa 100644 --- a/components/congress/test-webapp/www/copper.js +++ b/components/congress/test-webapp/www/copper.js @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-var origin = "http://localhost:8080/proxy/?~url=";
+var origin = "http://localhost:8257/proxy/?~url=";
var dataSources = [];
var datasource_tables = [];
var datasource_rows = [];
|