|
1 | | -# In this section, add all machines in this installation. |
2 | | -# |
3 | | -# Ansible connects to the machine on `ansible_host` |
4 | | -# |
5 | | -# The machines talk to eachother on `ip` |
6 | | -# |
7 | | -# !!! if `ip` is not provided, ansible will default to the IP of the default |
8 | | -# interface. Which is probably not what you want |
9 | | -# |
10 | | -# <hostname> ansible_host=<internal_ip> |
11 | | -[all] |
12 | | -# kubenode1 ansible_host=100.89.110.8 ip=10.114.0.10 |
13 | | -# kubenode2 ansible_host=100.154.219.107 ip=10.114.0.8 |
14 | | -# kubenode3 ansible_host=100.227.143.169 ip=10.114.0.2 |
15 | | -# You could add more if capacity is needed |
16 | | -# kubenode4 .... |
17 | | - |
18 | | -# cassandra1 ansible_host=XXXX |
19 | | -# cassandra2 ansible_host=XXXX |
20 | | -# cassandra3 ansible_host=XXXX |
21 | | - |
22 | | -# elasticsearch1 ansible_host=XXXX |
23 | | -# elasticsearch2 ansible_host=XXXX |
24 | | -# elasticsearch3 ansible_host=XXXX |
25 | | -# |
26 | | -# minio1 ansible_host=XXXX |
27 | | -# minio2 ansible_host=XXXX |
28 | | -# minio3 ansible_host=XXXX |
29 | | -# |
30 | | -# rabbitmq1 ansible_host=XXXX |
31 | | -# rabbitmq2 ansible_host=XXXX |
32 | | -# rabbitmq3 ansible_host=XXXX |
33 | | -# |
34 | | -# postgresql1 ansible_host=XXXX |
35 | | -# postgresql2 ansible_host=XXXX |
36 | | -# postgresql3 ansible_host=XXXX |
37 | | - |
38 | | -# If you are in an offline environment, add an assethost here, from which |
39 | | -# artifacts are served |
| 1 | +# Add hosts to the groups below. Use `ansible_host` for SSH and `ip` for node-to-node traffic. |
| 2 | +# If `ip` is omitted, Ansible falls back to the default interface address. |
40 | 3 | # assethost ansible_host=100.89.14.74 ip=10.114.0.9 |
41 | 4 |
|
42 | | -# If you need to tunnel ssh connections through a bastion host (because your |
43 | | -# nodes are not directly reachable from the machine running ansible), define a |
44 | | -# bastion host as well, and uncomment the [bastion] section below. |
45 | | -# |
46 | | -# bastion ansible_host=XXXX ansible_user=some_user |
47 | | - |
48 | | - |
49 | 5 | # Below variables are set for all machines in the inventory. |
50 | 6 | [all:vars] |
51 | 7 | # If you need to ssh as a user that's not the same user as the one running ansible |
52 | | -# ansible_user=<some_user> |
53 | | -# ansible_password=<some password> |
54 | | -# ansible_sudo_pass=<some password> |
55 | | -# Keep in mind this user needs to be able to sudo passwordless. |
| 8 | +ansible_user=<some_user> |
| 9 | +ansible_password=<some password> |
| 10 | +ansible_become_pass=<some password> |
| 11 | +# This user must be allowed to sudo. |
56 | 12 | # ansible_user = root |
57 | | -# |
58 | | -# Usually, you want to have a separate keypair to ssh to these boxes, |
59 | | -# and tell ansible where it is by setting `ansible_ssh_private_key_file`. |
60 | | -# ansible_ssh_private_key_file = ./dot_ssh/id_ed25519 |
61 | | -# Note adding it to the ssh agent won't work in scenarios where ansible |
62 | | -# execution is wrapped through a container, as the ssh-agent socket isn't |
63 | | -# accessible there. |
64 | | - |
65 | | -## In the next four sections, Cassandra, elasticsearch, rabbitmq, and MinIO need |
66 | | -# the name of the interface you want database services to run on |
67 | | -# specified. While this can be used to specify a private network just |
68 | | -# for databases, you must specify the interface name you want to run |
69 | | -# services on, even in the case that it is the only interface on the box. |
70 | | - |
71 | | -# Note: for offline configurations, this is required. the impact is that dns |
72 | | -# on the physical kubenodes does not perform requests against the kubernetes |
73 | | -# cluster, prefering the network provided DNS settings. |
74 | | -# resolvconf_mode: none |
75 | 13 |
|
76 | | -[cassandra:vars] |
77 | | -# cassandra_network_interface = enp1s0 |
78 | | -# setting either cassandra backup directive to 'True' below requires a valid s3 bucket name as well |
79 | | -# also, enabling backups will install `awscli` via pip, which requires an internet connection |
80 | | -# cassandra_backup_enabled = False |
81 | | -# cassandra_incremental_backup_enabled = False |
82 | | -# cassandra_backup_s3_bucket = <bucketname> |
| 14 | +# if you choose to avoid passing passwords in the above format, you can also setup ansible_ssh_private_key_file and allow sudo access to ansible_user |
| 15 | +# ansible_ssh_private_key_file="ssh/id_ed25519" |
83 | 16 |
|
84 | | -[postgresql:vars] |
85 | | -postgresql_network_interface = enp1s0 |
86 | | -repmgr_node_config: |
87 | | - postgresql1: # Maps to postgresql_rw group |
88 | | - node_id: 1 |
89 | | - priority: 150 |
90 | | - role: primary |
91 | | - postgresql2: # Maps to first postgresql_ro |
92 | | - node_id: 2 |
93 | | - priority: 100 |
94 | | - role: standby |
95 | | - postgresql3: # Maps to second postgresql_ro |
96 | | - node_id: 3 |
97 | | - priority: 50 |
98 | | - role: standby |
| 17 | +[assethost] |
| 18 | +assethost ansible_host=10.1.1.1 |
99 | 19 |
|
100 | | -[elasticsearch:vars] |
101 | | -# elasticsearch_network_interface = enp1s0 |
| 20 | +# Cassandra nodes. |
| 21 | +[cassandra] |
| 22 | +cassandra1 ansible_host=10.1.1.17 |
| 23 | +cassandra2 ansible_host=10.1.1.2 |
| 24 | +cassandra3 ansible_host=10.1.1.16 |
102 | 25 |
|
103 | | -[minio:vars] |
104 | | -# minio_network_interface = enp1s0 |
| 26 | +# One Cassandra seed node. |
| 27 | +[cassandra_seed] |
| 28 | +cassandra1 |
105 | 29 |
|
106 | | -### No longer used. generated by the nginz section of values/wire-server/values.yaml instead. |
107 | | -#prefix = "example-" |
108 | | -#domain = "example.com" |
109 | | -#deeplink_title = "example.com environment" |
| 30 | +[cassandra:vars] |
| 31 | +cassandra_network_interface = enp1s0 |
110 | 32 |
|
111 | | -# Rabbitmq specific variables |
112 | | -[rmq-cluster:vars] |
113 | | -# host name here must match each node's actual hostname |
114 | | -rabbitmq_cluster_master: rabbitmq1 |
115 | | -# rabbitmq_network_interface = enp1s0 |
| 33 | +# Elasticsearch nodes. |
| 34 | +[elasticsearch] |
| 35 | +elasticsearch1 ansible_host=10.1.1.9 |
| 36 | +elasticsearch2 ansible_host=10.1.1.15 |
| 37 | +elasticsearch3 ansible_host=10.1.1.19 |
| 38 | + |
| 39 | +[elasticsearch:vars] |
| 40 | +elasticsearch_network_interface = enp1s0 |
116 | 41 |
|
117 | | -# For the following groups, add all nodes defined above to the sections below. |
118 | | -# Define any additional variables that should be set for these nodes. |
| 42 | +[elasticsearch_master:children] |
| 43 | +elasticsearch |
119 | 44 |
|
120 | | -# Uncomment this is you use the bastion host |
121 | | -# [bastion] |
122 | | -# bastion |
| 45 | +# Kubernetes nodes. Add `node_labels` or `node_annotations` here when needed. |
| 46 | +[kube-node] |
| 47 | +kubenode1 ansible_host=10.1.1.3 etcd_member_name=kubenode1 ip=10.1.1.3 |
| 48 | +kubenode2 ansible_host=10.1.1.4 etcd_member_name=kubenode2 ip=10.1.1.4 |
| 49 | +kubenode3 ansible_host=10.1.1.8 etcd_member_name=kubenode3 ip=10.1.1.8 |
| 50 | +# Additional worker nodes. |
| 51 | +# kubenode4 ansible_host=10.1.1.88 etcd_member_name=kubenode4 ip=10.1.1.88 |
123 | 52 |
|
124 | 53 | # Add all nodes that should be the master |
125 | | -[kube-master] |
126 | | -# kubenode1 |
127 | | -# kubenode2 |
128 | | -# kubenode3 |
| 54 | +[kube-master:children] |
| 55 | +kube-node |
129 | 56 |
|
130 | | -[etcd] |
131 | 57 | # !!! There MUST be an UNEVEN amount of etcd servers |
132 | | -# |
133 | | -# Uncomment if etcd and kubernetes are colocated |
134 | | -# |
135 | | -# kubenode1 etcd_member_name=etcd1 |
136 | | -# kubenode2 etcd_member_name=etcd2 |
137 | | -# kubenode3 etcd_member_name=etcd3 |
138 | | -# |
139 | | -# Uncomment if etcd cluster is separately deployed from kubernetes masters |
140 | | -# etcd1 etcd_member_name=etcd1 |
141 | | -# etcd2 etcd_member_name=etcd2 |
142 | | -# etcd3 etcd_member_name=etcd3 |
143 | | - |
144 | | -# Add all worker nodes here |
145 | | -[kube-node] |
146 | | -# kubenode1 |
147 | | -# kubenode2 |
148 | | -# kubenode3 |
149 | | - |
150 | | -# Additional worker nodes can be added |
151 | | -# You can label and annotate nodes. E.g. when deploying SFT you might want to |
152 | | -# deploy it only on certain nodes due to the public IP requirement. |
153 | | -# kubenode4 node_labels="{'wire.com/role': 'sftd'}" node_annotations="{'wire.com/external-ip': 'XXXX'}" |
154 | | -# kubenode5 node_labels="{'wire.com/role': 'sftd'}" node_annotations="{'wire.com/external-ip': 'XXXX'}" |
| 58 | +[etcd:children] |
| 59 | +kube-master |
155 | 60 |
|
156 | | -# leave this group as is |
157 | 61 | [k8s-cluster:children] |
158 | 62 | kube-master |
159 | 63 | kube-node |
160 | 64 |
|
161 | | -# Add all cassandra nodes here |
162 | | -[cassandra] |
163 | | -# cassandra1 |
164 | | -# cassandra2 |
165 | | -# cassandra3 |
166 | | - |
167 | | -# add a cassandra seed |
168 | | -[cassandra_seed] |
169 | | -# cassandra1 |
170 | | - |
171 | | -# Add all elasticsearch nodes here |
172 | | -[elasticsearch] |
173 | | -# elasticsearch1 |
174 | | -# elasticsearch2 |
175 | | -# elasticsearch3 |
176 | | - |
177 | | -# leave this as is |
178 | | -[elasticsearch_master:children] |
179 | | -elasticsearch |
180 | | - |
181 | | -# Add all minio nodes here |
| 65 | +# MinIO nodes. |
182 | 66 | [minio] |
183 | | -# minio1 |
184 | | -# minio2 |
185 | | -# minio3 |
| 67 | +minio1 ansible_host=10.1.1.6 |
| 68 | +minio2 ansible_host=10.1.1.7 |
| 69 | +minio3 ansible_host=10.1.1.20 |
186 | 70 |
|
187 | | -# Add all rabbitmq nodes here |
188 | | -[rmq-cluster] |
189 | | -# host names here must match each node's actual hostname |
190 | | -# rabbitmq1 |
191 | | -# rabbitmq2 |
192 | | -# rabbitmq3 |
| 71 | +[minio:vars] |
| 72 | +minio_network_interface = enp1s0 |
193 | 73 |
|
194 | | -# Add all postgresql nodes here |
| 74 | +# PostgreSQL nodes. |
195 | 75 | [postgresql] |
196 | | -postgresql1 |
197 | | -postgresql2 |
198 | | -postgresql3 |
| 76 | +postgresql1 ansible_host=10.1.1.11 |
| 77 | +postgresql2 ansible_host=10.1.1.5 |
| 78 | +postgresql3 ansible_host=10.1.1.12 |
| 79 | + |
| 80 | +[postgresql:vars] |
| 81 | +postgresql_network_interface=enp7s0 |
| 82 | +wire_dbname=wire-server |
| 83 | +# Keys in `repmgr_node_config` must match the PostgreSQL hostnames above. |
| 84 | +repmgr_node_config={"postgresql1":{"node_id":1,"priority":150,"role":"primary"},"postgresql2":{"node_id":2,"priority":100,"role":"standby"},"postgresql3":{"node_id":3,"priority":50,"role":"standby"}} |
199 | 85 |
|
200 | | -# Add all postgresql primary nodes here |
| 86 | +# Primary PostgreSQL node. |
201 | 87 | [postgresql_rw] |
202 | 88 | postgresql1 |
203 | 89 |
|
204 | | -# Add all postgresql read-only nodes here i.e. replicas |
| 90 | +# Standby PostgreSQL nodes. |
205 | 91 | [postgresql_ro] |
206 | 92 | postgresql2 |
207 | 93 | postgresql3 |
| 94 | + |
| 95 | +# RabbitMQ nodes. |
| 96 | +[rmq-cluster] |
| 97 | +# host name here must match each node's actual hostname |
| 98 | +rabbitmq1 ansible_host=10.1.1.18 |
| 99 | +rabbitmq2 ansible_host=10.1.1.13 |
| 100 | +rabbitmq3 ansible_host=10.1.1.14 |
| 101 | + |
| 102 | +# `rabbitmq_cluster_master` must match one host in [rmq-cluster]. |
| 103 | +[rmq-cluster:vars] |
| 104 | +rabbitmq_cluster_master=rabbitmq1 |
| 105 | +rabbitmq_network_interface=enp7s0 |
0 commit comments