Add Dockerfile for congress
Change-Id: I30c4d7929940c751bf88c4bf9a0e200025ebd5c8 Partially-Implements: blueprint enable-congress-container
This commit is contained in:
parent
7bf87dddec
commit
e70f8e1439
11
docker/congress/congress-api/Dockerfile.j2
Normal file
11
docker/congress/congress-api/Dockerfile.j2
Normal file
@ -0,0 +1,11 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}congress-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_congress_extend_start
|
||||
RUN chmod 755 /usr/local/bin/kolla_congress_extend_start
|
||||
|
||||
{% block congress_api_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER congress
|
8
docker/congress/congress-api/extend_start.sh
Normal file
8
docker/congress/congress-api/extend_start.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||
congress-db-manage --config-file /etc/congress/congress.conf upgrade head
|
||||
exit 0
|
||||
fi
|
43
docker/congress/congress-base/Dockerfile.j2
Normal file
43
docker/congress/congress-base/Dockerfile.j2
Normal file
@ -0,0 +1,43 @@
|
||||
FROM {{ namespace }}/{{ image_prefix}}openstack-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
{% import "macros.j2" as macros with context %}
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['ubuntu'] %}
|
||||
{% set congress_base_packages = [
|
||||
'congress-common',
|
||||
'congress-server']
|
||||
%}
|
||||
|
||||
# TODO(Md Nadeem): need to add congress binary package when it is available in rpm base distro
|
||||
#https://trunk.rdoproject.org/
|
||||
{% elif base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
|
||||
RUN {{ macros.install_packages(congress_base_packages | customizable("packages")) }}
|
||||
|
||||
{% elif install_type == 'source' %}
|
||||
|
||||
ADD congress-base-archive /congress-base-source
|
||||
RUN ln -s congress-base-source/* congress \
|
||||
&& useradd --user-group congress \
|
||||
&& /var/lib/kolla/venv/bin/pip --no-cache-dir install --upgrade -c requirements/upper-constraints.txt /congress \
|
||||
&& mkdir -p /etc/congress /home/congress \
|
||||
&& cp -r /congress/etc/* /etc/congress/ \
|
||||
&& chown -R congress: /etc/congress /home/congress
|
||||
|
||||
{% endif %}
|
||||
|
||||
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
||||
|
||||
RUN usermod -a -G kolla congress \
|
||||
&& touch /usr/local/bin/kolla_congress_extend_start \
|
||||
&& chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_congress_extend_start
|
||||
|
||||
{% block congress_base_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
10
docker/congress/congress-base/extend_start.sh
Normal file
10
docker/congress/congress-base/extend_start.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -d "/var/log/kolla/congress" ]]; then
|
||||
mkdir -p /var/log/kolla/congress
|
||||
fi
|
||||
if [[ $(stat -c %a /var/log/kolla/congress) != "755" ]]; then
|
||||
chmod 755 /var/log/kolla/congress
|
||||
fi
|
||||
|
||||
. /usr/local/bin/kolla_congress_extend_start
|
8
docker/congress/congress-datasource/Dockerfile.j2
Normal file
8
docker/congress/congress-datasource/Dockerfile.j2
Normal file
@ -0,0 +1,8 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}congress-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
{% block congress_datasource_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER congress
|
8
docker/congress/congress-policy-engine/Dockerfile.j2
Normal file
8
docker/congress/congress-policy-engine/Dockerfile.j2
Normal file
@ -0,0 +1,8 @@
|
||||
FROM {{ namespace }}/{{ image_prefix }}congress-base:{{ tag }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
{% block congress_policy_engine_footer %}{% endblock %}
|
||||
{% block footer %}{% endblock %}
|
||||
{{ include_footer }}
|
||||
|
||||
USER congress
|
@ -45,7 +45,8 @@ _PROFILE_OPTS = [
|
||||
help='Main images'),
|
||||
cfg.ListOpt('aux',
|
||||
default=['aodh', 'designate', 'gnocchi', 'ironic',
|
||||
'magnum', 'mistral', 'trove,' 'zaqar', 'zookeeper'],
|
||||
'magnum', 'mistral', 'trove,' 'zaqar', 'zookeeper',
|
||||
'congress'],
|
||||
help='Aux Images'),
|
||||
cfg.ListOpt('default',
|
||||
default=['cron', 'kolla-toolbox', 'glance', 'haproxy',
|
||||
@ -178,6 +179,10 @@ SOURCES = {
|
||||
'type': 'url',
|
||||
'location': ('http://tarballs.openstack.org/cinder/'
|
||||
'cinder-master.tar.gz')},
|
||||
'congress-base': {
|
||||
'type': 'url',
|
||||
'location': ('http://tarballs.openstack.org/congress/'
|
||||
'congress-master.tar.gz')},
|
||||
'designate-base': {
|
||||
'type': 'url',
|
||||
'location': ('http://tarballs.openstack.org/designate/'
|
||||
|
@ -71,8 +71,8 @@ class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
|
||||
"neutron-networking-sfc-agent",
|
||||
"senlin-base",
|
||||
"vmtp",
|
||||
"watcher-base"
|
||||
]
|
||||
"watcher-base",
|
||||
"congress-base"]
|
||||
|
||||
def setUp(self):
|
||||
super(BuildTestCentosBinary, self).setUp()
|
||||
@ -93,8 +93,8 @@ class BuildTestCentosSource(BuildTest, base.BaseTestCase):
|
||||
class BuildTestUbuntuBinary(BuildTest, base.BaseTestCase):
|
||||
excluded_images = ["neutron-networking-sfc-agent",
|
||||
"vmtp",
|
||||
"zaqar"
|
||||
]
|
||||
"zaqar",
|
||||
"congress-base"]
|
||||
|
||||
def setUp(self):
|
||||
super(BuildTestUbuntuBinary, self).setUp()
|
||||
@ -116,8 +116,8 @@ class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
|
||||
"neutron-networking-sfc-agent",
|
||||
"senlin-base",
|
||||
"vmtp",
|
||||
"watcher-base"
|
||||
]
|
||||
"watcher-base",
|
||||
"congress-base"]
|
||||
|
||||
def setUp(self):
|
||||
super(BuildTestOracleLinuxBinary, self).setUp()
|
||||
|
Loading…
Reference in New Issue
Block a user