#!/bin/bash # Copyright 2015-2016 Open Platform for NFV Project, Inc. and its contributors # # 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 4 of 4 for installation of Congress on an Ubuntu 14.04 # LXC container in the OPNFV Controller node. # Prequisite: OPFNV install per https://wiki.opnfv.org/copper/academy/joid # # On jumphost: # Download admin-openrc.sh from Horizon and save in ~ # source ~/git/copper/components/congress/joid/install_congress_1.sh # (copies install_congress_2.sh to node1-control and executes it) # Edit install_congress_3.sh with the congress host address from lxc_info # - Congress server IP address as discovered in lxc-info above # source ~/git/copper/components/congress/joid/install_congress_3.sh source ~/admin-openrc.sh </log_file = congress.log/g' etc/congress.conf.sample sudo sed -i -- 's/#log_dir = /log_dir = \/var\/log\/congress/g' etc/congress.conf.sample sudo sed -i -- 's/#bind_host = 0.0.0.0/bind_host = '$CONGRESS_HOST'/g' etc/congress.conf.sample sudo sed -i -- 's/#policy_path = /policy_path = \/etc\/congress\/snapshot/g' etc/congress.conf.sample sudo sed -i -- 's/#auth_strategy = keystone/auth_strategy = noauth/g' etc/congress.conf.sample sudo 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 sudo sed -i -- 's/#auth_host = 127.0.0.1/auth_host = '$CONGRESS_HOST'/g' etc/congress.conf.sample sudo sed -i -- 's/#auth_port = 35357/auth_port = 35357/g' etc/congress.conf.sample sudo sed -i -- 's/#auth_protocol = https/auth_protocol = http/g' etc/congress.conf.sample sudo sed -i -- 's/#admin_tenant_name = admin/admin_tenant_name = admin/g' etc/congress.conf.sample sudo sed -i -- 's/#admin_user = /admin_user = congress/g' etc/congress.conf.sample sudo sed -i -- 's/#admin_password = /admin_password = congress/g' etc/congress.conf.sample sudo sed -i -- 's/#connection = /connection = mysql:\/\/ubuntu:opnfvmysql@localhost:3306\/congress/g' etc/congress.conf.sample # copy congress.conf.sample to /etc/congress sudo cp etc/congress.conf.sample /etc/congress/congress.conf # create congress database sudo mysql --user=root --password=opnfvmysql < # May need to 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 \ --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 # Run Congress Tempest Tests cd ~/git/congress # tox -epy27