Merge "Add Redis Sentinel"
This commit is contained in:
commit
365fc6d001
13
docker/redis/redis-base/Dockerfile.j2
Normal file
13
docker/redis/redis-base/Dockerfile.j2
Normal 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 %}
|
9
docker/redis/redis-base/extend_start.sh
Normal file
9
docker/redis/redis-base/extend_start.sh
Normal 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
|
18
docker/redis/redis-sentinel/Dockerfile.j2
Normal file
18
docker/redis/redis-sentinel/Dockerfile.j2
Normal 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
|
@ -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'] %}
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
features:
|
||||
- Add a redis-sentinel image to deploy highly available redis clusters
|
Loading…
Reference in New Issue
Block a user