Redis TLS configuration
This approach allows to build image with TLS certs as env variables.
Dockerfile
Define docker file as below
FROM euadigportalcoredev02acr.azurecr.io/ace-runtime-server:${VERSION}
ARG REDIS_CACHE_TLS_KEY
ARG REDIS_CACHE_TLS_CERT
ARG REDIS_CACHE_TLS_CA
ENV REDIS_CACHE_TLS_KEY=$REDIS_CACHE_TLS_KEY
ENV REDIS_CACHE_TLS_CERT=$REDIS_CACHE_TLS_CERT
ENV REDIS_CACHE_TLS_CA=$REDIS_CACHE_TLS_CA
Build script
Create a script file as below to build the docker file. Give correct paths to cert files and name variables as per your need.
export tlsKey=`cat redis_user_private.key`;
export tlsCert=`cat redis_user.crt`;
export tlsCa=`cat redis_ca.pem`;
docker build --build-arg REDIS_CACHE_TLS_KEY="${tlsKey}" --build-arg REDIS_CACHE_TLS_CERT="${tlsCert}" --build-arg REDIS_CACHE_TLS_CA="${tlsCa}" -t "Your_tag" -f <Dockerfile created above> .
To use redis tls configuration option in redis
step, Use this approach to build custom image for ace-runtime-server
service. Then the same variable names can be used in the step configuration as described in step documentation.
To use redis tls configuration option in general caching and for scheduler redis configuration, Use this approach to build custom image for ace-runtime-server
service. The variable name should be as defined in documentation eg, 'REDIS_CACHE_TLS_KEY'.
To use redis tls configuration option in BullMQ Admin, Use this approach to build custom image for bullmq-board
service. The variable name should be as defined in documentation eg, 'REDIS_TLS_KEY'.
To use redis tls configuration option in CLIs, Use this approach to build custom image for ace-versioning
service. The variable name should be as defined in documentation eg, 'SCHEDULER_REDIS_TLS_KEY'.