Tok
2018-11-09 04259f14a042c84a1164402d9ac2009c9db6adf5
commit | author | age
61c0a5 1 #
JM 2 # ansible inventory for OpenShift Container Platform  3.11.16
2ff71f 3 # AgnosticD ansible-config: ocp-ha-lab
61c0a5 4
JM 5 [OSEv3:vars]
6
7 ###########################################################################
8 ### Ansible Vars
9 ###########################################################################
10 timeout=60
11 ansible_user={{ansible_ssh_user}}
12 ansible_become=yes
13
14 ###########################################################################
15 ### OpenShift Basic Vars
16 ###########################################################################
17
2a235d 18 openshift_deployment_type=openshift-enterprise
61c0a5 19
JM 20 openshift_disable_check="disk_availability,memory_availability,docker_image_availability"
21
2ff71f 22 # OpenShift Version:
61c0a5 23 # If you modify the openshift_image_tag or the openshift_pkg_version variables after the cluster is set up, then an upgrade can be triggered, resulting in downtime.
JM 24 # If openshift_image_tag is set, its value is used for all hosts in system container environments, even those that have another version installed. If
2ff71f 25 # Use this variable to specify a container image tag to install or configure.
JM 26 #openshift_pkg_version is set, its value is used for all hosts in RPM-based environments, even those that have another version installed.
2a235d 27 openshift_image_tag=
2ff71f 28 # Use this variable to specify an RPM version to install or configure.
2a235d 29 openshift_pkg_version=
2ff71f 30 openshift_release=
61c0a5 31
JM 32 {% if container_runtime == "cri-o" %}
2a235d 33 openshift_use_crio=
JM 34 openshift_crio_enable_docker_gc=
35 openshift_crio_docker_gc_node_selector=
61c0a5 36 {% endif %}
JM 37
38 # Node Groups
2ff71f 39 openshift_node_groups=
2a235d 40 # Configure node kubelet arguments. pods-per-core is valid in OpenShift Origin 1.3 or OpenShift Container Platform 3.3 and later. -> These  need to go into the above
JM 41 # openshift_node_kubelet_args={'pods-per-core': ['10'], 'max-pods': ['250'], 'image-gc-high-threshold': ['85'], 'image-gc-low-threshold': ['75']}
61c0a5 42
JM 43 # Configure logrotate scripts
44 # See: https://github.com/nickhammond/ansible-logrotate
45 logrotate_scripts=[{"name": "syslog", "path": "/var/log/cron\n/var/log/maillog\n/var/log/messages\n/var/log/secure\n/var/log/spooler\n", "options": ["daily", "rotate 7","size 500M", "compress", "sharedscripts", "missingok"], "scripts": {"postrotate": "/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true"}}]
46
2ff71f 47 # Deploy Operator Lifecycle Manager Tech Preview
JM 48 openshift_enable_olm=
61c0a5 49
JM 50 ###########################################################################
2ff71f 51 ### OpenShift Registries Locations
61c0a5 52 ###########################################################################
JM 53
2a235d 54 #oreg_url=registry.access.redhat.com/openshift3/ose-${component}:${version}
2ff71f 55 oreg_url=
JM 56 oreg_auth_user=
57 oreg_auth_password=
58
59 # For Operator Framework Images
60 openshift_additional_registry_credentials=
61
62 openshift_examples_modify_imagestreams=
61c0a5 63
2a235d 64 {% if install_glusterfs|bool %}
61c0a5 65 ###########################################################################
2ff71f 66 ### OpenShift Container Storage
61c0a5 67 ###########################################################################
JM 68
2ff71f 69 openshift_master_dynamic_provisioning_enabled=
61c0a5 70
2ff71f 71 # CNS storage cluster
JM 72 # From https://github.com/red-hat-storage/openshift-cic
73 openshift_storage_glusterfs_namespace=
74 openshift_storage_glusterfs_storageclass=
75 openshift_storage_glusterfs_storageclass_default=
61c0a5 76
2ff71f 77 openshift_storage_glusterfs_block_deploy=
JM 78 openshift_storage_glusterfs_block_host_vol_create=
79 openshift_storage_glusterfs_block_host_vol_size=
80 openshift_storage_glusterfs_block_storageclass=
81 openshift_storage_glusterfs_block_storageclass_default=
82
83 # Container image to use for glusterfs pods
2a235d 84 openshift_storage_glusterfs_image=
2ff71f 85
JM 86 # Container image to use for glusterblock-provisioner pod
2a235d 87 openshift_storage_glusterfs_block_image=
2ff71f 88
JM 89 # Container image to use for heketi pods
2a235d 90 openshift_storage_glusterfs_heketi_image=
2ff71f 91
JM 92 # GlusterFS version
61c0a5 93 #  Knowledgebase
JM 94 #   https://access.redhat.com/solutions/3617551
95 #  Bugzilla
96 #   https://bugzilla.redhat.com/show_bug.cgi?id=163.1057
97 #  Complete OpenShift GlusterFS Configuration README
98 #   https://github.com/openshift/openshift-ansible/tree/master/roles/openshift_storage_glusterfs
2a235d 99 openshift_storage_glusterfs_version=
JM 100 openshift_storage_glusterfs_block_version=
101 openshift_storage_glusterfs_s3_version=
102 openshift_storage_glusterfs_heketi_version=
103 # openshift_storage_glusterfs_registry_version=v3.10
104 # openshift_storage_glusterfs_registry_block_version=v3.10
105 # openshift_storage_glusterfs_registry_s3_version=v3.10
106 # openshift_storage_glusterfs_registry_heketi_version=v3.10
2ff71f 107 {% endif %}
JM 108
109 {% if install_nfs|bool %}
110 # Set this line to enable NFS
111 openshift_enable_unsupported_configurations=
112 {% endif %}
113
114 ###########################################################################
115 ### OpenShift Master Vars
116 ###########################################################################
117
118 openshift_master_api_port=
119 openshift_master_console_port=
120
121 #Default:  openshift_master_cluster_method=native
122 openshift_master_cluster_hostname=
123 openshift_master_cluster_public_hostname=
124 openshift_master_default_subdomain=
125 #openshift_master_ca_certificate=
126 openshift_master_overwrite_named_certificates=
127
128 # Audit log
129 # openshift_master_audit_config={"enabled": true, "auditFilePath": "/var/log/openpaas-oscp-audit/openpaas-oscp-audit.log", "maximumFileRetentionDays": 14, "maximumFileSizeMegabytes": 500, "maximumRetainedFiles": 5}
130
131 # ocp-ha-lab
132 # AWS Autoscaler
133 #openshift_master_bootstrap_auto_approve=false
134 # This variable is a cluster identifier unique to the AWS Availability Zone. Using this avoids potential issues in Amazon Web Services (AWS) with multiple zones or multiple clusters.
135 #openshift_clusterid
61c0a5 136
JM 137 ###########################################################################
138 ### OpenShift Network Vars
139 ###########################################################################
140
141 osm_cluster_network_cidr=10.1.0.0/16
142 openshift_portal_net=172.30.0.0/16
143
2a235d 144 # os_sdn_network_plugin_name='redhat/openshift-ovs-networkpolicy'
JM 145 {{multi_tenant_setting}}
61c0a5 146
JM 147 ###########################################################################
148 ### OpenShift Authentication Vars
149 ###########################################################################
150
151
2a235d 152 # LDAP AND HTPASSWD Authentication (download ipa-ca.crt first)
beda50 153 #openshift_master_identity_providers=
2a235d 154
JM 155 # Just LDAP
156 #openshift_master_identity_providers=[{'name': 'ldap', 'challenge': 'true', 'login': 'true', 'kind': 'LDAPPasswordIdentityProvider','attributes': {'id': ['dn'], 'email': ['mail'], 'name': ['cn'], 'preferredUsername': ['uid']}, 'bindDN': 'uid=admin,cn=users,cn=accounts,dc=shared,dc=example,dc=opentlc,dc=com', 'bindPassword': 'r3dh4t1!', 'ca': '/etc/origin/master/ipa-ca.crt','insecure': 'false', 'url': 'ldaps://ipa.shared.example.opentlc.com:636/cn=users,cn=accounts,dc=shared,dc=example,dc=opentlc,dc=com?uid?sub?(memberOf=cn=ocp-users,cn=groups,cn=accounts,dc=shared,dc=example,dc=opentlc,dc=com)'}]
157
158 # Just HTPASSWD
beda50 159 openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider'}]
2a235d 160
JM 161 # LDAP and HTPASSWD dependencies
162
163 openshift_master_htpasswd_file=/root/htpasswd.openshift
beda50 164 #openshift_master_ldap_ca_file=/root/ipa-ca.crt
2ff71f 165
JM 166 {% if admission_plugin_config is defined %}
167 ###########################################################################
168 ### OpenShift admission plugin config
169 ###########################################################################
170
2a235d 171 openshift_master_admission_plugin_config={{admission_plugin_config|to_json}}
2ff71f 172 {% endif %}
61c0a5 173
JM 174 ###########################################################################
175 ### OpenShift Metrics and Logging Vars
176 ###########################################################################
177
2ff71f 178 #########################
JM 179 # Prometheus Metrics
180 #########################
61c0a5 181
2ff71f 182 openshift_hosted_prometheus_deploy=
JM 183 openshift_prometheus_namespace=
184 openshift_prometheus_node_selector=
185
186 openshift_cluster_monitoring_operator_install=
187
188 {% if install_glusterfs|bool %}
2a235d 189 openshift_cluster_monitoring_operator_prometheus_storage_capacity=20Gi
JM 190 openshift_cluster_monitoring_operator_alertmanager_storage_capacity=2Gi
191 openshift_cluster_monitoring_operator_prometheus_storage_enabled=True
192 openshift_cluster_monitoring_operator_alertmanager_storage_enabled=True
2ff71f 193
JM 194 # The next two will be enabled in 3.11.z
195 # will use deafult storage class until then
196 # so set the block storage class as default
197
198 # openshift_cluster_monitoring_operator_prometheus_storage_class_name='glusterfs-storage-block'
199 # openshift_cluster_monitoring_operator_alertmanager_storage_class_name='glusterfs-storage-block'
61c0a5 200 {% endif %}
JM 201
2ff71f 202 ########################
JM 203 # Cluster Metrics
204 ########################
205
206 openshift_metrics_install_metrics=
207
208 {% if install_nfs|bool and not install_glusterfs|bool %}
209 openshift_metrics_storage_kind=
210 openshift_metrics_storage_access_modes=
211 openshift_metrics_storage_nfs_directory=
212 openshift_metrics_storage_nfs_options=
213 openshift_metrics_storage_volume_name=
214 openshift_metrics_storage_volume_size=
215 openshift_metrics_storage_labels=
216 openshift_metrics_cassandra_pvc_storage_class_name=
217 {% endif %}
218
219 {% if install_glusterfs|bool %}
220 openshift_metrics_cassandra_storage_type=
221 openshift_metrics_cassandra_pvc_storage_class_name=
222 {% endif %}
223
224 openshift_metrics_hawkular_nodeselector=
225 openshift_metrics_cassandra_nodeselector=
226 openshift_metrics_heapster_nodeselector=
61c0a5 227
JM 228 # Store Metrics for 2 days
229 openshift_metrics_duration=2
230
231 # Suggested Quotas and limits for Prometheus components:
2a235d 232 openshift_prometheus_memory_requests=2Gi
JM 233 openshift_prometheus_cpu_requests=750m
234 openshift_prometheus_memory_limit=2Gi
235 openshift_prometheus_cpu_limit=750m
236 openshift_prometheus_alertmanager_memory_requests=300Mi
237 openshift_prometheus_alertmanager_cpu_requests=200m
238 openshift_prometheus_alertmanager_memory_limit=300Mi
239 openshift_prometheus_alertmanager_cpu_limit=200m
240 openshift_prometheus_alertbuffer_memory_requests=300Mi
241 openshift_prometheus_alertbuffer_cpu_requests=200m
242 openshift_prometheus_alertbuffer_memory_limit=300Mi
243 openshift_prometheus_alertbuffer_cpu_limit=200m
2ff71f 244
61c0a5 245 {# The following file will need to be copied over to the bastion before deployment
JM 246 # There is an example in ocp-workshop/files
247 # openshift_prometheus_additional_rules_file=/root/prometheus_alerts_rules.yml #}
248
249 # Grafana
2ff71f 250 openshift_grafana_node_selector=
JM 251 openshift_grafana_storage_type=
252 openshift_grafana_pvc_size=
253 openshift_grafana_node_exporter=
61c0a5 254 {% if install_glusterfs|bool %}
2a235d 255 openshift_grafana_sc_name=glusterfs-storage
61c0a5 256 {% endif %}
JM 257
2ff71f 258 ########################
JM 259 # Cluster Logging
61c0a5 260 ########################
JM 261
2ff71f 262 openshift_logging_install_logging=
JM 263 openshift_logging_install_eventrouter=
61c0a5 264
JM 265 {% if install_nfs|bool and not install_glusterfs|bool %}
2ff71f 266 openshift_logging_storage_kind=
JM 267 openshift_logging_storage_access_modes=
268 openshift_logging_storage_nfs_directory=
269 openshift_logging_storage_nfs_options=
270 openshift_logging_storage_volume_name=
271 openshift_logging_storage_volume_size=
272 openshift_logging_storage_labels=
273 openshift_logging_es_pvc_storage_class_name=
61c0a5 274 {% endif %}
JM 275 {% if install_glusterfs|bool %}
2a235d 276 openshift_logging_es_pvc_dynamic=true
JM 277 openshift_logging_es_pvc_size=20Gi
278 openshift_logging_es_pvc_storage_class_name='glusterfs-storage-block'
61c0a5 279 {% endif %}
JM 280 openshift_logging_es_memory_limit=8Gi
281 openshift_logging_es_cluster_size=1
2a235d 282 openshift_logging_curator_default_days=2
2ff71f 283
JM 284 openshift_logging_kibana_nodeselector=
285 openshift_logging_curator_nodeselector=
286 openshift_logging_es_nodeselector=
287 openshift_logging_eventrouter_nodeselector=
61c0a5 288
JM 289 ###########################################################################
290 ### OpenShift Router and Registry Vars
291 ###########################################################################
292
2ff71f 293 # default selectors for router and registry services
2a235d 294 # openshift_router_selector='node-role.kubernetes.io/infra=true'
JM 295 # openshift_registry_selector='node-role.kubernetes.io/infra=true'
2ff71f 296
JM 297 openshift_hosted_router_replicas=
61c0a5 298
JM 299 # openshift_hosted_router_certificate={"certfile": "/path/to/router.crt", "keyfile": "/path/to/router.key", "cafile": "/path/to/router-ca.crt"}
300
2a235d 301 openshift_hosted_registry_replicas=1
JM 302 openshift_hosted_registry_pullthrough=true
303 openshift_hosted_registry_acceptschema2=true
304 openshift_hosted_registry_enforcequota=true
61c0a5 305
2ff71f 306 {% if install_glusterfs|bool %}
2a235d 307 openshift_hosted_registry_storage_kind=glusterfs
JM 308 openshift_hosted_registry_storage_volume_size=10Gi
309 openshift_hosted_registry_selector="node-role.kubernetes.io/infra=true"
61c0a5 310 {% endif %}
JM 311
2ff71f 312 {% if install_nfs|bool %}
JM 313 openshift_hosted_registry_storage_kind=
314 openshift_hosted_registry_storage_access_modes=
315 openshift_hosted_registry_storage_nfs_directory=
316 openshift_hosted_registry_storage_nfs_options=
317 openshift_hosted_registry_storage_volume_name=
318 openshift_hosted_registry_storage_volume_size=
319 {% endif %}
61c0a5 320
JM 321 ###########################################################################
322 ### OpenShift Service Catalog Vars
323 ###########################################################################
324
2ff71f 325 # default=true
JM 326 openshift_enable_service_catalog=
61c0a5 327
2ff71f 328 # default=true
JM 329 template_service_broker_install=
330 openshift_template_service_broker_namespaces=
61c0a5 331
2ff71f 332 # default=true
2a235d 333 ansible_service_broker_install=true
JM 334 ansible_service_broker_local_registry_whitelist=['.*-apb$']
61c0a5 335
JM 336 ###########################################################################
337 ### OpenShift Hosts
338 ###########################################################################
2ff71f 339 # openshift_node_labels DEPRECATED
JM 340 # openshift_node_problem_detector_install
341
61c0a5 342 [OSEv3:children]
JM 343 lb
344 masters
345 etcd
346 nodes
347 {% if install_nfs|bool %}
348 nfs
349 {% endif %}
350 {% if install_glusterfs|bool %}
2ff71f 351 glusterfs
61c0a5 352 {% endif %}
JM 353
354 [lb]
355 {% for host in groups['loadbalancers'] %}
356 {{ hostvars[host].internaldns }}
357 {% endfor %}
358
359 [masters]
360 {% for host in groups['masters']|sort %}
361 {{ hostvars[host].internaldns }}
362 {% endfor %}
363
364 [etcd]
365 {% for host in groups['masters']|sort %}
366 {{ hostvars[host].internaldns }}
367 {% endfor %}
368
369 [nodes]
370 ## These are the masters
371 {% for host in groups['masters']|sort %}
2ff71f 372 {{ hostvars[host].internaldns }} openshift_node_group_name='node-config-master' openshift_node_problem_detector_install=true
61c0a5 373 {% endfor %}
JM 374
375 ## These are infranodes
376 {% for host in groups['infranodes']|sort %}
2ff71f 377 {{ hostvars[host].internaldns }} openshift_node_group_name='node-config-infra' openshift_node_problem_detector_install=true
61c0a5 378 {% endfor %}
JM 379
380 ## These are regular nodes
381 {% for host in groups['nodes']|sort %}
2ff71f 382 {{ hostvars[host].internaldns }} openshift_node_group_name='node-config-compute' openshift_node_problem_detector_install=true
61c0a5 383 {% endfor %}
JM 384
2a235d 385 {% if install_glusterfs|bool %}
61c0a5 386 ## These are OCS nodes
JM 387 {% for host in groups['support']|sort %}
2ff71f 388 {{ hostvars[host].internaldns }} openshift_node_group_name='node-config-compute' openshift_node_problem_detector_install=true
61c0a5 389 {% endfor %}
2a235d 390 {% endif %}
61c0a5 391
JM 392 {% if install_nfs|bool %}
393 [nfs]
394 {% for host in [groups['support']|sort|first] %}
395 {{ hostvars[host].internaldns }}
396 {% endfor %}
397 {% endif %}
398
2a235d 399 {% if install_glusterfs|bool %}
2ff71f 400 [glusterfs]
61c0a5 401 {% for host in groups['support']|sort %}
2ff71f 402 {{ hostvars[host].internaldns }} glusterfs_devices='[ "{{ glusterfs_app_device_name }}" ]'
61c0a5 403 {% endfor %}
2a235d 404 {% endif %}