Add zookeeper image

Change-Id: I6ca1ee54cfb73ead53d199ba138673fb31499cdc
Partially-Implements: blueprint monasca-containers
This commit is contained in:
Sam Yaple 2016-12-05 10:24:47 +00:00
parent 9a3192f570
commit c780a98758
5 changed files with 46 additions and 3 deletions

View File

@ -0,0 +1,28 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block zookeeper_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set zookeeper_packages = [
'zookeeper',
] %}
{% endif %}
{{ macros.install_packages(zookeeper_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start \
&& usermod -a -G kolla zookeeper
{% block zookeeper_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER zookeeper

View File

@ -0,0 +1,9 @@
#!/bin/bash
# Create log directory, with appropriate permissions
if [[ ! -d "/var/log/kolla/zookeeper" ]]; then
mkdir -p /var/log/kolla/zookeeper
fi
if [[ $(stat -c %a /var/log/kolla/zookeeper) != "755" ]]; then
chmod 755 /var/log/kolla/zookeeper
fi

View File

@ -50,7 +50,7 @@ _PROFILE_OPTS = [
'kuryr', 'magnum', 'manila', 'mistral', 'murano',
'octavia', 'panko', 'rally', 'sahara', 'searchlight',
'senlin', 'solum', 'tacker' 'telegraf', 'trove',
'zaqar'],
'zaqar', 'zookeeper'],
help='Aux Images'),
cfg.ListOpt('default',
default=['chrony', 'cron', 'kolla-toolbox', 'glance',

View File

@ -0,0 +1,3 @@
---
features:
- Add zookeeper image, used in monasca

View File

@ -78,6 +78,7 @@ class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
"bifrost-base",
"cloudkitty-base",
"freezer-base",
"zookeeper",
"tacker"]
def setUp(self):
@ -87,7 +88,8 @@ class BuildTestCentosBinary(BuildTest, base.BaseTestCase):
class BuildTestCentosSource(BuildTest, base.BaseTestCase):
excluded_images = ["mistral-base"]
excluded_images = ["mistral-base",
"zookeeper"]
def setUp(self):
super(BuildTestCentosSource, self).setUp()
@ -142,6 +144,7 @@ class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
"bifrost-base",
"cloudkitty-base",
"freezer-base",
"zookeeper",
"tacker"]
def setUp(self):
@ -151,7 +154,7 @@ class BuildTestOracleLinuxBinary(BuildTest, base.BaseTestCase):
class BuildTestOracleLinuxSource(BuildTest, base.BaseTestCase):
excluded_images = []
excluded_images = ["zookeeper"]
def setUp(self):
super(BuildTestOracleLinuxSource, self).setUp()