summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorblsaws <bs3131@att.com>2016-05-16 07:40:31 -0700
committerblsaws <bs3131@att.com>2016-05-16 07:40:31 -0700
commit8dcfe1a692815ee3a34dca32fd427471dfd0046a (patch)
tree5619e2c7b7113fe6ec68c98064895f7d8723e5bb /components
parente50f20b9c29fd6282025b4ccb87fedacb013ef66 (diff)
Refactor installer code folders.
JIRA: COPPER-2 Add initial centos7 bash scripts in development. Change-Id: I112aa43c231dac035f0d1bc2ae416fabf6b8b650 Signed-off-by: blsaws <bs3131@att.com>
Diffstat (limited to 'components')
-rw-r--r--components/congress/install/ansible/README.txt (renamed from components/congress/ansible/README.txt)0
-rw-r--r--components/congress/install/ansible/build_congress.yml (renamed from components/congress/ansible/build_congress.yml)0
-rw-r--r--components/congress/install/ansible/config.yml (renamed from components/congress/ansible/config.yml)0
-rw-r--r--components/congress/install/ansible/deploy_congress.yml (renamed from components/congress/ansible/deploy_congress.yml)0
-rw-r--r--components/congress/install/ansible/hosts.ini (renamed from components/congress/ansible/hosts.ini)0
-rw-r--r--components/congress/install/ansible/roles/deploy/tasks/main.yml (renamed from components/congress/ansible/roles/deploy/tasks/main.yml)0
-rw-r--r--components/congress/install/ansible/roles/deploy/templates/congress-api.conf (renamed from components/congress/ansible/roles/deploy/templates/congress-api.conf)0
-rw-r--r--components/congress/install/ansible/roles/deploy/templates/congress-api.service (renamed from components/congress/ansible/roles/deploy/templates/congress-api.service)0
-rw-r--r--components/congress/install/ansible/roles/deploy/templates/congress.conf (renamed from components/congress/ansible/roles/deploy/templates/congress.conf)0
-rw-r--r--components/congress/install/bash/centos/clean_congress.sh (renamed from components/congress/joid/clean_congress.sh)0
-rw-r--r--components/congress/install/bash/centos/install_congress_1.sh171
-rw-r--r--components/congress/install/bash/centos/install_congress_2.sh165
-rw-r--r--components/congress/install/joid/clean_congress.sh46
-rw-r--r--components/congress/install/joid/install_congress_1.sh (renamed from components/congress/joid/install_congress_1.sh)0
-rw-r--r--components/congress/install/joid/install_congress_2.sh (renamed from components/congress/joid/install_congress_2.sh)0
-rw-r--r--components/congress/install/puppet/lib/puppet/provider/congress_config/ini_setting.rb (renamed from components/congress/puppet/lib/puppet/provider/congress_config/ini_setting.rb)0
-rw-r--r--components/congress/install/puppet/lib/puppet/type/congress_config.rb (renamed from components/congress/puppet/lib/puppet/type/congress_config.rb)0
-rw-r--r--components/congress/install/puppet/manifests/client.pp (renamed from components/congress/puppet/manifests/client.pp)0
-rw-r--r--components/congress/install/puppet/manifests/config.pp (renamed from components/congress/puppet/manifests/config.pp)0
-rw-r--r--components/congress/install/puppet/manifests/db.pp (renamed from components/congress/puppet/manifests/db.pp)0
-rw-r--r--components/congress/install/puppet/manifests/db/mysql.pp (renamed from components/congress/puppet/manifests/db/mysql.pp)0
-rw-r--r--components/congress/install/puppet/manifests/db/postgresql.pp (renamed from components/congress/puppet/manifests/db/postgresql.pp)0
-rw-r--r--components/congress/install/puppet/manifests/db/sync.pp (renamed from components/congress/puppet/manifests/db/sync.pp)0
-rw-r--r--components/congress/install/puppet/manifests/init.pp (renamed from components/congress/puppet/manifests/init.pp)0
-rw-r--r--components/congress/install/puppet/manifests/keystone/auth.pp (renamed from components/congress/puppet/manifests/keystone/auth.pp)0
-rw-r--r--components/congress/install/puppet/manifests/logging.pp (renamed from components/congress/puppet/manifests/logging.pp)0
-rw-r--r--components/congress/install/puppet/manifests/params.pp (renamed from components/congress/puppet/manifests/params.pp)0
-rw-r--r--components/congress/install/puppet/manifests/policy.pp (renamed from components/congress/puppet/manifests/policy.pp)0
-rw-r--r--components/congress/install/puppet/manifests/service.pp (renamed from components/congress/puppet/manifests/service.pp)0
-rw-r--r--components/congress/install/puppet/metadata.json (renamed from components/congress/puppet/metadata.json)0
-rw-r--r--components/congress/install/puppet/spec/classes/congress_db_mysql_spec.rb (renamed from components/congress/puppet/spec/classes/congress_db_mysql_spec.rb)0
-rw-r--r--components/congress/install/puppet/spec/classes/congress_db_postgresql_spec.rb (renamed from components/congress/puppet/spec/classes/congress_db_postgresql_spec.rb)0
-rw-r--r--components/congress/install/puppet/spec/classes/congress_db_spec.rb (renamed from components/congress/puppet/spec/classes/congress_db_spec.rb)0
-rw-r--r--components/congress/install/puppet/spec/classes/congress_keystone_auth_spec.rb (renamed from components/congress/puppet/spec/classes/congress_keystone_auth_spec.rb)0
-rw-r--r--components/congress/install/puppet/spec/classes/congress_logging_spec.rb (renamed from components/congress/puppet/spec/classes/congress_logging_spec.rb)0
-rw-r--r--components/congress/install/puppet/spec/classes/congress_policy_spec.rb (renamed from components/congress/puppet/spec/classes/congress_policy_spec.rb)0
-rw-r--r--components/congress/install/puppet/spec/shared_examples.rb (renamed from components/congress/puppet/spec/shared_examples.rb)0
-rw-r--r--components/congress/install/puppet/spec/unit/provider/congress_config/ini_setting_spec.rb (renamed from components/congress/puppet/spec/unit/provider/congress_config/ini_setting_spec.rb)0
-rw-r--r--components/congress/install/puppet/spec/unit/type/congress_config_spec.rb (renamed from components/congress/puppet/spec/unit/type/congress_config_spec.rb)0
-rw-r--r--components/congress/install/puppet/tests/init.pp (renamed from components/congress/puppet/tests/init.pp)0
40 files changed, 382 insertions, 0 deletions
diff --git a/components/congress/ansible/README.txt b/components/congress/install/ansible/README.txt
index e664217..e664217 100644
--- a/components/congress/ansible/README.txt
+++ b/components/congress/install/ansible/README.txt
diff --git a/components/congress/ansible/build_congress.yml b/components/congress/install/ansible/build_congress.yml
index 572f330..572f330 100644
--- a/components/congress/ansible/build_congress.yml
+++ b/components/congress/install/ansible/build_congress.yml
diff --git a/components/congress/ansible/config.yml b/components/congress/install/ansible/config.yml
index cf94414..cf94414 100644
--- a/components/congress/ansible/config.yml
+++ b/components/congress/install/ansible/config.yml
diff --git a/components/congress/ansible/deploy_congress.yml b/components/congress/install/ansible/deploy_congress.yml
index b3e311c..b3e311c 100644
--- a/components/congress/ansible/deploy_congress.yml
+++ b/components/congress/install/ansible/deploy_congress.yml
diff --git a/components/congress/ansible/hosts.ini b/components/congress/install/ansible/hosts.ini
index 341bf16..341bf16 100644
--- a/components/congress/ansible/hosts.ini
+++ b/components/congress/install/ansible/hosts.ini
diff --git a/components/congress/ansible/roles/deploy/tasks/main.yml b/components/congress/install/ansible/roles/deploy/tasks/main.yml
index 3806034..3806034 100644
--- a/components/congress/ansible/roles/deploy/tasks/main.yml
+++ b/components/congress/install/ansible/roles/deploy/tasks/main.yml
diff --git a/components/congress/ansible/roles/deploy/templates/congress-api.conf b/components/congress/install/ansible/roles/deploy/templates/congress-api.conf
index 4eae24d..4eae24d 100644
--- a/components/congress/ansible/roles/deploy/templates/congress-api.conf
+++ b/components/congress/install/ansible/roles/deploy/templates/congress-api.conf
diff --git a/components/congress/ansible/roles/deploy/templates/congress-api.service b/components/congress/install/ansible/roles/deploy/templates/congress-api.service
index 224760b..224760b 100644
--- a/components/congress/ansible/roles/deploy/templates/congress-api.service
+++ b/components/congress/install/ansible/roles/deploy/templates/congress-api.service
diff --git a/components/congress/ansible/roles/deploy/templates/congress.conf b/components/congress/install/ansible/roles/deploy/templates/congress.conf
index 86b78a9..86b78a9 100644
--- a/components/congress/ansible/roles/deploy/templates/congress.conf
+++ b/components/congress/install/ansible/roles/deploy/templates/congress.conf
diff --git a/components/congress/joid/clean_congress.sh b/components/congress/install/bash/centos/clean_congress.sh
index 4ab21a4..4ab21a4 100644
--- a/components/congress/joid/clean_congress.sh
+++ b/components/congress/install/bash/centos/clean_congress.sh
diff --git a/components/congress/install/bash/centos/install_congress_1.sh b/components/congress/install/bash/centos/install_congress_1.sh
new file mode 100644
index 0000000..47137ae
--- /dev/null
+++ b/components/congress/install/bash/centos/install_congress_1.sh
@@ -0,0 +1,171 @@
+#!/bin/bash
+# Copyright 2015-2016 AT&T Intellectual Property, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# This is script 1 of 2 for installation of Congress on the Centos 7 based
+# OPNFV Controller node as installed per the OPNFV Apex project.
+# Prequisites:
+# OPFNV install per https://wiki.opnfv.org/display/copper/Apex
+# 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
+# source copper/components/install/bash/centos/install_congress_1.sh
+
+if [ $# -gt 1 ] && [ $2 == "debug" ]; then set -x #echo on
+fi
+
+cd ~
+source ~/stackrc
+
+# Get addresses of Controller node(s)
+export CONTROLLER_HOST1=$(openstack server list | awk "/overcloud-controller-0/ { print \$8 }" | sed 's/ctlplane=//g')
+export CONTROLLER_HOST2=$(openstack server list | awk "/overcloud-controller-1/ { print \$8 }" | sed 's/ctlplane=//g')
+
+# puppet apply -e "user { 'congress': ensure => present, password => sha1('congress'), }"
+# ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ssh heat-admin@$CONTROLLER_HOST1 "useradd congress; exit"
+
+echo "Create the environment file and copy to the congress server"
+cat <<EOF >~/env.sh
+export CONGRESS_HOST=$CONTROLLER_HOST1
+export KEYSTONE_HOST=$CONTROLLER_HOST1
+export CEILOMETER_HOST=$CONTROLLER_HOST1
+export CINDER_HOST=$CONTROLLER_HOST1
+export GLANCE_HOST=$CONTROLLER_HOST1
+export NEUTRON_HOST=$CONTROLLER_HOST1
+export NOVA_HOST=$CONTROLLER_HOST1
+EOF
+source ~/env.sh
+scp ~/stackrc heat-admin@$CONTROLLER_HOST1:/home/heat-admin/admin-openrc.sh
+scp ~/env.sh heat-admin@$CONTROLLER_HOST1:/home/heat-admin
+
+echo "Copy install_congress_2.sh to the congress server and execute"
+scp ~/git/copper/components/congress/joid/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"
+
+echo "Update package repos"
+sudo apt-get update
+
+echo "install pip"
+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
+sudo pip install --upgrade pip virtualenv setuptools pbr tox
+
+echo "Clone congress"
+mkdir ~/git
+cd ~/git
+git clone https://github.com/openstack/congress.git
+cd congress
+git checkout stable/liberty
+
+echo "Create virtualenv"
+virtualenv ~/git/congress
+source bin/activate
+
+echo "Install and test OpenStack client"
+cd ~/git
+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 .
+openstack service list
+
+echo "Install and test Congress client"
+cd ~/git
+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
+
+echo "Install and test Keystone client"
+cd ~/git
+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 .
+
+echo "setup Congress user. TODO: needs update in http://congress.readthedocs.org/en/latest/readme.html#installing-congress"
+pip install cliff --upgrade
+export ADMIN_ROLE=$(openstack role list | awk "/ admin / { print \$2 }")
+export SERVICE_TENANT=$(openstack project list | awk "/ admin / { print \$2 }")
+openstack user create --password congress --project admin --email "congress@example.com" congress
+export CONGRESS_USER=$(openstack user list | awk "/ congress / { print \$2 }")
+openstack role add --user $CONGRESS_USER --project $SERVICE_TENANT $ADMIN_ROLE
+
+echo "Create Congress service"
+openstack service create congress --type "policy" --description "Congress Service"
+export CONGRESS_SERVICE=$(openstack service list | awk "/ congress / { print \$2 }")
+
+echo "Create Congress endpoint"
+openstack endpoint create $CONGRESS_SERVICE \
+ --region $OS_REGION_NAME \
+ --publicurl http://$CONGRESS_HOST:1789/ \
+ --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 "~/git/congress/bin/congress-server &>/dev/null &"
+
+echo "Wait 30 seconds for Congress service to startup"
+sleep 30
+
+echo "Create data sources"
+# To remove datasources: openstack congress datasource delete <name>
+openstack congress datasource create nova "nova" \
+ --config username=$OS_USERNAME \
+ --config tenant_name=$OS_TENANT_NAME \
+ --config password=$OS_PASSWORD \
+ --config auth_url=http://$KEYSTONE_HOST:5000/v2.0
+openstack congress datasource create neutronv2 "neutronv2" \
+ --config username=$OS_USERNAME \
+ --config tenant_name=$OS_TENANT_NAME \
+ --config password=$OS_PASSWORD \
+ --config auth_url=http://$KEYSTONE_HOST:5000/v2.0
+openstack congress datasource create ceilometer "ceilometer" \
+ --config username=$OS_USERNAME \
+ --config tenant_name=$OS_TENANT_NAME \
+ --config password=$OS_PASSWORD \
+ --config auth_url=http://$KEYSTONE_HOST:5000/v2.0
+openstack congress datasource create cinder "cinder" \
+ --config username=$OS_USERNAME \
+ --config tenant_name=$OS_TENANT_NAME \
+ --config password=$OS_PASSWORD \
+ --config auth_url=http://$KEYSTONE_HOST:5000/v2.0
+openstack congress datasource create glancev2 "glancev2" \
+ --config username=$OS_USERNAME \
+ --config tenant_name=$OS_TENANT_NAME \
+ --config password=$OS_PASSWORD \
+ --config auth_url=http://$KEYSTONE_HOST:5000/v2.0
+openstack congress datasource create keystone "keystone" \
+ --config username=$OS_USERNAME \
+ --config tenant_name=$OS_TENANT_NAME \
+ --config password=$OS_PASSWORD \
+ --config auth_url=http://$KEYSTONE_HOST:5000/v2.0
+
+echo "Install tox test dependencies"
+sudo apt-get install -y libffi-dev libssl-dev
+
+echo "Run Congress tox Tests"
+cd ~/git/congress
+tox -epy27
+
+set +x #echo off
diff --git a/components/congress/install/bash/centos/install_congress_2.sh b/components/congress/install/bash/centos/install_congress_2.sh
new file mode 100644
index 0000000..588c780
--- /dev/null
+++ b/components/congress/install/bash/centos/install_congress_2.sh
@@ -0,0 +1,165 @@
+#!/bin/bash
+# Copyright 2015-2016 AT&T Intellectual Property, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# This is script 2 of 2 for installation of Congress on the Centos 7 based
+# OPNFV Controller node as installed per the OPNFV Apex project.
+# Prequisites:
+# OPFNV install per https://wiki.opnfv.org/display/copper/Apex
+# 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
+# source copper/components/install/bash/centos/install_congress_1.sh
+
+set -x
+source ~/admin-openrc.sh
+source ~/env.sh
+
+echo "install pip"
+sudo yum install python-pip -y
+
+echo "install java"
+sudo yum install default-jre -y
+# No package default-jre available.
+
+echo "install other dependencies"
+sudo yum install apg git gcc python-dev libxml2 libxslt1-dev libzip-dev -y
+# No package python-dev available.
+# No package libxslt1-dev available.
+# No package libzip-dev available.
+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)
+sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password '$MYSQL_PASSWORD
+sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password '$MYSQL_PASSWORD
+sudo -E yum -q -y install mysql-server python-mysqldb
+
+echo "Clone congress"
+mkdir ~/git
+cd ~/git
+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
+mkdir -p /etc/congress/snapshot
+sudo mkdir /var/log/congress
+sudo chown ubuntu /var/log/congress
+cp etc/api-paste.ini /etc/congress
+cp etc/policy.json /etc/congress
+
+echo "install requirements.txt and tox dependencies (detected by errors during 'tox -egenconfig')"
+sudo yum install libffi-dev -y
+sudo yum install openssl -y
+sudo yum install libssl-dev -y
+
+echo "install dependencies of Congress"
+cd ~/git/congress
+bin/pip install -r requirements.txt
+bin/pip install .
+
+echo "install tox"
+bin/pip install tox
+
+echo "generate congress.conf.sample"
+tox -egenconfig
+
+echo "edit congress.conf.sample as needed"
+sed -i -- 's/#verbose = true/verbose = true/g' etc/congress.conf.sample
+sed -i -- 's/#log_file = <None>/log_file = congress.log/g' etc/congress.conf.sample
+sed -i -- 's/#log_dir = <None>/log_dir = \/var\/log\/congress/g' etc/congress.conf.sample
+sed -i -- 's/#bind_host = 0.0.0.0/bind_host = '$CONGRESS_HOST'/g' etc/congress.conf.sample
+sed -i -- 's/#policy_path = <None>/policy_path = \/etc\/congress\/snapshot/g' etc/congress.conf.sample
+sed -i -- 's/#auth_strategy = keystone/auth_strategy = noauth/g' etc/congress.conf.sample
+sed -i -- 's/#drivers =/drivers = congress.datasources.neutronv2_driver.NeutronV2Driver,congress.datasources.glancev2_driver.GlanceV2Driver,congress.datasources.nova_driver.NovaDriver,congress.datasources.keystone_driver.KeystoneDriver,congress.datasources.ceilometer_driver.CeilometerDriver,congress.datasources.cinder_driver.CinderDriver/g' etc/congress.conf.sample
+sed -i -- 's/#auth_host = 127.0.0.1/auth_host = '$CONGRESS_HOST'/g' etc/congress.conf.sample
+sed -i -- 's/#auth_port = 35357/auth_port = 35357/g' etc/congress.conf.sample
+sed -i -- 's/#auth_protocol = https/auth_protocol = http/g' etc/congress.conf.sample
+sed -i -- 's/#admin_tenant_name = admin/admin_tenant_name = admin/g' etc/congress.conf.sample
+sed -i -- 's/#admin_user = <None>/admin_user = congress/g' etc/congress.conf.sample
+sed -i -- 's/#admin_password = <None>/admin_password = congress/g' etc/congress.conf.sample
+sed -i -- 's/#connection = <None>/connection = mysql:\/\/ubuntu:'$MYSQL_PASSWORD'@localhost:3306\/congress/g' etc/congress.conf.sample
+
+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"';"
+
+echo "install congress-db-manage dependencies (detected by errors)"
+sudo yum build-dep python-mysqldb -y
+bin/pip install MySQL-python
+
+echo "create database schema"
+congress-db-manage --config-file /etc/congress/congress.conf upgrade head
+
+echo "Install Congress client"
+cd ~/git
+git clone https://github.com/openstack/python-congressclient.git
+cd python-congressclient
+git checkout stable/liberty
+../congress/bin/pip install -r requirements.txt
+../congress/bin/pip install .
+
+function _congress_setup_horizon {
+ local HORIZON_DIR="/usr/share/openstack-dashboard"
+ local CONGRESS_HORIZON_DIR="/home/ubuntu/git/congress/contrib/horizon"
+ sudo cp -r $CONGRESS_HORIZON_DIR/datasources $HORIZON_DIR/openstack_dashboard/dashboards/admin/
+ sudo cp -r $CONGRESS_HORIZON_DIR/policies $HORIZON_DIR/openstack_dashboard/dashboards/admin/
+ sudo cp -r $CONGRESS_HORIZON_DIR/static $HORIZON_DIR/openstack_dashboard/dashboards/admin/
+ sudo cp -r $CONGRESS_HORIZON_DIR/templates $HORIZON_DIR/openstack_dashboard/dashboards/admin/
+ sudo cp $CONGRESS_HORIZON_DIR/congress.py $HORIZON_DIR/openstack_dashboard/api/
+ sudo cp $CONGRESS_HORIZON_DIR/_50_policy.py $HORIZON_DIR/openstack_dashboard/local/enabled/
+ sudo cp $CONGRESS_HORIZON_DIR/_60_policies.py $HORIZON_DIR/openstack_dashboard/local/enabled/
+ sudo cp $CONGRESS_HORIZON_DIR/_70_datasources.py $HORIZON_DIR/openstack_dashboard/local/enabled/
+
+ # For unit tests
+ sudo sh -c 'echo "python-congressclient" >> '$HORIZON_DIR'/requirements.txt'
+ sudo sh -c 'echo -e \
+"\n# Load the pluggable dashboard settings"\
+"\nimport openstack_dashboard.local.enabled"\
+"\nfrom openstack_dashboard.utils import settings"\
+"\n\nINSTALLED_APPS = list(INSTALLED_APPS)"\
+"\nsettings.update_dashboards(["\
+"\n openstack_dashboard.local.enabled,"\
+"\n], HORIZON_CONFIG, INSTALLED_APPS)" >> '$HORIZON_DIR'/openstack_dashboard/test/settings.py'
+
+ # Setup alias for django-admin which could be different depending on distro
+ local django_admin
+ if type -p django-admin > /dev/null; then
+ django_admin=django-admin
+ else
+ django_admin=django-admin.py
+ fi
+
+ # Collect and compress static files (e.g., JavaScript, CSS)
+ DJANGO_SETTINGS_MODULE=openstack_dashboard.settings $django_admin collectstatic --noinput
+ DJANGO_SETTINGS_MODULE=openstack_dashboard.settings $django_admin compress --force
+
+ # Restart Horizon
+ sudo service apache2 restart
+}
+# Commented out as the procedure is not yet working
+#echo "Install Horizon Policy plugin"
+#_congress_setup_horizon
+
+set +x #echo off
diff --git a/components/congress/install/joid/clean_congress.sh b/components/congress/install/joid/clean_congress.sh
new file mode 100644
index 0000000..4ab21a4
--- /dev/null
+++ b/components/congress/install/joid/clean_congress.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+# CCopyright 2015-2016 AT&T Intellectual Property, Inc
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# This is a cleanup script for installation of Congress on an Ubuntu 14.04
+# LXC container in the OPNFV Controller node.
+# Presumably something has failed, and any record of the Congress feature
+# in OpenStack needs to be removed, so you can try the install again.
+#
+# Prequisite: OPFNV install per https://wiki.opnfv.org/copper/academy/joid
+# How to use:
+# Install OPNFV per https://wiki.opnfv.org/copper/academy/joid
+# $ source ~/git/copper/components/congress/joid/clean_congress.sh <controller_hostname>
+# <controller_hostname> is the name of the controller node in MAAS.
+
+source ~/admin-openrc.sh <<EOF
+openstack
+EOF
+source ~/env.sh
+set -x echo on
+juju ssh ubuntu@$1 "sudo lxc-stop --name juju-trusty-congress; sudo lxc-destroy --name juju-trusty-congress; exit"
+
+# Delete Congress user
+export CONGRESS_USER=$(openstack user list | awk "/ congress / { print \$2 }")
+if [ "$CONGRESS_USER" != "" ]; then
+ openstack user delete $CONGRESS_USER
+fi
+
+# Delete Congress service
+export CONGRESS_SERVICE=$(openstack service list | awk "/ congress / { print \$2 }")
+if [ "$CONGRESS_SERVICE" != "" ]; then
+ openstack service delete $CONGRESS_SERVICE
+fi
+set -x echo off
+
diff --git a/components/congress/joid/install_congress_1.sh b/components/congress/install/joid/install_congress_1.sh
index 61ac722..61ac722 100644
--- a/components/congress/joid/install_congress_1.sh
+++ b/components/congress/install/joid/install_congress_1.sh
diff --git a/components/congress/joid/install_congress_2.sh b/components/congress/install/joid/install_congress_2.sh
index 312a0c3..312a0c3 100644
--- a/components/congress/joid/install_congress_2.sh
+++ b/components/congress/install/joid/install_congress_2.sh
diff --git a/components/congress/puppet/lib/puppet/provider/congress_config/ini_setting.rb b/components/congress/install/puppet/lib/puppet/provider/congress_config/ini_setting.rb
index 3d324b6..3d324b6 100644
--- a/components/congress/puppet/lib/puppet/provider/congress_config/ini_setting.rb
+++ b/components/congress/install/puppet/lib/puppet/provider/congress_config/ini_setting.rb
diff --git a/components/congress/puppet/lib/puppet/type/congress_config.rb b/components/congress/install/puppet/lib/puppet/type/congress_config.rb
index 3b76fc6..3b76fc6 100644
--- a/components/congress/puppet/lib/puppet/type/congress_config.rb
+++ b/components/congress/install/puppet/lib/puppet/type/congress_config.rb
diff --git a/components/congress/puppet/manifests/client.pp b/components/congress/install/puppet/manifests/client.pp
index bb016e4..bb016e4 100644
--- a/components/congress/puppet/manifests/client.pp
+++ b/components/congress/install/puppet/manifests/client.pp
diff --git a/components/congress/puppet/manifests/config.pp b/components/congress/install/puppet/manifests/config.pp
index 0a59d07..0a59d07 100644
--- a/components/congress/puppet/manifests/config.pp
+++ b/components/congress/install/puppet/manifests/config.pp
diff --git a/components/congress/puppet/manifests/db.pp b/components/congress/install/puppet/manifests/db.pp
index 33dccc4..33dccc4 100644
--- a/components/congress/puppet/manifests/db.pp
+++ b/components/congress/install/puppet/manifests/db.pp
diff --git a/components/congress/puppet/manifests/db/mysql.pp b/components/congress/install/puppet/manifests/db/mysql.pp
index 456b812..456b812 100644
--- a/components/congress/puppet/manifests/db/mysql.pp
+++ b/components/congress/install/puppet/manifests/db/mysql.pp
diff --git a/components/congress/puppet/manifests/db/postgresql.pp b/components/congress/install/puppet/manifests/db/postgresql.pp
index 4766eca..4766eca 100644
--- a/components/congress/puppet/manifests/db/postgresql.pp
+++ b/components/congress/install/puppet/manifests/db/postgresql.pp
diff --git a/components/congress/puppet/manifests/db/sync.pp b/components/congress/install/puppet/manifests/db/sync.pp
index bb07f7e..bb07f7e 100644
--- a/components/congress/puppet/manifests/db/sync.pp
+++ b/components/congress/install/puppet/manifests/db/sync.pp
diff --git a/components/congress/puppet/manifests/init.pp b/components/congress/install/puppet/manifests/init.pp
index a1367c3..a1367c3 100644
--- a/components/congress/puppet/manifests/init.pp
+++ b/components/congress/install/puppet/manifests/init.pp
diff --git a/components/congress/puppet/manifests/keystone/auth.pp b/components/congress/install/puppet/manifests/keystone/auth.pp
index 13be1f0..13be1f0 100644
--- a/components/congress/puppet/manifests/keystone/auth.pp
+++ b/components/congress/install/puppet/manifests/keystone/auth.pp
diff --git a/components/congress/puppet/manifests/logging.pp b/components/congress/install/puppet/manifests/logging.pp
index 7bcdc00..7bcdc00 100644
--- a/components/congress/puppet/manifests/logging.pp
+++ b/components/congress/install/puppet/manifests/logging.pp
diff --git a/components/congress/puppet/manifests/params.pp b/components/congress/install/puppet/manifests/params.pp
index f2ceed0..f2ceed0 100644
--- a/components/congress/puppet/manifests/params.pp
+++ b/components/congress/install/puppet/manifests/params.pp
diff --git a/components/congress/puppet/manifests/policy.pp b/components/congress/install/puppet/manifests/policy.pp
index cdca472..cdca472 100644
--- a/components/congress/puppet/manifests/policy.pp
+++ b/components/congress/install/puppet/manifests/policy.pp
diff --git a/components/congress/puppet/manifests/service.pp b/components/congress/install/puppet/manifests/service.pp
index f802e9a..f802e9a 100644
--- a/components/congress/puppet/manifests/service.pp
+++ b/components/congress/install/puppet/manifests/service.pp
diff --git a/components/congress/puppet/metadata.json b/components/congress/install/puppet/metadata.json
index e94dd68..e94dd68 100644
--- a/components/congress/puppet/metadata.json
+++ b/components/congress/install/puppet/metadata.json
diff --git a/components/congress/puppet/spec/classes/congress_db_mysql_spec.rb b/components/congress/install/puppet/spec/classes/congress_db_mysql_spec.rb
index 6370bac..6370bac 100644
--- a/components/congress/puppet/spec/classes/congress_db_mysql_spec.rb
+++ b/components/congress/install/puppet/spec/classes/congress_db_mysql_spec.rb
diff --git a/components/congress/puppet/spec/classes/congress_db_postgresql_spec.rb b/components/congress/install/puppet/spec/classes/congress_db_postgresql_spec.rb
index 74abbdb..74abbdb 100644
--- a/components/congress/puppet/spec/classes/congress_db_postgresql_spec.rb
+++ b/components/congress/install/puppet/spec/classes/congress_db_postgresql_spec.rb
diff --git a/components/congress/puppet/spec/classes/congress_db_spec.rb b/components/congress/install/puppet/spec/classes/congress_db_spec.rb
index 3b84993..3b84993 100644
--- a/components/congress/puppet/spec/classes/congress_db_spec.rb
+++ b/components/congress/install/puppet/spec/classes/congress_db_spec.rb
diff --git a/components/congress/puppet/spec/classes/congress_keystone_auth_spec.rb b/components/congress/install/puppet/spec/classes/congress_keystone_auth_spec.rb
index 3cb7e59..3cb7e59 100644
--- a/components/congress/puppet/spec/classes/congress_keystone_auth_spec.rb
+++ b/components/congress/install/puppet/spec/classes/congress_keystone_auth_spec.rb
diff --git a/components/congress/puppet/spec/classes/congress_logging_spec.rb b/components/congress/install/puppet/spec/classes/congress_logging_spec.rb
index 0bfb994..0bfb994 100644
--- a/components/congress/puppet/spec/classes/congress_logging_spec.rb
+++ b/components/congress/install/puppet/spec/classes/congress_logging_spec.rb
diff --git a/components/congress/puppet/spec/classes/congress_policy_spec.rb b/components/congress/install/puppet/spec/classes/congress_policy_spec.rb
index d4e08ca..d4e08ca 100644
--- a/components/congress/puppet/spec/classes/congress_policy_spec.rb
+++ b/components/congress/install/puppet/spec/classes/congress_policy_spec.rb
diff --git a/components/congress/puppet/spec/shared_examples.rb b/components/congress/install/puppet/spec/shared_examples.rb
index fec0eac..fec0eac 100644
--- a/components/congress/puppet/spec/shared_examples.rb
+++ b/components/congress/install/puppet/spec/shared_examples.rb
diff --git a/components/congress/puppet/spec/unit/provider/congress_config/ini_setting_spec.rb b/components/congress/install/puppet/spec/unit/provider/congress_config/ini_setting_spec.rb
index 0c4b9fa..0c4b9fa 100644
--- a/components/congress/puppet/spec/unit/provider/congress_config/ini_setting_spec.rb
+++ b/components/congress/install/puppet/spec/unit/provider/congress_config/ini_setting_spec.rb
diff --git a/components/congress/puppet/spec/unit/type/congress_config_spec.rb b/components/congress/install/puppet/spec/unit/type/congress_config_spec.rb
index 22a70a1..22a70a1 100644
--- a/components/congress/puppet/spec/unit/type/congress_config_spec.rb
+++ b/components/congress/install/puppet/spec/unit/type/congress_config_spec.rb
diff --git a/components/congress/puppet/tests/init.pp b/components/congress/install/puppet/tests/init.pp
index 922b1cb..922b1cb 100644
--- a/components/congress/puppet/tests/init.pp
+++ b/components/congress/install/puppet/tests/init.pp