diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/congress/joid/install_congress_1b.sh | 14 | ||||
-rw-r--r-- | components/congress/joid/install_congress_2b.sh | 29 |
2 files changed, 22 insertions, 21 deletions
diff --git a/components/congress/joid/install_congress_1b.sh b/components/congress/joid/install_congress_1b.sh index 2063dbe..7fae148 100644 --- a/components/congress/joid/install_congress_1b.sh +++ b/components/congress/joid/install_congress_1b.sh @@ -54,7 +54,7 @@ fi echo "Create the environment file and copy to the congress server" cat <<EOF >~/env.sh export CONGRESS_HOST=$CONGRESS_HOST -export HORIZON_HOST=$(juju status --format=short | awk "/openstack-dashboard\/0/ { print \$3 }") +export HORIZON_HOST=$(juju status --format=short | awk "/openstack-dashboard/ { print \$3 }") export KEYSTONE_HOST=$(juju status --format=short | awk "/keystone\/0/ { print \$3 }") export CEILOMETER_HOST=$(juju status --format=short | awk "/ceilometer\/0/ { print \$3 }") export CINDER_HOST=$(juju status --format=short | awk "/cinder\/0/ { print \$3 }") @@ -80,9 +80,7 @@ sudo apt-get install python-pip -y echo "install other dependencies" sudo apt-get install apg git gcc python-dev libxml2 libxslt1-dev libzip-dev -y - -echo "Install virtualenv" -sudo pip install virtualenv +sudo pip install --upgrade pip virtualenv setuptools pbr tox echo "Clone congress" mkdir ~/git @@ -140,10 +138,14 @@ openstack endpoint create $CONGRESS_SERVICE \ --adminurl http://$CONGRESS_HOST:1789/ \ --internalurl http://$CONGRESS_HOST:1789/ +echo "Start the Congress service" +ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ubuntu@$CONGRESS_HOST "nohup ~/git/congress/bin/congress-server; exit" + +echo "Wait 30 seconds for Congress service to startup" +sleep 30 + echo "Create data sources" # To remove datasources: openstack congress datasource delete <name> -# Insert a delay here, as nova datasource seems to fail to get setup (server not ready?) -sleep 10 openstack congress datasource create nova "nova" \ --config username=$OS_USERNAME \ --config tenant_name=$OS_TENANT_NAME \ diff --git a/components/congress/joid/install_congress_2b.sh b/components/congress/joid/install_congress_2b.sh index 9dc0939..9ad7cde 100644 --- a/components/congress/joid/install_congress_2b.sh +++ b/components/congress/joid/install_congress_2b.sh @@ -36,8 +36,9 @@ openstack EOF source ~/env.sh -echo "Update package repos" +echo "Update/upgrade package repos" sudo apt-get update +sudo apt-get upgrade -y echo "install pip" sudo apt-get install python-pip -y @@ -47,6 +48,7 @@ sudo apt-get install default-jre -y echo "install other dependencies" sudo apt-get install apg git gcc python-dev libxml2 libxslt1-dev libzip-dev -y +sudo pip install --upgrade pip virtualenv setuptools pbr tox echo "set mysql root user password and install mysql" export MYSQL_PASSWORD=$(/usr/bin/apg -n 1 -m 16 -c cl_seed) @@ -61,6 +63,10 @@ git clone https://github.com/openstack/congress.git cd congress git checkout stable/liberty +echo "Create virtualenv" +virtualenv ~/git/congress +source bin/activate + echo "Setup Congress" sudo mkdir -p /etc/congress sudo chown ubuntu /etc/congress @@ -77,11 +83,11 @@ sudo apt-get install libssl-dev -y echo "install dependencies of Congress" cd ~/git/congress -pip install -r requirements.txt -pip install . +bin/pip install -r requirements.txt +bin/pip install . echo "install tox" -pip install tox +bin/pip install tox echo "generate congress.conf.sample" tox -egenconfig @@ -106,29 +112,22 @@ echo "copy congress.conf.sample to /etc/congress" cp etc/congress.conf.sample /etc/congress/congress.conf echo "create congress database" -sudo mysql --user=root --password=$MYSQL_PASSWORD -e "CREATE DATABASE congress; GRANT ALL PRIVILEGES ON congress.* TO 'ubuntu@localhost' IDENTIFIED BY '"$MYSQL_PASSWORD"'; GRANT ALL PRIVILEGES ON congress.* TO 'ubuntu'@'%' IDENTIFIED BY '"$MYSQL_PASSWORD"'; exit;" +sudo mysql --user=root --password=$MYSQL_PASSWORD -e "CREATE DATABASE congress; GRANT ALL PRIVILEGES ON congress.* TO 'ubuntu@localhost' IDENTIFIED BY '"$MYSQL_PASSWORD"'; GRANT ALL PRIVILEGES ON congress.* TO 'ubuntu'@'%' IDENTIFIED BY '"$MYSQL_PASSWORD"';" echo "install congress-db-manage dependencies (detected by errors)" sudo apt-get build-dep python-mysqldb -y -pip install MySQL-python +bin/pip install MySQL-python echo "create database schema" congress-db-manage --config-file /etc/congress/congress.conf upgrade head -echo "Start the Congress service in the background" -cd ~/git/congress -sudo bin/congress-server & - -echo "disown the process (so it keeps running if you get disconnected)" -disown -h %1 - echo "Install Congress client" cd ~/git git clone https://github.com/openstack/python-congressclient.git cd python-congressclient git checkout stable/liberty -pip install -r requirements.txt -pip install . +../congress/bin/pip install -r requirements.txt +../congress/bin/pip install . function _congress_setup_horizon { local HORIZON_DIR="/usr/share/openstack-dashboard" |