Bring up the Redis Service - ksgh/dkrb-slave-check GitHub Wiki

I'm going to record the slave status information in redis as this is pretty simple, and it can then be extracted with your language of choice (as it's a base64 encoded json structure)

I've built my own redis image, based off my CentOS 7.7 image. There's nothing special about it besides a couple settings provided in redis.conf (mem, mem policy, protected mode, etc). You can find that here: kshenk/redis:latest

So let's plant the redis.yml compose file and bring that service up:

version: '3.1'

networks:
  mysql_net-generic:
    external: true

services:
  redis-00:
    image: kshenk/redis:latest
    networks:
      mysql_net-generic:
        aliases:
          - redis
    restart: always
    sysctls:
      net.core.somaxconn: 1024
docker stack deploy -c redis.yml redis

(Keep in mind this is not secured as this is all for demonstration purposes) Our standalone redis service can exist anywhere within the swarm and it (in this case) won't really matter where.

Next

Light up the slave-check service