summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2017-01-09 14:23:37 -0500
committerDan Radez <dradez@redhat.com>2017-02-22 09:44:00 -0500
commite1a633529c06a63f9c710317f25e63b8bd574812 (patch)
tree45a1be116c6d637e506f2c476ad04d2df76a9d81
parent1cc0506020c9337dd5d47a7da5c69a5045b4f0fa (diff)
Adding congress support back into Danube
opnfv-tht-pr: 97 opnfv-puppet-tripleo-pr: 10 Change-Id: Idfc109fc984f20b096a23d12864a027146a9c74c Signed-off-by: Dan Radez <dradez@redhat.com>
-rw-r--r--build/Makefile2
-rw-r--r--build/opnfv-environment.yaml1
-rwxr-xr-xbuild/overcloud-opendaylight.sh1
-rw-r--r--build/rpm_specs/openstack-congress-server.service13
-rw-r--r--build/rpm_specs/openstack-congress.spec4
-rwxr-xr-xbuild/undercloud.sh5
-rwxr-xr-xlib/overcloud-deploy-functions.sh5
-rwxr-xr-xlib/post-install-functions.sh6
8 files changed, 25 insertions, 12 deletions
diff --git a/build/Makefile b/build/Makefile
index 3a26b4c..dc63bd3 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -174,7 +174,7 @@ congress-clean:
$(BUILD_DIR)/openstack-congress.tar.gz:
@echo "Preparing the Congress RPM prerequisites"
git clone $(CONGRESS_REPO) -b $(CONGRESS_BRANCH) $(BUILD_DIR)/openstack-congress-2016.2
- cd $(BUILD_DIR)/openstack-congress-2016.2 && curl -O https://radez.fedorapeople.org/openstack-congress.service
+ cp rpm_specs/openstack-congress-server.service $(BUILD_DIR)/openstack-congress-2016.2
tar czf $(BUILD_DIR)/openstack-congress.tar.gz -C $(BUILD_DIR) openstack-congress-2016.2
.PHONY: congress-rpm
diff --git a/build/opnfv-environment.yaml b/build/opnfv-environment.yaml
index 3781e79..30e6899 100644
--- a/build/opnfv-environment.yaml
+++ b/build/opnfv-environment.yaml
@@ -108,6 +108,7 @@ parameter_defaults:
- OS::TripleO::Services::Gluon
- OS::TripleO::Services::Tacker
- OS::TripleO::Services::NeutronHoneycombAgent
+ - OS::TripleO::Services::Congress
ComputeServices:
- OS::TripleO::Services::CACerts
- OS::TripleO::Services::CephClient
diff --git a/build/overcloud-opendaylight.sh b/build/overcloud-opendaylight.sh
index 66bf53a..edca9e3 100755
--- a/build/overcloud-opendaylight.sh
+++ b/build/overcloud-opendaylight.sh
@@ -104,6 +104,7 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--install http://artifacts.opnfv.org/netready/gluon-0.0.1-1_20170216.noarch.rpm \
--upload ${BUILD_DIR}/quagga.tar.gz:/root/ \
--run-command "cd /root/ && tar xzf quagga.tar.gz" \
+ --run-command "yum downgrade -y python-zmq-14.3.1" \
--install zeromq-4.1.4,zeromq-devel-4.1.4 \
--install capnproto-devel,capnproto-libs,capnproto \
-a overcloud-full-opendaylight_build.qcow2
diff --git a/build/rpm_specs/openstack-congress-server.service b/build/rpm_specs/openstack-congress-server.service
new file mode 100644
index 0000000..20c3a67
--- /dev/null
+++ b/build/rpm_specs/openstack-congress-server.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OpenStack Congress Server
+After=syslog.target network.target
+
+[Service]
+Type=simple
+User=congress
+ExecStart=/usr/bin/congress-server --config-file /etc/congress/congress.conf --log-file /var/log/congress/congress.log
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/build/rpm_specs/openstack-congress.spec b/build/rpm_specs/openstack-congress.spec
index f08cd0d..2121193 100644
--- a/build/rpm_specs/openstack-congress.spec
+++ b/build/rpm_specs/openstack-congress.spec
@@ -40,7 +40,7 @@ install etc/policy.json %{buildroot}/etc/congress/policy.json
tox -e genconfig --workdir ../.tox
install etc/congress.conf.sample %{buildroot}/etc/congress/congress.conf
-install -p -D -m 644 openstack-congress.service %{buildroot}%{_unitdir}/openstack-congress.service
+install -p -D -m 644 openstack-congress-server.service %{buildroot}%{_unitdir}/openstack-congress-server.service
install -d -m 755 %{buildroot}%{_sharedstatedir}/congress
%pre
@@ -66,7 +66,7 @@ exit 0
/etc/congress/policy.json
/usr/bin/congress-db-manage
/usr/bin/congress-server
-%{_unitdir}/openstack-congress.service
+%{_unitdir}/openstack-congress-server.service
/usr/lib/python2.7/site-packages/congress
/usr/lib/python2.7/site-packages/congress_dashboard
/usr/lib/python2.7/site-packages/antlr3runtime
diff --git a/build/undercloud.sh b/build/undercloud.sh
index dbe7d2f..9cfd936 100755
--- a/build/undercloud.sh
+++ b/build/undercloud.sh
@@ -51,11 +51,8 @@ LIBGUESTFS_BACKEND=direct virt-customize \
--upload ${BUILD_ROOT}/csit-environment.yaml:/home/stack/ \
--upload ${BUILD_ROOT}/virtual-environment.yaml:/home/stack/ \
--install "python2-congressclient" \
- --run-command "sed -i '/SERVICE_LIST/a\\ \x27congress\x27: {\x27password_field\x27: \x27OVERCLOUD_CONGRESS_PASSWORD\x27},' /usr/lib/python2.7/site-packages/tripleoclient/constants.py" \
- --run-command "sed -i '/PASSWORD_NAMES =/a\\ \"OVERCLOUD_CONGRESS_PASSWORD\",' /usr/lib/python2.7/site-packages/tripleoclient/utils.py" \
- --run-command "sed -i '/AodhPassword/a\\ parameters\[\x27CongressPassword\x27\] = passwords\[\x27OVERCLOUD_CONGRESS_PASSWORD\x27\]' /usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_deploy.py" \
- --run-command "sed -i '/^SERVICES/a\ \x27congress\x27: {\x27description\x27: \x27Congress Service\x27, \x27type\x27: \x27policy\x27, \x27path\x27: \x27/\x27, \x27port\x27: 1789 },' /usr/lib/python2.7/site-packages/os_cloud_config/keystone.py" \
--run-command "sed -i '/SwiftPassword/a\ \x27TackerPassword\x27,' /usr/lib/python2.7/site-packages/tripleo_common/constants.py" \
+ --run-command "sed -i '/CinderPassword/a\ \x27CongressPassword\x27,' /usr/lib/python2.7/site-packages/tripleo_common/constants.py" \
--upload ${BUILD_DIR}/noarch/$tackerclient_pkg:/root/ \
--install /root/$tackerclient_pkg \
--install "python2-aodhclient" \
diff --git a/lib/overcloud-deploy-functions.sh b/lib/overcloud-deploy-functions.sh
index c28c7b0..60aadd6 100755
--- a/lib/overcloud-deploy-functions.sh
+++ b/lib/overcloud-deploy-functions.sh
@@ -58,6 +58,11 @@ function overcloud_deploy {
DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/enable_tacker.yaml"
fi
+ # Enable Congress
+ if [ "${deploy_options_array['congress']}" == 'True' ]; then
+ DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/enable_congress.yaml"
+ fi
+
# Make sure the correct overcloud image is available
if [ ! -f $IMAGES/overcloud-full-${SDN_IMAGE}.qcow2 ]; then
echo "${red} $IMAGES/overcloud-full-${SDN_IMAGE}.qcow2 is required to execute your deployment."
diff --git a/lib/post-install-functions.sh b/lib/post-install-functions.sh
index b723595..22d7c20 100755
--- a/lib/post-install-functions.sh
+++ b/lib/post-install-functions.sh
@@ -129,9 +129,7 @@ if [ "${deploy_options_array['dataplane']}" == 'fdio' ] || [ "${deploy_options_a
done
fi
-# TODO: Change this back to True once everything is back in
-# place with tht and puppet-congress for deployment
-if [ "${deploy_options_array['congress']}" == 'NeverTrue' ]; then
+if [ "${deploy_options_array['congress']}" == 'True' ]; then
ds_configs="--config username=\$OS_USERNAME
--config tenant_name=\$OS_TENANT_NAME
--config password=\$OS_PASSWORD
@@ -268,8 +266,6 @@ if [[ "$ha_enabled" == 'True' ]]; then
echo "${blue}\nChecking pacemaker service status\n${reset}"
fi
overcloud_connect "controller0" "for i in \$(sudo pcs status | grep '^* ' | cut -d ' ' -f 2 | cut -d '_' -f 1 | uniq); do echo \"WARNING: Service: \$i not running\"; done"
- # trozet disable congress in HA until congress bugs are fixed
- overcloud_connect "controller0" "sudo pcs resource ban openstack-congress overcloud-controller-1; sudo pcs resource ban openstack-congress overcloud-controller-2; sudo systemctl restart openstack-congress"
fi
if [ "${deploy_options_array['vpn']}" == 'True' ]; then