-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.yaml
55 lines (48 loc) · 2.13 KB
/
setup.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
- name: Fan in / Aggregate - with a mirrormaker instance in each source region
hosts: localhost
connection: local
# vars:
# ibm_entitlement_key: "{{ undef(hint='Provide an Entitled Registry key') }}"
# storage_class: "{{ undef(hint='Provide the storage class to use for Event Streams')}}"
tasks:
- name: Check for required variables
fail:
msg: "Required variable {{item}} has not been provided"
when: vars[item] is undefined
loop:
- ibm_entitlement_key
- storage_class
- name: Check for playbook pre-requisites
ansible.builtin.include_tasks: "{{ playbook_dir }}/../common/pre-reqs/playbook-prereqs.yaml"
- name: Install Event Streams
ansible.builtin.include_tasks: "{{ playbook_dir }}/../common/install-eventstreams/setup.yaml"
- name: Create the North America, South America, and Europe regions
ansible.builtin.include_tasks: "{{ playbook_dir }}/../common/create-regions/setup.yaml"
- name: Start producers in the North American and South American regions
ansible.builtin.include_tasks: "{{ playbook_dir }}/../common/producer/setup.yaml"
vars:
namespace: "{{ item.namespace }}"
es_cluster: "{{ item.es_cluster }}"
region: "{{ item.region }}"
locations: "{{ item.locations }}"
loop:
- namespace: north-america
es_cluster: na-eventstreams
region: NA
locations: "Atlanta,Chicago,Dallas,Detroit,Philadelphia"
- namespace: south-america
es_cluster: sa-eventstreams
region: SA
locations: "SãoPaulo,BuenosAires,Lima,Bogotá,LaPaz"
- name: Set up Mirror Maker 2 instances
ansible.builtin.include_tasks: "{{ playbook_dir }}/start-mm2.yaml"
- name: Start consumer in the Europe region
ansible.builtin.include_tasks: "{{ playbook_dir }}/../common/consumer/setup.yaml"
vars:
namespace: europe
consumer: consumer-europe
user_template: "{{ playbook_dir }}/templates/consumer-user.yaml"
es_cluster: eu-eventstreams
es_namespace: europe
topics: !unsafe 'northamerica\\..*|southamerica\\..*'