Merge "Add chrony docker image"

This commit is contained in:
Jenkins 2016-11-04 12:38:35 +00:00 committed by Gerrit Code Review
commit d25ddf87f3
3 changed files with 39 additions and 6 deletions

View File

@ -0,0 +1,23 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
MAINTAINER {{ maintainer }}
{% block chrony_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% set chrony_packages = ['chrony'] %}
{% if base_distro in ['ubuntu', 'debian'] %}
# Ubuntu use _chrony username to use unified running user with RHEL system
RUN useradd --user-group --create-home --home-dir /var/lib/chrony chrony
{% endif %}
{{ macros.install_packages(chrony_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 chrony
{% block chrony_footer %}{% endblock %}
{% block footer %}{% endblock %}
{{ include_footer }}

View File

@ -0,0 +1,10 @@
#!/bin/bash
rm -f /var/run/chronyd.pid
if [[ ! -d "/var/log/kolla/chrony" ]]; then
mkdir -p /var/log/kolla/chrony
fi
if [[ $(stat -c %a /var/log/kolla/chrony) != "755" ]]; then
chmod 755 /var/log/kolla/chrony
fi

View File

@ -52,15 +52,15 @@ _PROFILE_OPTS = [
'zaqar'],
help='Aux Images'),
cfg.ListOpt('default',
default=['cron', 'kolla-toolbox', 'glance', 'haproxy',
'heat', 'horizon', 'keepalived', 'keystone',
'memcached', 'mariadb', 'neutron', 'nova',
default=['chrony', 'cron', 'kolla-toolbox', 'glance',
'haproxy', 'heat', 'horizon', 'keepalived',
'keystone', 'memcached', 'mariadb', 'neutron', 'nova',
'openvswitch', 'rabbitmq', 'heka'],
help='Default images'),
cfg.ListOpt('gate',
default=['cron', 'glance', 'haproxy', 'keepalived', 'keystone',
'kolla-toolbox', 'mariadb', 'memcached', 'neutron',
'nova', 'openvswitch', 'rabbitmq', 'heka'],
default=['chrony', 'cron', 'glance', 'haproxy', 'keepalived',
'keystone', 'kolla-toolbox', 'mariadb', 'memcached',
'neutron', 'nova', 'openvswitch', 'rabbitmq', 'heka'],
help='Gate images')
]