[bitnami/redis-cluster] Release 6.2.7-debian-11-r17 (#2069)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Bitnami Bot
2022-08-05 14:51:05 +00:00
committed by GitHub
parent 6121e25157
commit c246b23e9f
6 changed files with 63 additions and 49 deletions
@@ -8,7 +8,7 @@ COPY prebuildfs /
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install required system packages and dependencies
RUN install_packages acl ca-certificates curl gzip libc6 libssl1.1 procps tar
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "redis" "6.2.7-151" --checksum 259beb3c75ffeb10a319f41c6a932a78b9c18eda9cc4c3c7e7e476d537d8f31b
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "redis" "6.2.7-152" --checksum 259beb3c75ffeb10a319f41c6a932a78b9c18eda9cc4c3c7e7e476d537d8f31b
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "gosu" "1.14.0-152" --checksum 0c751c7e2ec0bc900a19dbec0306d6294fe744ddfb0fa64197ba1a36040092f0
RUN apt-get update && apt-get upgrade -y && \
rm -r /var/lib/apt/lists /var/cache/apt/archives
@@ -11,6 +11,6 @@
"digest": "259beb3c75ffeb10a319f41c6a932a78b9c18eda9cc4c3c7e7e476d537d8f31b",
"distro": "debian-11",
"type": "NAMI",
"version": "6.2.7-151"
"version": "6.2.7-152"
}
}
@@ -220,6 +220,9 @@ redis_validate() {
elif [[ ! -f "$REDIS_TLS_KEY_FILE" ]]; then
print_validation_error "The private key file in the specified path ${REDIS_TLS_KEY_FILE} does not exist"
fi
if [[ ! -f "$REDIS_TLS_KEY_FILE_PASS" ]]; then
print_validation_error "The passphrase for the private key file in the specified path ${REDIS_TLS_KEY_FILE_PASS} does not exist"
fi
if [[ -z "$REDIS_TLS_CA_FILE" ]]; then
print_validation_error "You must provide a CA X.509 certificate in order to use TLS"
elif [[ ! -f "$REDIS_TLS_CA_FILE" ]]; then
@@ -409,10 +412,15 @@ redis_configure_default() {
fi
redis_conf_set tls-cert-file "$REDIS_TLS_CERT_FILE"
redis_conf_set tls-key-file "$REDIS_TLS_KEY_FILE"
redis_conf_set tls-key-file-pass "$REDIS_TLS_KEY_FILE_PASS"
redis_conf_set tls-ca-cert-file "$REDIS_TLS_CA_FILE"
[[ -n "$REDIS_TLS_DH_PARAMS_FILE" ]] && redis_conf_set tls-dh-params-file "$REDIS_TLS_DH_PARAMS_FILE"
redis_conf_set tls-auth-clients "$REDIS_TLS_AUTH_CLIENTS"
fi
# Multithreading configuration
! is_empty_value "$REDIS_IO_THREADS_DO_READS" && redis_conf_set "io-threads-do-reads" "$REDIS_IO_THREADS_DO_READS"
! is_empty_value "$REDIS_IO_THREADS" && redis_conf_set "io-threads" "$REDIS_IO_THREADS"
if [[ -n "$REDIS_PASSWORD" ]]; then
redis_conf_set requirepass "$REDIS_PASSWORD"
else
@@ -91,6 +91,13 @@ redis_cluster_override_conf() {
redis_conf_set tls-cluster yes
redis_conf_set tls-replication yes
fi
# Multithreading configuration
if ! is_empty_value "$REDIS_IO_THREADS_DO_READS"; then
redis_conf_set "io-threads-do-reads" "$REDIS_IO_THREADS_DO_READS"
fi
if ! is_empty_value "$REDIS_IO_THREADS"; then
redis_conf_set "io-threads" "$REDIS_IO_THREADS"
fi
}
########################
@@ -39,10 +39,13 @@ redis_cluster_env_vars=(
REDIS_PASSWORD
REDIS_MASTER_PASSWORD
REDIS_ACLFILE
REDIS_IO_THREADS_DO_READS
REDIS_IO_THREADS
REDIS_TLS_ENABLED
REDIS_TLS_PORT_NUMBER
REDIS_TLS_CERT_FILE
REDIS_TLS_KEY_FILE
REDIS_TLS_KEY_FILE_PASS
REDIS_TLS_CA_FILE
REDIS_TLS_DH_PARAMS_FILE
REDIS_TLS_AUTH_CLIENTS
@@ -106,6 +109,8 @@ export ALLOW_EMPTY_PASSWORD="${ALLOW_EMPTY_PASSWORD:-no}"
export REDIS_PASSWORD="${REDIS_PASSWORD:-}"
export REDIS_MASTER_PASSWORD="${REDIS_MASTER_PASSWORD:-}"
export REDIS_ACLFILE="${REDIS_ACLFILE:-}"
export REDIS_IO_THREADS_DO_READS="${REDIS_IO_THREADS_DO_READS:-}"
export REDIS_IO_THREADS="${REDIS_IO_THREADS:-}"
# TLS settings
export REDIS_TLS_ENABLED="${REDIS_TLS_ENABLED:-no}"
@@ -113,6 +118,7 @@ REDIS_TLS_PORT_NUMBER="${REDIS_TLS_PORT_NUMBER:-"${REDIS_TLS_PORT:-}"}"
export REDIS_TLS_PORT_NUMBER="${REDIS_TLS_PORT_NUMBER:-6379}"
export REDIS_TLS_CERT_FILE="${REDIS_TLS_CERT_FILE:-}"
export REDIS_TLS_KEY_FILE="${REDIS_TLS_KEY_FILE:-}"
export REDIS_TLS_KEY_FILE_PASS="${REDIS_TLS_KEY_FILE_PASS:-}"
export REDIS_TLS_CA_FILE="${REDIS_TLS_CA_FILE:-}"
export REDIS_TLS_DH_PARAMS_FILE="${REDIS_TLS_DH_PARAMS_FILE:-}"
export REDIS_TLS_AUTH_CLIENTS="${REDIS_TLS_AUTH_CLIENTS:-yes}"
+40 -47
View File
@@ -17,7 +17,7 @@ $ docker run --name redis-cluster -e ALLOW_EMPTY_PASSWORD=yes bitnami/redis-clus
### Docker Compose
```console
$ curl -sSL https://raw.githubusercontent.com/bitnami/bitnami-docker-redis-cluster/master/docker-compose.yml > docker-compose.yml
$ curl -sSL https://raw.githubusercontent.com/bitnami/containers/main/bitnami/redis-cluster/docker-compose.yml > docker-compose.yml
$ docker-compose up -d
```
@@ -41,10 +41,10 @@ Bitnami containers can be used with [Kubeapps](https://kubeapps.dev/) for deploy
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/).
* [`7.0`, `7.0-debian-11`, `7.0.4`, `7.0.4-debian-11-r1`, `latest` (7.0/debian-11/Dockerfile)](https://github.com/bitnami/bitnami-docker-redis-cluster/blob/7.0.4-debian-11-r1/7.0/debian-11/Dockerfile)
* [`6.2`, `6.2-debian-11`, `6.2.7`, `6.2.7-debian-11-r16` (6.2/debian-11/Dockerfile)](https://github.com/bitnami/bitnami-docker-redis-cluster/blob/6.2.7-debian-11-r16/6.2/debian-11/Dockerfile)
* [`7.0`, `7.0-debian-11`, `7.0.4`, `7.0.4-debian-11-r1`, `latest` (7.0/debian-11/Dockerfile)](https://github.com/bitnami/containers/blob/main/bitnami/redis-cluster/7.0/debian-11/Dockerfile)
* [`6.2`, `6.2-debian-11`, `6.2.7`, `6.2.7-debian-11-r17` (6.2/debian-11/Dockerfile)](https://github.com/bitnami/containers/blob/main/bitnami/redis-cluster/6.2/debian-11/Dockerfile)
Subscribe to project updates by watching the [bitnami/redis-cluster GitHub repo](https://github.com/bitnami/bitnami-docker-redis-cluster).
Subscribe to project updates by watching the [bitnami/containers GitHub repo](https://github.com/bitnami/containers).
## Get this image
@@ -60,10 +60,12 @@ To use a specific version, you can pull a versioned tag. You can view the [list
$ docker pull bitnami/redis-cluster:[TAG]
```
If you wish, you can also build the image yourself.
If you wish, you can also build the image yourself by cloning the repository, changing to the directory containing the Dockerfile and executing the `docker build` command. Remember to replace the `APP`, `VERSION` and `OPERATING-SYSTEM` path placeholders in the example command below with the correct values.
```console
$ docker build -t bitnami/redis-cluster:latest 'https://github.com/bitnami/bitnami-docker-redis-cluster.git#master:7.0/debian-11'
$ git clone https://github.com/bitnami/containers.git
$ cd bitnami/APP/VERSION/OPERATING-SYSTEM
$ docker build -t bitnami/APP:latest .
```
## Persisting your application
@@ -79,7 +81,7 @@ $ docker run \
bitnami/redis-cluster:latest
```
You can also do this with a minor change to the [`docker-compose.yml`](https://github.com/bitnami/bitnami-docker-redis-cluster/blob/master/docker-compose.yml) file present in this repository:
You can also do this with a minor change to the [`docker-compose.yml`](https://github.com/bitnami/containers/blob/main/bitnami/redis-cluster/docker-compose.yml) file present in this repository:
```yaml
redis-cluster:
@@ -129,7 +131,7 @@ $ docker run --name redis \
bitnami/redis-cluster:latest
```
Alternatively, modify the [`docker-compose.yml`](https://github.com/bitnami/bitnami-docker-redis/blob/master/docker-compose.yml) file present in this repository:
Alternatively, modify the [`docker-compose.yml`](https://github.com/bitnami/containers/blob/main/bitnami/redis/docker-compose.yml) file present in this repository:
```yaml
services:
@@ -145,29 +147,31 @@ Refer to the [Redis(R) configuration](http://redis.io/topics/config) manual for
The following env vars are supported for this container:
| Name | Description |
|-----------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `REDIS_DISABLE_COMMANDS` | Disables the specified Redis(R) commands |
| `REDIS_PORT_NUMBER` | Set the Redis(R) port. Default=: `6379` |
| `REDIS_PASSWORD` | Set the Redis(R) password. Default: `bitnami` |
| `ALLOW_EMPTY_PASSWORD` | Enables access without password |
| `REDIS_DNS_RETRIES` | Number of retries to get the IPs of the provided `REDIS_NODES`. It will wait 5 seconds between retries |
| `REDISCLI_AUTH` | Provide the same value as the configured `REDIS_PASSWORD` for the redis-cli tool to authenticate |
| `REDIS_CLUSTER_CREATOR` | Set to `yes` if the container will be the one on charge of initialize the cluster. This node will also be part of the cluster. |
| `REDIS_CLUSTER_REPLICAS` | Number of replicas for every master that the cluster will have. |
| `REDIS_NODES` | String delimited by spaces containing the hostnames of all of the nodes that will be part of the cluster |
| `REDIS_CLUSTER_ANNOUNCE_IP` | IP that the node should announce, used for non dynamic ip environents |
| `REDIS_CLUSTER_DYNAMIC_IPS` | Set to `no` if your Redis(R) cluster will be created with statical IPs. Default: `yes` |
| `REDIS_TLS_ENABLED` | Whether to enable TLS for traffic or not. Defaults to `no`. |
| `REDIS_TLS_PORT` | Port used for TLS secure traffic. Defaults to `6379`. |
| `REDIS_TLS_CERT_FILE` | File containing the certificate file for the TLS traffic. No defaults. |
| `REDIS_TLS_KEY_FILE` | File containing the key for certificate. No defaults. |
| `REDIS_TLS_CA_FILE` | File containing the CA of the certificate. No defaults. |
| `REDIS_TLS_DH_PARAMS_FILE` | File containing DH params (in order to support DH based ciphers). No defaults. |
| `REDIS_TLS_AUTH_CLIENTS` | Whether to require clients to authenticate or not. Defaults to `yes`. |
| `REDIS_CLUSTER_SLEEP_BEFORE_DNS_LOOKUP` | Number of seconds to wait before initializing the cluster. Set this to a higher value if you sometimes have issues with initial cluster creation. Defaults to `0`. |
| `REDIS_CLUSTER_DNS_LOOKUP_RETRIES` | Number of retries for the node's DNS lookup during the initial cluster creation. Defaults to `5`. |
| `REDIS_CLUSTER_DNS_LOOKUP_SLEEP` | Number of seconds to wait between each node's DNS lookup during the initial cluster creation. Defaults to `1`. |
| Name | Description |
|-----------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `REDIS_DISABLE_COMMANDS` | Disables the specified Redis(R) commands |
| `REDIS_PORT_NUMBER` | Set the Redis(R) port. Default=: `6379` |
| `REDIS_PASSWORD` | Set the Redis(R) password. Default: `bitnami` |
| `ALLOW_EMPTY_PASSWORD` | Enables access without password |
| `REDIS_DNS_RETRIES` | Number of retries to get the IPs of the provided `REDIS_NODES`. It will wait 5 seconds between retries |
| `REDISCLI_AUTH` | Provide the same value as the configured `REDIS_PASSWORD` for the redis-cli tool to authenticate |
| `REDIS_CLUSTER_CREATOR` | Set to `yes` if the container will be the one on charge of initialize the cluster. This node will also be part of the cluster. |
| `REDIS_CLUSTER_REPLICAS` | Number of replicas for every master that the cluster will have. |
| `REDIS_NODES` | String delimited by spaces containing the hostnames of all of the nodes that will be part of the cluster |
| `REDIS_CLUSTER_ANNOUNCE_IP` | IP that the node should announce, used for non dynamic ip environents |
| `REDIS_CLUSTER_DYNAMIC_IPS` | Set to `no` if your Redis(R) cluster will be created with statical IPs. Default: `yes` |
| `REDIS_TLS_ENABLED` | Whether to enable TLS for traffic or not. Defaults to `no`. |
| `REDIS_TLS_PORT` | Port used for TLS secure traffic. Defaults to `6379`. |
| `REDIS_TLS_CERT_FILE` | File containing the certificate file for the TLS traffic. No defaults. |
| `REDIS_TLS_KEY_FILE` | File containing the key for certificate. No defaults. |
| `REDIS_TLS_CA_FILE` | File containing the CA of the certificate. No defaults. |
| `REDIS_TLS_DH_PARAMS_FILE` | File containing DH params (in order to support DH based ciphers). No defaults. |
| `REDIS_TLS_AUTH_CLIENTS` | Whether to require clients to authenticate or not. Defaults to `yes`. |
| `REDIS_CLUSTER_SLEEP_BEFORE_DNS_LOOKUP` | Number of seconds to wait before initializing the cluster. Set this to a higher value if you sometimes have issues with initial cluster creation. Defaults to `0`. |
| `REDIS_CLUSTER_DNS_LOOKUP_RETRIES` | Number of retries for the node's DNS lookup during the initial cluster creation. Defaults to `5`. |
| `REDIS_CLUSTER_DNS_LOOKUP_SLEEP` | Number of seconds to wait between each node's DNS lookup during the initial cluster creation. Defaults to `1`. |
| `REDIS_IO_THREADS` | Number of threads to implement multithreading operations. Defaults to `1`. |
| `REDIS_IO_THREADS_DO_READS` | Enables multithreading for read operations. Defaults to `false`. |
Once all the Redis(R) nodes are running you need to execute command like the following to initiate the cluster:
@@ -179,13 +183,8 @@ Where you can add all the `node:port` that you want. The `--cluster-replicas` pa
### Cluster Initialization Troubleshooting
Depending on the environment you're deploying into, you might run into issues where the cluster initialization
is not completing successfully. One of the issue is related to the DNS lookup of the redis nodes performed during
cluster initialization. By default, this DNS lookup is performed as soon as all the redis nodes reply to
a successful ping. However, in some environments such as Kubernetes, it can help to wait some time before
performing this DNS lookup in order to prevent getting stale records. To this end, you can increase
`REDIS_CLUSTER_SLEEP_BEFORE_DNS_LOOKUP` to a value around `30` which has been found to be good in most cases. You can
check the discussion regarding this [here](https://github.com/bitnami/bitnami-docker-redis-cluster/pull/16#pullrequestreview-540706903).
Depending on the environment you're deploying into, you might run into issues where the cluster initialization is not completing successfully. One of the issue is related to the DNS lookup of the redis nodes performed during cluster initialization. By default, this DNS lookup is performed as soon as all the redis nodes reply to a successful ping.
However, in some environments such as Kubernetes, it can help to wait some time before performing this DNS lookup in order to prevent getting stale records. To this end, you can increase `REDIS_CLUSTER_SLEEP_BEFORE_DNS_LOOKUP` to a value around `30` which has been found to be good in most cases. You can check the discussion regarding this [here](https://github.com/bitnami/bitnami-docker-redis-cluster/pull/16#pullrequestreview-540706903).
### Securing Redis(R) Cluster traffic
@@ -224,7 +223,7 @@ When enabling TLS, conventional standard traffic is disabled by default. However
...
...
```
Alternatively, you may also provide with this configuration in your [custom](https://github.com/bitnami/bitnami-docker-redis-cluster#configuration-file) configuration file.
Alternatively, you may also provide with this configuration in your [custom](https://github.com/bitnami/containers/blob/main/bitnami/redis-cluster#configuration-file) configuration file.
## Logging
@@ -278,17 +277,11 @@ The cluster initialization logic has changed. Now the container in charge of ini
## Contributing
We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/bitnami-docker-redis-cluster/issues), or submit a [pull request](https://github.com/bitnami/bitnami-docker-redis-cluster/pulls) with your contribution.
We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/containers/issues), or submit a [pull request](https://github.com/bitnami/containers/pulls) with your contribution.
## Issues
If you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/bitnami-docker-redis-cluster/issues). For us to provide better support, be sure to include the following information in your issue:
- Host OS and version
- Docker version (`docker version`)
- Output of `docker info`
- Version of this container
- The command you used to run the container, and any relevant output you saw (masking any sensitive information)
If you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/containers/issues/new/choose). For us to provide better support, be sure to fill the issue template.
## License