Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat: added sentinel sink
=92cb0341557c
diff --git a/sink/redis-sentinel/README.md b/sink/redis-sentinel/README.mdnew file mode 100644index 0000000000..91d5949c63--- /dev/null+++ b/sink/redis-sentinel/README.md@@ -0,0 +1,20 @@+## Sink for Redis Sentinel++1. Create a `.env` from `.env.example`+2. The HOST_IP value must be your host ip, so that redis inside the containers can connect to it and switch over as needed.++To test Sentinel is working correctly++1. Run++```+docker exec -it sentinel-2 redis-cli -p 26379 sentinel get-master-addr-by-name mymaster+```++2. Run++```+docker-compose -f docker-compose.sentinel.yml stop redis-master+```++3. Again running step 1 should show the other replica port.diff --git a/sink/redis-sentinel/config/sentinel/sentinel.conf b/sink/redis-sentinel/config/sentinel/sentinel.confnew file mode 100644index 0000000000..d84cf9af72--- /dev/null+++ b/sink/redis-sentinel/config/sentinel/sentinel.conf@@ -0,0 +1,18 @@+port 26379+sentinel resolve-hostnames yes+sentinel monitor mymaster 172.30.0.2 6379 2+sentinel down-after-milliseconds mymaster 5000+sentinel failover-timeout mymaster 60000++# Generated by CONFIG REWRITE+latency-tracking-info-percentiles 50 99 99.9+dir "/data"+user default on nopass sanitize-payload ~* &* +@all+sentinel myid 19849dc6cc6e756dfb0db909c44f0a2f8f5bcbe3+sentinel config-epoch mymaster 0+sentinel leader-epoch mymaster 0+sentinel current-epoch 0++sentinel known-replica mymaster 172.30.0.3 6379++sentinel known-replica mymaster 172.30.0.4 6379diff --git a/sink/redis-sentinel/docker-compose.sentinel.yml b/sink/redis-sentinel/docker-compose.sentinel.ymlnew file mode 100644index 0000000000..df30c152b0--- /dev/null+++ b/sink/redis-sentinel/docker-compose.sentinel.yml@@ -0,0 +1,166 @@+version: "3.8"++services:+ redis-master:+ image: redis:latest+ container_name: redis-master+ hostname: redis-master+ ports:+ - "6380:6379"+ volumes:+ - ./data/master:/data+ command:+ [+ "redis-server",+ "--appendonly",+ "yes",+ "--repl-diskless-load",+ "on-empty-db",+ "--replica-announce-ip",+ "${HOST_IP}",+ "--replica-announce-port",+ "6380",+ "--protected-mode",+ "no",+ ]+ networks:+ redis-net:+ ipv4_address: 172.21.0.3++ redis-slave-1:+ image: redis:latest+ container_name: redis-slave-1+ hostname: redis-slave-1+ depends_on:+ - redis-master+ ports:+ - "6381:6379"+ volumes:+ - ./data/slave1:/data+ command:+ [+ "redis-server",+ "--appendonly",+ "yes",+ "--replicaof",+ "redis-master",+ "6379",+ "--repl-diskless-load",+ "on-empty-db",+ "--replica-announce-ip",+ "${HOST_IP}",+ "--replica-announce-port",+ "6381",+ "--protected-mode",+ "no",+ ]+ networks:+ redis-net:+ ipv4_address: 172.21.0.4++ redis-slave-2:+ image: redis:latest+ container_name: redis-slave-2+ hostname: redis-slave-2+ depends_on:+ - redis-master+ ports:+ - "6382:6379"+ volumes:+ - ./data/slave2:/data+ command:+ [+ "redis-server",+ "--appendonly",+ "yes",+ "--replicaof",+ "redis-master",+ "6379",+ "--repl-diskless-load",+ "on-empty-db",+ "--replica-announce-ip",+ "${HOST_IP}",+ "--replica-announce-port",+ "6382",+ "--protected-mode",+ "no",+ ]+ networks:+ redis-net:+ ipv4_address: 172.21.0.5++ sentinel-1:+ image: redis:latest+ container_name: sentinel-1+ hostname: sentinel-1+ depends_on:+ - redis-master+ ports:+ - "26379:26379"+ command: >+ sh -c 'echo "bind 0.0.0.0" > /etc/sentinel.conf &&+ echo "sentinel monitor mymaster ${HOST_IP} 6380 2" >> /etc/sentinel.conf &&+ echo "sentinel resolve-hostnames yes" >> /etc/sentinel.conf &&+ echo "sentinel down-after-milliseconds mymaster 10000" >> /etc/sentinel.conf &&+ echo "sentinel failover-timeout mymaster 10000" >> /etc/sentinel.conf &&+ echo "sentinel parallel-syncs mymaster 1" >> /etc/sentinel.conf &&+ redis-sentinel /etc/sentinel.conf'+ networks:+ redis-net:+ ipv4_address: 172.21.0.6++ sentinel-2:+ image: redis:latest+ container_name: sentinel-2+ hostname: sentinel-2+ depends_on:+ - redis-master+ ports:+ - "26380:26379"+ command: >+ sh -c 'echo "bind 0.0.0.0" > /etc/sentinel.conf &&+ echo "sentinel monitor mymaster ${HOST_IP} 6380 2" >> /etc/sentinel.conf &&+ echo "sentinel resolve-hostnames yes" >> /etc/sentinel.conf &&+ echo "sentinel down-after-milliseconds mymaster 10000" >> /etc/sentinel.conf &&+ echo "sentinel failover-timeout mymaster 10000" >> /etc/sentinel.conf &&+ echo "sentinel parallel-syncs mymaster 1" >> /etc/sentinel.conf &&+ redis-sentinel /etc/sentinel.conf'+ networks:+ redis-net:+ ipv4_address: 172.21.0.7++ sentinel-3:+ image: redis:latest+ container_name: sentinel-3+ hostname: sentinel-3+ depends_on:+ - redis-master+ ports:+ - "26381:26379"+ command: >+ sh -c 'echo "bind 0.0.0.0" > /etc/sentinel.conf &&+ echo "sentinel monitor mymaster ${HOST_IP} 6380 2" >> /etc/sentinel.conf &&+ echo "sentinel resolve-hostnames yes" >> /etc/sentinel.conf &&+ echo "sentinel down-after-milliseconds mymaster 10000" >> /etc/sentinel.conf &&+ echo "sentinel failover-timeout mymaster 10000" >> /etc/sentinel.conf &&+ echo "sentinel parallel-syncs mymaster 1" >> /etc/sentinel.conf &&+ redis-sentinel /etc/sentinel.conf'+ networks:+ redis-net:+ ipv4_address: 172.21.0.8++ redisinsight:+ image: redis/redisinsight:latest+ container_name: redisinsight+ ports:+ - "5540:5540"+ networks:+ redis-net:+ ipv4_address: 172.21.0.9++networks:+ redis-net:+ driver: bridge+ ipam:+ config:+ - subnet: 172.21.0.0/16