Shachar Borenstein
2018-04-15 18e15c85d303c65a42513526ef337970409aef84
commit | author | age
0850ad 1 ## TODO: What variables can we strip out of here to build complex variables?
S 2 ## i.e. what can we add into group_vars as opposed to config_vars?
3 ## Example: We don't really need "subdomain_base_short". If we want to use this,
4 ## should just toss in group_vars/all.
5 ### Also, we should probably just create a variable reference in the README.md
6 ### For now, just tagging comments in line with configuration file.
7
8 ###### VARIABLES YOU SHOULD CONFIGURE FOR YOUR DEPLOYEMNT
9 ###### OR PASS as "-e" args to ansible-playbook command
10 # #
11 # # env_groups:
12 # #   limit: "tag_Project_opentlc_shared_{{guid}}"
13 # #   bastions: "tag_AnsibleGroup_bastions"
14 # #   masters: "tag_AnsibleGroup_masters"
15 # #   nodes: "tag_AnsibleGroup_nodes"
16 # #   infranodes: "tag_AnsibleGroup_infranodes"
17 # #   nfs: "tag_AnsibleGroup_nfs"
18 #
19 # # This doesn't work
20 # all: "tag_Project_opentlc_shared_{{guid}}"
21 #
22 # # but maybe this is silly enough to work
23 # #all: "tag_Project_opentlc_shared_{{guid}}:&tag_Project_opentlc_shared_{{guid}}"
24 #rhn_pool_id_string: OpenShift Container Platform
25 # bastions: "{{env_groups['limit']}}:&{{env_groups['bastions']}}"
26 # masters: "{{env_groups['limit']}}:&{{env_groups['masters']}}"
27 # nodes: "{{env_groups['limit']}}:&{{env_groups['nodes']}}"
28 # infranodes: "{{env_groups['limit']}}:&{{env_groups['infranodes']}}"
29 # nfs: "{{env_groups['limit']}}:&{{env_groups['nfs']}}"
2f302f 30 install_ipa_client: false
651648 31 repo_method: file
c919e1 32 ocp_pvs:
ac3472 33   # - es-storage
WK 34   # - nexus
35   # - nexus2
36   # - nexus3
c919e1 37 config_nfs_uservols: "true"
S 38 user_vols: 200
39 user_vols_size: 4Gi
40 master_api_port: 443
7dab04 41 osrelease: 3.9.14
c919e1 42 openshift_master_overwrite_named_certificates: true
S 43 deploy_openshift: true
44 deploy_openshift_post: true
45 deploy_env_post: true
46 install_metrics: true
47 install_logging: true
c6075f 48 ovs_plugin: "subnet" # This can also be set to: "multitenant"
S 49 multi_tenant_setting: "os_sdn_network_plugin_name='redhat/openshift-ovs-{{ovs_plugin}}'"
a4a878 50 master_lb_dns: "loadbalancer1.{{subdomain_base}}"
cbed37 51 cloudapps_suffix: 'apps.{{subdomain_base}}'
c919e1 52 openshift_master_ldap_ca_file: 'openshift_master_ldap_ca_file=/root/ca.crt'
36724b 53 # htpasswd / ldap / allow_all
GC 54 install_idm: htpasswd
1decde 55
ac3472 56  ## If you are not part of GPTE you don't need this.
WK 57 opentlc_integration: true
1decde 58
0850ad 59 ################################################################################
S 60 #### GENERIC EXAMPLE
61 ################################################################################
62
63 install_common: true
64 install_nfs: true
65 install_bastion: false
66 env_authorized_key: "{{guid}}key"
67 set_env_authorized_key: true
de4400 68 software_to_deploy: "openshift"
0850ad 69 ################################################################################
S 70 #### OCP IMPLEMENATATION LAB
71 ################################################################################
72
7dab04 73 repo_version: '3.9'
0850ad 74 cloudapps_dns: '*.apps.{{subdomain_base}}.'
740db3 75 master_public_dns: "loadbalancer.{{subdomain_base}}."
0850ad 76
S 77 ################################################################################
78 #### Common host variables
79 ################################################################################
80
81 update_packages: false
82 common_packages:
83   - python
84   - unzip
85   - bash-completion
86   - tmux
87   - bind-utils
88   - wget
89   - git
90   - vim-enhanced
91   - ansible
7dab04 92   - net-tools
WK 93   - iptables-services
94   - bridge-utils
95   - sos
96   - psacct
0850ad 97
S 98 rhel_repos:
99   - rhel-7-server-rpms
100   - rhel-7-server-extras-rpms
101   - rhel-7-server-ose-{{repo_version}}-rpms
7dab04 102   - rhel-7-server-ansible-2.4-rpms
0850ad 103
6e39f1 104 use_subscription_manager: false
S 105 use_own_repos: true
0850ad 106 #rhn_pool_id_string: "Red Hat Enterprise Linux Server"
S 107 rhn_pool_id_string: OpenShift Container Platform
108
109 ################################################################################
110 #### nfs host settings
111 ################################################################################
112
113 nfs_vg: nfsvg
114 nfs_pvs: /dev/xvdb
115 nfs_export_path: /srv/nfs
0fa5c6 116 nfs_size: 50
0850ad 117
S 118 nfs_shares:
ac3472 119   # - jenkins
WK 120   # - nexus
0850ad 121
S 122 ################################################################################
123 #### CLOUD PROVIDER: AWS SPECIFIC VARIABLES
124 ################################################################################
125
126 #### Route 53 Zone ID (AWS)
127 HostedZoneId: ''
128 key_name: ''
129 aws_region: us-east-1
130
131 admin_user: ''
132 admin_user_password: ''
133
134 #### Connection Settings
135 ansible_ssh_user: ec2-user
136 remote_user: ec2-user
137
138 #### Networking (AWS)
139 guid: defaultguid
140 subdomain_base_short: "{{ guid }}"
141 subdomain_base_suffix: ".example.opentlc.com"
142 subdomain_base: "{{subdomain_base_short}}{{subdomain_base_suffix}}"
44feb0 143 tower_run: false
0850ad 144
S 145 #### Environment Sizing
146
c919e1 147 #bastion_instance_type: "t2.micro"
beb739 148 bastion_instance_type: "t2.large"
0850ad 149
740db3 150 support_instance_type: "t2.medium"
0850ad 151 support_instance_count: 1
S 152
e93dc8 153 node_instance_type: "t2.large"
0850ad 154 node_instance_count: 2
S 155
156 infranode_instance_type: "t2.large"
157 infranode_instance_count: 1
158
159 master_instance_type: "t2.large"
160 master_instance_count: 1
161
162 loadbalancer_instance_count: 1
163 loadbalancer_instance_type: "t2.small"
164
ac3472 165 # scaleup
WK 166 new_node_instance_count: 0
167
0850ad 168 ansible_ssh_private_key_file: ~/.ssh/{{key_name}}.pem
S 169
170
171 #### VARIABLES YOU SHOULD ***NOT*** CONFIGURE FOR YOUR DEPLOYEMNT
172 #### You can, but you usually wouldn't need to.
173
174 #### CLOUDFORMATIONS vars
175
176 project_tag: "{{ env_type }}-{{ guid }}"
177
7dab04 178 docker_version: "1.13.1"
0850ad 179 docker_device: /dev/xvdb
S 180
181 create_internal_dns_entries: true
182 zone_internal_dns: "{{guid}}.internal."
183 chomped_zone_internal_dns: "{{guid}}.internal"
184 zone_public_dns: "{{subdomain_base}}."
185
186 bastion_public_dns: "bastion.{{subdomain_base}}."
5f0e4d 187 bastion_public_dns_chomped: "bastion.{{subdomain_base}}"
123384 188
S 189
190 # vpcid_cidr_block: "192.168.0.0/16"
0850ad 191 vpcid_name_tag: "{{subdomain_base}}"
S 192
123384 193 # az_1_name: "{{ aws_region }}a"
S 194 # az_2_name: "{{ aws_region }}b"
195 #
196 # subnet_private_1_cidr_block: "192.168.2.0/24"
197 # subnet_private_1_az: "{{ az_2_name }}"
198 # subnet_private_1_name_tag: "{{subdomain_base}}-private"
199 #
200 # subnet_private_2_cidr_block: "192.168.1.0/24"
201 # subnet_private_2_az: "{{ az_1_name }}"
202 # subnet_private_2_name_tag: "{{subdomain_base}}-private"
203 #
204 # subnet_public_1_cidr_block: "192.168.10.0/24"
205 # subnet_public_1_az: "{{ az_1_name }}"
206 # subnet_public_1_name_tag: "{{subdomain_base}}-public"
207 #
208 # subnet_public_2_cidr_block: "192.168.20.0/24"
209 # subnet_public_2_az: "{{ az_2_name }}"
210 # subnet_public_2_name_tag: "{{subdomain_base}}-public"
0850ad 211
123384 212 # dopt_domain_name: "{{ aws_region }}.compute.internal"
S 213 #
214 # rtb_public_name_tag: "{{subdomain_base}}-public"
215 # rtb_private_name_tag: "{{subdomain_base}}-private"
216 #
217 # cf_template_description: "{{ env_type }}-{{ guid }} template"
8fd65b 218
GC 219 rootfs_size_node: 50
220 rootfs_size_infranode: 50
221 rootfs_size_master: 50
222 rootfs_size_bastion: 20
223 rootfs_size_support: 20
4338f7 224 rootfs_size_loadbalancer: 20
GC 225
226 instances:
227   - name: "bastion"
228     count: 1
229     unique: true
230     public_dns: true
231     dns_loadbalancer: true
232     flavor:
233       "ec2": "{{bastion_instance_type}}"
234     tags:
235       - key: "AnsibleGroup"
236         value: "bastions"
237       - key: "ostype"
238         value: "linux"
239     rootfs_size: "{{ rootfs_size_bastion }}"
240
241   - name: "loadbalancer"
242     count: "{{loadbalancer_instance_count}}"
243     public_dns: true
244     dns_loadbalancer: true
245     flavor:
246       "ec2": "{{loadbalancer_instance_type}}"
247     tags:
248       - key: "AnsibleGroup"
249         value: "loadbalancers"
250       - key: "ostype"
251         value: "linux"
252     rootfs_size: "{{ rootfs_size_loadbalancer }}"
253
254   - name: "master"
255     count: "{{master_instance_count}}"
256     public_dns: false
257     dns_loadbalancer: false
258     flavor:
259       "ec2": "{{master_instance_type}}"
260     tags:
261       - key: "AnsibleGroup"
262         value: "masters"
263       - key: "ostype"
264         value: "linux"
265     rootfs_size: "{{ rootfs_size_master }}"
266     volumes:
267       - device_name: "{{docker_device}}"
268         volume_size: 20
269         volume_type: gp2
270
271   - name: "node"
272     count: "{{node_instance_count}}"
273     public_dns: false
274     dns_loadbalancer: false
275     flavor:
276       "ec2": "{{node_instance_type}}"
277     tags:
278       - key: "AnsibleGroup"
279         value: "nodes"
280       - key: "ostype"
281         value: "linux"
282     rootfs_size: "{{ rootfs_size_node }}"
283     volumes:
284       - device_name: "{{docker_device}}"
285         volume_size: 100
286         volume_type: gp2
287
288   - name: "infranode"
289     count: "{{infranode_instance_count}}"
290     public_dns: true
291     dns_loadbalancer: true
292     flavor:
293       "ec2": "{{infranode_instance_type}}"
294     tags:
295       - key: "AnsibleGroup"
296         value: "infranodes"
297       - key: "ostype"
298         value: "linux"
299     rootfs_size: "{{ rootfs_size_infranode }}"
300     volumes:
301       - device_name: "{{docker_device}}"
302         volume_size: 50
303         volume_type: gp2
304
305   - name: "support"
306     count: "{{support_instance_count}}"
307     public_dns: false
308     dns_loadbalancer: false
309     flavor:
310       "ec2": "{{support_instance_type}}"
311     tags:
312       - key: "AnsibleGroup"
313         value: "support"
314       - key: "ostype"
315         value: "linux"
316     rootfs_size: "{{ rootfs_size_support }}"
317     volumes:
318       - device_name: "{{nfs_pvs}}"
319         volume_size: "{{nfs_size}}"
320         volume_type: gp2