Skip to content

Commit

Permalink
Moved ALB and Redis tasks to subplaybooks (refs fititnt/ap-applicatio…
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Nov 24, 2019
1 parent 64cda74 commit 961b5ed
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 41 deletions.
43 changes: 2 additions & 41 deletions alb-ha-cluster-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,45 +10,6 @@
# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-echo.etica.ai 6379
# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-foxtrot.etica.ai 6379

- name: "alb-ha-cluster-infra: Playbook to manange the cluster underline infrastructure (not the apps)"
# hosts: cluster_all_nodes
hosts: none
remote_user: root
vars:
# On this ap-alb-cluster-demo, we will use as example a single YAML file
# containing all variables at /hosts.yml
#
# Note that ansible allows other types of inventories

roles:
- ap-application-load-balancer


# We will use https://github.com/DavidWittman/ansible-redis to setup an Redis cluster

- name: "alb-ha-cluster-infra + davidwittman.redis: setup master, slave and sentinel"
hosts: cluster_all_nodes
roles:
- davidwittman.redis

#- name: configure the master redis server
# hosts: redis_leader
# roles:
# - davidwittman.redis

#- name: configure redis slaves
# hosts: redis_follower
# vars:
# # - redis_slaveof: redis-master.example.com 6379
# roles:
# - davidwittman.redis

#- name: configure redis sentinel nodes
# hosts: redis_sentinel
# vars:
# #- redis_sentinel_monitors:
# # - name: master01
# # host: redis-master.example.com
# # port: 6379
# roles:
# - davidwittman.redis
- import_playbook: playbooks/alb-ha-cluster-infra-alb.yml
- import_playbook: playbooks/alb-ha-cluster-infra-redis.yml
23 changes: 23 additions & 0 deletions playbooks/alb-ha-cluster-infra-alb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# FILE: alb-ha-cluster-infra-alb.yml
# LICENSE: Public Domain


# ansible-playbook -i hosts.yml playbooks/alb-ha-cluster-infra-alb.yml

# To do some basic check for see if redis is listening, is possible to use
# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-delta.etica.ai 6379
# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-echo.etica.ai 6379
# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-foxtrot.etica.ai 6379

- name: "alb-ha-cluster-infra: Playbook to manange the cluster underline infrastructure (not the apps)"
hosts: cluster_all_nodes
remote_user: root
vars:
# On this ap-alb-cluster-demo, we will use as example a single YAML file
# containing all variables at /hosts.yml
#
# Note that ansible allows other types of inventories

roles:
- ap-application-load-balancer
18 changes: 18 additions & 0 deletions playbooks/alb-ha-cluster-infra-redis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
# FILE: alb-ha-cluster-infra.yml
# LICENSE: Public Domain


# ansible-playbook -i hosts.yml playbooks/alb-ha-cluster-infra-redis.yml

# To do some basic check for see if redis is listening, is possible to use
# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-delta.etica.ai 6379
# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-echo.etica.ai 6379
# (printf "PING\r\n"; sleep 1) | nc aguia-pescadora-foxtrot.etica.ai 6379

# We will use https://github.com/DavidWittman/ansible-redis to setup an Redis cluster

- name: "alb-ha-cluster-infra + davidwittman.redis: setup master, slave and sentinel"
hosts: cluster_all_nodes
roles:
- davidwittman.redis

0 comments on commit 961b5ed

Please sign in to comment.