Merge "Add Redis Sentinel"

This commit is contained in:
Jenkins 2017-07-26 16:24:17 +00:00 committed by Gerrit Code Review
commit 365fc6d001
5 changed files with 44 additions and 3 deletions

View File

@ -0,0 +1,13 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block redis_base_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='redis', homedir='/run/redis') }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block redis_base_footer %}{% endblock %}

View File

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

View File

@ -0,0 +1,18 @@
FROM {{ namespace }}/{{ image_prefix }}redis-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block redis_sentinel_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set redis_sentinel_packages = ['redis'] %}
{% elif base_distro in ['debian', 'ubuntu'] %}
{% set redis_sentinel_packages = ['redis-sentinel'] %}
{% endif %}
{{ macros.install_packages(redis_sentinel_packages | customizable("packages")) }}
{% block redis_sentinel_footer %}{% endblock %}
{% block footer %}{% endblock %}
USER redis

View File

@ -1,12 +1,10 @@
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
FROM {{ namespace }}/{{ image_prefix }}redis-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% block redis_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{{ macros.configure_user(name='redis', homedir='/run/redis') }}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
{% set redis_packages = ['redis'] %}
{% elif base_distro in ['debian', 'ubuntu'] %}

View File

@ -0,0 +1,3 @@
---
features:
- Add a redis-sentinel image to deploy highly available redis clusters