There are 2 ways to install Congress.
For integrating Congress with DevStack:
$ git clone https://git.openstack.org/openstack-dev/devstack.git
$ cd devstack
local.conf
file (inside the DevStack directory). Here is what
our file looks like:[[local|localrc]]
enable_plugin congress https://git.openstack.org/openstack/congress
enable_plugin heat https://git.openstack.org/openstack/heat
enable_plugin aodh https://git.openstack.org/openstack/aodh
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer
enable_service s-proxy s-object s-container s-account
stack.sh
. The default configuration expects the passwords to be ‘password’
without the quotes$ ./stack.sh
Install the following software, if you haven’t already.
$ sudo apt-get install git gcc python-dev python-antlr3 libxml2 libxslt1-dev libzip-dev build-essential libssl-dev libffi-dev
$ sudo apt install python-setuptools
$ sudo pip install --upgrade pip virtualenv pbr tox
Clone Congress
$ git clone https://github.com/openstack/congress.git
$ cd congress
Install requirements
$ sudo pip install .
Install Source code
$ sudo python setup.py install
Configure Congress (Assume you put config files in /etc/congress)
$ sudo mkdir -p /etc/congress
$ sudo mkdir -p /etc/congress/snapshot
$ sudo cp etc/api-paste.ini /etc/congress
$ sudo cp etc/policy.json /etc/congress
$ sudo cp -r library /etc/congress/.
Generate a configuration file as outlined in the Configuration Options section of the Deployment document. Note: you may have to run the command with sudo.
There are several sections in the congress/etc/congress.conf.sample file you may want to change:
Add 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,congress.datasources.swift_driver.SwiftDriver,congress.datasources.plexxi_driver.PlexxiDriver,congress.datasources.vCenter_driver.VCenterDriver,congress.datasources.murano_driver.MuranoDriver,congress.datasources.ironic_driver.IronicDriver
The default auth_strategy is keystone. To set Congress to use no authorization strategy:
auth_strategy = noauth
If you use noauth, you might want to delete or comment out the [keystone_authtoken] section.
Set the database connection string in the [database] section (adapt MySQL root password):
connection = mysql+pymysql://root:password@127.0.0.1/congress?charset=utf8
To use RabbitMQ with Congress, set the transport_url in the “From oslo.messaging” section according to your setup:
transport_url = rabbit://$RABBIT_USERID:$RABBIT_PASSWORD@$RABBIT_HOST:5672
A bare-bones congress.conf is as follows:
[DEFAULT]
auth_strategy = noauth
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,congress.datasources.swift_driver.SwiftDriver,congress.datasources.plexxi_driver.PlexxiDriver,congress.datasources.vCenter_driver.VCenterDriver,congress.datasources.murano_driver.MuranoDriver,congress.datasources.ironic_driver.IronicDriver
log_file=congress.log
log_dir=/var/log/congress
[database]
connection = mysql+pymysql://root:password@127.0.0.1/congress?charset=utf8
When you are finished editing congress.conf.sample, copy it to the /etc/congress directory.
sudo cp etc/congress.conf.sample /etc/congress/congress.conf
Create database
$ mysql -u root -p
$ mysql> CREATE DATABASE congress;
$ mysql> GRANT ALL PRIVILEGES ON congress.* TO 'congress'@'localhost' IDENTIFIED BY 'CONGRESS_DBPASS';
$ mysql> GRANT ALL PRIVILEGES ON congress.* TO 'congress'@'%' IDENTIFIED BY 'CONGRESS_DBPASS';
Push down schema
$ sudo congress-db-manage --config-file /etc/congress/congress.conf upgrade head
Use your OpenStack RC file to set and export required environment variables: OS_USERNAME, OS_PASSWORD, OS_PROJECT_NAME, OS_TENANT_NAME, OS_AUTH_URL.
(Adapt parameters according to your environment)
$ ADMIN_ROLE=$(openstack role list | awk "/ admin / { print \$2 }")
$ SERVICE_TENANT=$(openstack project list | awk "/ service / { print \$2 }")
$ CONGRESS_USER=$(openstack user create --password password --project service --email "congress@example.com" congress | awk "/ id / {print \$4 }")
$ openstack role add $ADMIN_ROLE --user $CONGRESS_USER --project $SERVICE_TENANT
$ CONGRESS_SERVICE=$(openstack service create policy --name congress --description "Congress Service" | awk "/ id / { print \$4 }")
Identity v2:
$ openstack endpoint create $CONGRESS_SERVICE --region RegionOne --publicurl https://127.0.0.1:1789/ --adminurl https://127.0.0.1:1789/ --internalurl https://127.0.0.1:1789/
Identity v3:
$ openstack endpoint create --region $OS_REGION_NAME $CONGRESS_SERVICE public https://$SERVICE_HOST:1789
$ openstack endpoint create --region $OS_REGION_NAME $CONGRESS_SERVICE admin https://$SERVICE_HOST:1789
$ openstack endpoint create --region $OS_REGION_NAME $CONGRESS_SERVICE internal https://$SERVICE_HOST:1789
$ sudo /usr/local/bin/congress-server --debug
$ openstack congress datasource create $SERVICE $"SERVICE" \
--config username=$OS_USERNAME \
--config tenant_name=$OS_TENANT_NAME
--config password=$OS_PASSWORD
--config auth_url=https://$SERVICE_HOST:5000/v2.0
Clone congress-dashboard repo, located here https://github.com/openstack/congress-dashboard Follow the instructions in the README file located in https://github.com/openstack/congress-dashboard/blob/master/README.rst for further installation.
Note: After you install the Congress Dashboard and restart apache, the OpenStack Dashboard may throw a “You have offline compression enabled…” error, follow the instructions in the error message. You may have to:
$ cd /opt/stack/horizon
$ python manage.py compress
$ sudo service apache2 restart
$ sudo pip install sphinx
$ sudo pip install oslosphinx
$ make docs
If you are not familiar with using the OpenStack command-line clients, please read the OpenStack documentation before proceeding.
Once you have set up or obtained credentials to use the OpenStack command-line clients, you may begin testing Congress. During installation a number of policies are created.
To view policies: $ openstack congress policy list
To view installed datasources: $ openstack congress datasource list
To list available commands: $ openstack congress –help
Here are the instructions for upgrading to a new release of the Congress server.
$ cd /path/to/congress
$ git fetch origin
3. Checkout the release you are interested in, say Mitaka. Note that this step will not succeed if you have any uncommitted changes in the repo.
$ git checkout origin/stable/mitaka
If you have changes committed locally that are not merged into the public repository, you now need to cherry-pick those changes onto the new branch.
$ sudo pip install
$ sudo python setup.py install
$ sudo congress-db-manage --config-file /etc/congress/congress.conf upgrade head
etc/congress.conf.sample
for you to examine.$ tox -egenconfig
$ sudo /usr/local/bin/congress-server --debug
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.