summaryrefslogtreecommitdiffstats
path: root/components/congress
diff options
context:
space:
mode:
authorblsaws <bryan.sullivan@att.com>2016-05-17 16:49:29 -0700
committerblsaws <bryan.sullivan@att.com>2016-05-17 16:49:29 -0700
commitc5abd71c01dfd2fcbb9bcde8180198a291f2e658 (patch)
tree8aa118861dca203fc03a529fb497b451e803d671 /components/congress
parent345cf9dcc19dc83c1dce55259ccfdde6107309da (diff)
Move all scripts etc under congress to simplify cleanup.
JIRA: COPPER-2 Change-Id: I18b5ca707edaef67573bd5742084c7b2020b7564 Signed-off-by: blsaws <bryan.sullivan@att.com>
Diffstat (limited to 'components/congress')
-rw-r--r--components/congress/install/bash/centos/clean_congress.sh4
-rw-r--r--components/congress/install/bash/centos/install_congress_1.sh25
-rw-r--r--components/congress/install/bash/centos/install_congress_2.sh7
3 files changed, 18 insertions, 18 deletions
diff --git a/components/congress/install/bash/centos/clean_congress.sh b/components/congress/install/bash/centos/clean_congress.sh
index 4b5105c..27d6193 100644
--- a/components/congress/install/bash/centos/clean_congress.sh
+++ b/components/congress/install/bash/centos/clean_congress.sh
@@ -22,7 +22,7 @@
# Prequisite:
# OPFNV install per https://wiki.opnfv.org/display/copper/Apex
# How to use:
-# cd ~/congress/copper/ (or wherever you cloned the copper repo)
+# cd ~/git/copper/
# source /components/congress/install/bash/centos/clean_congress.sh
cd ~
@@ -37,7 +37,7 @@ echo "Stop the Congress service"
ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no heat-admin@$CONGRESS_HOST "pkill congress-server; exit"
echo "Remove the Congress virtualenv and code"
-ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no heat-admin@$CONGRESS_HOST "rm -rf ~/congress/congress; rm ~/admin-openrc.sh; rm ~/admin-openrc.sh; exit"
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no heat-admin@$CONGRESS_HOST "rm -rf ~/congress; exit"
# Setup env for overcloud API access
source ~/overcloudrc
diff --git a/components/congress/install/bash/centos/install_congress_1.sh b/components/congress/install/bash/centos/install_congress_1.sh
index 4d465af..166f475 100644
--- a/components/congress/install/bash/centos/install_congress_1.sh
+++ b/components/congress/install/bash/centos/install_congress_1.sh
@@ -20,7 +20,7 @@
# On the jumphost, logged in as stack on the undercloud VM:
# su stack
# Clone the Copper repo and run the install script:
-# git clone https://gerrit.opnfv.org/gerrit/copper
+# mkdir ~/git; cd git; git clone https://gerrit.opnfv.org/gerrit/copper
# cd copper
# source components/congress/install/bash/centos/install_congress_1.sh
@@ -36,7 +36,8 @@ export CONTROLLER_HOST1=$(openstack server list | awk "/overcloud-controller-0/
export CONTROLLER_HOST2=$(openstack server list | awk "/overcloud-controller-1/ { print \$8 }" | sed 's/ctlplane=//g')
echo "Create the environment file and copy to the congress server"
-cat <<EOF >~/env.sh
+mkdir ~/congress
+cat <<EOF >~/congress/env.sh
export CONGRESS_HOST=$CONTROLLER_HOST1
export KEYSTONE_HOST=$CONTROLLER_HOST1
export CEILOMETER_HOST=$CONTROLLER_HOST1
@@ -45,22 +46,23 @@ export GLANCE_HOST=$CONTROLLER_HOST1
export NEUTRON_HOST=$CONTROLLER_HOST1
export NOVA_HOST=$CONTROLLER_HOST1
EOF
-source ~/env.sh
-scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ~/env.sh heat-admin@$CONTROLLER_HOST1:/home/heat-admin
+source ~/congress/env.sh
+scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ~/congress/env.sh heat-admin@$CONTROLLER_HOST1:/home/heat-admin
-# Setup env for overcloud API access
+# Setup env for overcloud API access and copy to congress server
source ~/overcloudrc
export OS_REGION_NAME=$(openstack endpoint list | awk "/ nova / { print \$4 }")
-cp ~/overcloudrc ~/admin-openrc.sh
+cp ~/overcloudrc ~/congress/admin-openrc.sh
# sed command below is a workaound for a bug - region shows up twice for some reason
-cat <<EOF | sed '$d' >>~/admin-openrc.sh
+cat <<EOF | sed '$d' >>~/congress/admin-openrc.sh
export OS_REGION_NAME=$OS_REGION_NAME
EOF
-scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ~/admin-openrc.sh heat-admin@$CONTROLLER_HOST1:/home/heat-admin/
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no heat-admin@$CONTROLLER_HOST1 "mkdir ~/congress; exit"
+scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ~/congress/admin-openrc.sh heat-admin@$CONTROLLER_HOST1:/home/heat-admin/congress
echo "Copy install_congress_2.sh to the congress server and execute"
-scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ~/congress/copper/components/congress/install/bash/centos/install_congress_2.sh heat-admin@$CONTROLLER_HOST1:/home/heat-admin
-ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no heat-admin@$CONTROLLER_HOST1 "source ~/install_congress_2.sh; exit"
+scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ~/git/copper/components/congress/install/bash/centos/install_congress_2.sh heat-admin@$CONTROLLER_HOST1:/home/heat-admin/congress
+ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no heat-admin@$CONTROLLER_HOST1 "source ~/congress/install_congress_2.sh; exit"
echo "Install jumphost dependencies"
@@ -72,7 +74,6 @@ sudo yum install apg git gcc libxml2 python-devel libzip-devel libxslt-devel -y
sudo pip install --upgrade pip virtualenv setuptools pbr tox
echo "Clone congress"
-mkdir ~/congress
cd ~/congress
git clone https://github.com/openstack/congress.git
cd congress
@@ -83,7 +84,7 @@ virtualenv ~/congress/congress
source bin/activate
echo "Setup overcloud OpenStack API"
-admin-openrc.sh
+source ~/congress/admin-openrc.sh
echo "Install OpenStack client"
cd ~/congress
diff --git a/components/congress/install/bash/centos/install_congress_2.sh b/components/congress/install/bash/centos/install_congress_2.sh
index 19c7556..a41c4a5 100644
--- a/components/congress/install/bash/centos/install_congress_2.sh
+++ b/components/congress/install/bash/centos/install_congress_2.sh
@@ -20,13 +20,13 @@
# On the jumphost, logged in as stack on the undercloud VM:
# su stack
# Clone the Copper repo and run the install script:
-# git clone https://gerrit.opnfv.org/gerrit/copper
+# mkdir ~/git; cd git; git clone https://gerrit.opnfv.org/gerrit/copper
# cd copper
# source components/congress/install/bash/centos/install_congress_1.sh
set -x
-source ~/admin-openrc.sh
-source ~/env.sh
+source ~/congress/admin-openrc.sh
+source ~/congress/env.sh
echo "install pip"
sudo yum install python-pip -y
@@ -40,7 +40,6 @@ sudo yum install apg git gcc libxml2 python-devel libzip-devel libxslt-devel -y
sudo pip install --upgrade pip virtualenv setuptools pbr tox
echo "Clone congress"
-mkdir ~/congress
cd ~/congress
git clone https://github.com/openstack/congress.git
cd congress