diff options
author | 2016-05-17 16:26:54 -0700 | |
---|---|---|
committer | 2016-05-17 16:30:18 -0700 | |
commit | 345cf9dcc19dc83c1dce55259ccfdde6107309da (patch) | |
tree | dc201154cce206b0e6881ffc8ad1de41aa840e0b /components/congress/install/bash/centos/install_congress_1.sh | |
parent | 4c972868690788e9a186bfffd84ff19188ec4dff (diff) |
Fixes for manual install testing phase.
JIRA: COPPER-2
Change-Id: Ia3eb86248c7fa4ad98789615d669c4571366f634
Signed-off-by: blsaws <bryan.sullivan@att.com>
Diffstat (limited to 'components/congress/install/bash/centos/install_congress_1.sh')
-rw-r--r-- | components/congress/install/bash/centos/install_congress_1.sh | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/components/congress/install/bash/centos/install_congress_1.sh b/components/congress/install/bash/centos/install_congress_1.sh index 19f3d29..4d465af 100644 --- a/components/congress/install/bash/centos/install_congress_1.sh +++ b/components/congress/install/bash/centos/install_congress_1.sh @@ -18,11 +18,11 @@ # Prequisites: # OPFNV install per https://wiki.opnfv.org/display/copper/Apex # On the jumphost, logged in as stack on the undercloud VM: -# Download and save admin-openrc.sh from the overcloud Horizon at ~/ # su stack # Clone the Copper repo and run the install script: # git clone https://gerrit.opnfv.org/gerrit/copper -# source copper/components/install/bash/centos/install_congress_1.sh +# cd copper +# source components/congress/install/bash/centos/install_congress_1.sh if [ $# -gt 1 ] && [ $2 == "debug" ]; then set -x #echo on fi @@ -48,16 +48,18 @@ EOF source ~/env.sh scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ~/env.sh heat-admin@$CONTROLLER_HOST1:/home/heat-admin -# Setup env for overcloud +# Setup env for overcloud API access source ~/overcloudrc -sed -i -- 's/echo "Please/# echo "Please/g' ~/admin-openrc.sh -sed -i -- 's/read -sr OS_PASSWORD_INPUT/# read -sr OS_PASSWORD_INPUT/g' ~/admin-openrc.sh -sed -i -- 's/export OS_PASSWORD=$OS_PASSWORD_INPUT/export OS_PASSWORD='$OS_PASSWORD'/g' ~/admin-openrc.sh -source ~/admin-openrc.sh -scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ~/admin-openrc.sh heat-admin@$CONTROLLER_HOST1:/home/heat-admin +export OS_REGION_NAME=$(openstack endpoint list | awk "/ nova / { print \$4 }") +cp ~/overcloudrc ~/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 +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/ echo "Copy install_congress_2.sh to the congress server and execute" -scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ~/git/copper/components/congress/joid/install_congress_2.sh heat-admin@$CONTROLLER_HOST1:/home/heat-admin +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" echo "Install jumphost dependencies" @@ -70,41 +72,43 @@ 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 ~/git -cd ~/git +mkdir ~/congress +cd ~/congress git clone https://github.com/openstack/congress.git cd congress git checkout stable/liberty echo "Create virtualenv" -virtualenv ~/git/congress +virtualenv ~/congress/congress source bin/activate -echo "Install and test OpenStack client" -cd ~/git +echo "Setup overcloud OpenStack API" +admin-openrc.sh + +echo "Install OpenStack client" +cd ~/congress git clone https://github.com/openstack/python-openstackclient.git cd python-openstackclient git checkout stable/liberty -~/git/congress/bin/pip install -r requirements.txt -~/git/congress/bin/pip install . +~/congress/congress/bin/pip install -r requirements.txt +~/congress/congress/bin/pip install . openstack service list -echo "Install and test Congress client" -cd ~/git +echo "Install Congress client" +cd ~/congress git clone https://github.com/openstack/python-congressclient.git cd python-congressclient git checkout stable/liberty -~/git/congress/bin/pip install -r requirements.txt -~/git/congress/bin/pip install . -openstack congress driver list +~/congress/congress/bin/pip install -r requirements.txt +~/congress/congress/bin/pip install . -echo "Install and test Keystone client" -cd ~/git +echo "Install Keystone client" +cd ~/congress git clone https://github.com/openstack/python-keystoneclient.git cd python-keystoneclient git checkout stable/liberty -~/git/congress/bin/pip install -r requirements.txt -~/git/congress/bin/pip install . +~/congress/congress/bin/pip install -r requirements.txt +~/congress/congress/bin/pip install . echo "setup Congress user. TODO: needs update in http://congress.readthedocs.org/en/latest/readme.html#installing-congress" pip install cliff --upgrade @@ -126,7 +130,7 @@ openstack endpoint create $CONGRESS_SERVICE \ --internalurl http://$CONGRESS_HOST:1789/ echo "Start the Congress service" -ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no heat-admin@$CONGRESS_HOST "~/git/congress/bin/congress-server &>/dev/null &" +ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no heat-admin@$CONGRESS_HOST "~/congress/congress/bin/congress-server &>/dev/null &" echo "Wait 30 seconds for Congress service to startup" sleep 30 @@ -168,7 +172,7 @@ echo "Install tox test dependencies" sudo yum install -y libffi-devel openssl-devel echo "Run Congress tox Tests" -cd ~/git/congress +cd ~/congress/congress tox -epy27 set +x #echo off |