summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/congress/install/bash/install_congress_1.sh2
-rw-r--r--components/congress/install/bash/install_congress_2.sh28
2 files changed, 29 insertions, 1 deletions
diff --git a/components/congress/install/bash/install_congress_1.sh b/components/congress/install/bash/install_congress_1.sh
index 423e887..d8d05a1 100644
--- a/components/congress/install/bash/install_congress_1.sh
+++ b/components/congress/install/bash/install_congress_1.sh
@@ -198,7 +198,7 @@ ssh -x -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $CTLUSER@$CON
echo "Wait 30 seconds for Congress service to startup"
sleep 30
-
+Creates and activates a virtualenv environment for Congress in the repo clone, to avoid messing up the Jumphost
echo "Create data sources"
# To remove datasources: openstack congress datasource delete <name>
openstack congress datasource create nova "nova" \
diff --git a/components/congress/install/bash/install_congress_2.sh b/components/congress/install/bash/install_congress_2.sh
index 580b603..17b6475 100644
--- a/components/congress/install/bash/install_congress_2.sh
+++ b/components/congress/install/bash/install_congress_2.sh
@@ -154,6 +154,34 @@ pip install .
echo "Install python fixtures"
pip install fixtures
+echo "Setup congress-server in init.d"
+cat > /tmp/congress-server << EOC
+#!/bin/bash
+source ~/congress/venv/bin/activate
+~/congress/congress/bin/congress-server &>/dev/null
+EOC
+sudo mv /tmp/congress-server /etc/init.d/congress-server
+
+echo "Setup systemd service"
+cat > /tmp/openstack-congress.service << EOC
+[Unit]
+Description=OpenStack Congress Server
+After=syslog.target network.target
+[Service]
+Type=notify
+NotifyAccess=all
+TimeoutStartSec=0
+Restart=always
+User=root
+ExecStart=/etc/init.d/congress-server start
+ExecStop=/etc/init.d/congress-server stop
+[Install]
+WantedBy=multi-user.target
+EOC
+sudo mv /tmp/openstack-congress.service /usr/lib/systemd/system/openstack-congress.service
+chmod 644 /usr/lib/systemd/system/openstack-congress.service
+sudo systemctl daemon-reload
+
# TODO: The rest of this script is not yet tested
function _congress_setup_horizon {
local HORIZON_DIR="/usr/share/openstack-dashboard"