This simple tool uses Fabric to automate the creation of new Redis Pods running on Docker containers. It can run using a pre-defined hosts list or fetch them dynamically from AWS.
- Python 2.7
- Fabric
pip install fabric
ssh_user
: the username you are going to use to login in redis instancesssh_key
: path to ssh keyfetch_mode
: can bestatic
ordynamic
, depending if you have a static set of hosts (sentinels and redis), or if you are going to fetch them though AWS API.sentinel.key
: the AWS tag key you have defined for sentinelssentinel.value
: the AWS tag value you defined for sentinelsredis.key
: same as above but for redis hostsredis.value
: same as above but for redis hosts
Use this file if you have set fetch_mode: static
on config.yml
.
Something like:
---
sentinels:
172.22.41.15
172.22.42.15
172.22.43.15
redis:
172.22.41.27
172.22.41.133
172.22.42.122
172.22.42.239
172.22.43.81
172.22.43.48
fab -l
fab podName:<YOURPODNAME>,<REDISPORT>,<CLUSTER>
ie:
fab podName:colossus,7190,redis-cluster-2
- Discovery using AWS API / boto
- Validations about container name and port
- define more than one cluster on
hosts.yml