You need to sign in or sign up before continuing.
Commit eed5009b authored by iamabhishek-dubey's avatar iamabhishek-dubey

Added code for external configuration

Signed-off-by: default avatariamabhishek-dubey <abhishekbhardwaj510@gmail.com>
parent 470d7bc6
build-redis-image:
docker build -t quay.io/opstree/redis:6.2 -f Dockerfile .
docker build -t quay.io/opstree/redis:6.2.5 -f Dockerfile .
build-redis-exporter-image:
docker build -t opstree/redis-exporter:1.0 -f Dockerfile.exporter .
......
#!/bin/bash
PODS="$1"
yes yes | redis-cli --cluster create ${PODS}
......@@ -5,6 +5,7 @@ set -a
CLUSTER_DIRECTORY=${CLUSTER_DIRECTORY:-"/opt/redis"}
PERSISTENCE_ENABLED=${PERSISTENCE_ENABLED:-"false"}
DATA_DIR=${DATA_DIR:-"/data"}
EXTERNAL_CONFIG_FILE=${EXTERNAL_CONFIG_FILE:-"/etc/redis/external.conf.d/redis-external.conf"}
apply_permissions() {
chgrp -R 0 /etc/redis
......@@ -64,6 +65,10 @@ persistence_setup() {
fi
}
external_config() {
echo "include ${EXTERNAL_CONFIG_FILE}" >> /etc/redis/redis.conf
}
start_redis() {
if [[ "${SETUP_MODE}" == "cluster" ]]; then
echo "Starting redis service in cluster mode....."
......@@ -75,6 +80,9 @@ start_redis() {
}
main_function() {
if [[ -f "${EXTERNAL_CONFIG_FILE}" ]]; then
external_config
fi
common_operation
set_redis_password
redis_mode_setup
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment