hosts.origin.example 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. # This is an example of a bring your own (byo) host inventory
  2. # Create an OSEv3 group that contains the masters and nodes groups
  3. [OSEv3:children]
  4. masters
  5. nodes
  6. etcd
  7. lb
  8. nfs
  9. # Set variables common for all OSEv3 hosts
  10. [OSEv3:vars]
  11. # SSH user, this user should allow ssh based auth without requiring a
  12. # password. If using ssh key based auth, then the key should be managed by an
  13. # ssh agent.
  14. ansible_ssh_user=root
  15. # If ansible_ssh_user is not root, ansible_become must be set to true and the
  16. # user must be configured for passwordless sudo
  17. #ansible_become=yes
  18. # Debug level for all OpenShift components (Defaults to 2)
  19. debug_level=2
  20. # deployment type valid values are origin, online, atomic-enterprise and openshift-enterprise
  21. deployment_type=origin
  22. # Install the openshift examples
  23. #openshift_install_examples=true
  24. # Enable cluster metrics
  25. #use_cluster_metrics=true
  26. # Configure logoutURL in the master config for console customization
  27. # See: https://docs.openshift.org/latest/install_config/web_console_customization.html#changing-the-logout-url
  28. #openshift_master_logout_url=http://example.com
  29. # Configure extensionScripts in the master config for console customization
  30. # See: https://docs.openshift.org/latest/install_config/web_console_customization.html#loading-custom-scripts-and-stylesheets
  31. #openshift_master_extension_scripts=['/path/to/script1.js','/path/to/script2.js']
  32. # Configure extensionStylesheets in the master config for console customization
  33. # See: https://docs.openshift.org/latest/install_config/web_console_customization.html#loading-custom-scripts-and-stylesheets
  34. #openshift_master_extension_stylesheets=['/path/to/stylesheet1.css','/path/to/stylesheet2.css']
  35. # Configure extensions in the master config for console customization
  36. # See: https://docs.openshift.org/latest/install_config/web_console_customization.html#serving-static-files
  37. #openshift_master_extensions=[{'name': 'images', 'sourceDirectory': '/path/to/my_images'}]
  38. # Configure extensions in the master config for console customization
  39. # See: https://docs.openshift.org/latest/install_config/web_console_customization.html#serving-static-files
  40. #openshift_master_oauth_template=/path/to/login-template.html
  41. # Configure metricsPublicURL in the master config for cluster metrics
  42. # See: https://docs.openshift.org/latest/install_config/cluster_metrics.html
  43. #openshift_master_metrics_public_url=https://hawkular-metrics.example.com/hawkular/metrics
  44. # Configure loggingPublicURL in the master config for aggregate logging
  45. # See: https://docs.openshift.org/latest/install_config/aggregate_logging.html
  46. #openshift_master_logging_public_url=https://kibana.example.com
  47. # Configure imagePolicyConfig in the master config
  48. # See: https://godoc.org/github.com/openshift/origin/pkg/cmd/server/api#ImagePolicyConfig
  49. #openshift_master_image_policy_config={"maxImagesBulkImportedPerRepository": 3, "disableScheduledImport": true}
  50. # Docker Configuration
  51. # Add additional, insecure, and blocked registries to global docker configuration
  52. # For enterprise deployment types we ensure that registry.access.redhat.com is
  53. # included if you do not include it
  54. #openshift_docker_additional_registries=registry.example.com
  55. #openshift_docker_insecure_registries=registry.example.com
  56. #openshift_docker_blocked_registries=registry.hacker.com
  57. # Disable pushing to dockerhub
  58. #openshift_docker_disable_push_dockerhub=True
  59. # Items added, as is, to end of /etc/sysconfig/docker OPTIONS
  60. #openshift_docker_options="-l warn --ipv6=false"
  61. # Deprecated methods to set --log-driver and --log-opts flags, use openshift_docker_options instead
  62. #openshift_docker_log_driver=json
  63. #openshift_docker_log_options=["tag=mailer"]
  64. # Alternate image format string. If you're not modifying the format string and
  65. # only need to inject your own registry you may want to consider
  66. # openshift_docker_additional_registries instead
  67. #oreg_url=example.com/openshift3/ose-${component}:${version}
  68. # Origin copr repo
  69. #openshift_additional_repos=[{'id': 'openshift-origin-copr', 'name': 'OpenShift Origin COPR', 'baseurl': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/epel-7-$basearch/', 'enabled': 1, 'gpgcheck': 1, gpgkey: 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/pubkey.gpg'}]
  70. # Origin Fedora copr repo
  71. # Use this if you are installing on Fedora
  72. #openshift_additional_repos=[{'id': 'fedora-openshift-origin-copr', 'name': 'OpenShift Origin COPR for Fedora', 'baseurl': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/fedora-openshift/fedora-$releasever-$basearch/', 'enabled': 1, 'gpgcheck': 1, gpgkey: 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/fedora-openshift/pubkey.gpg'}]
  73. # htpasswd auth
  74. openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
  75. # Defining htpasswd users
  76. #openshift_master_htpasswd_users={'user1': '<pre-hashed password>', 'user2': '<pre-hashed password>'
  77. # or
  78. #openshift_master_htpasswd_file=<path to local pre-generated htpasswd file>
  79. # Allow all auth
  80. #openshift_master_identity_providers=[{'name': 'allow_all', 'login': 'true', 'challenge': 'true', 'kind': 'AllowAllPasswordIdentityProvider'}]
  81. # LDAP auth
  82. #openshift_master_identity_providers=[{'name': 'my_ldap_provider', 'challenge': 'true', 'login': 'true', 'kind': 'LDAPPasswordIdentityProvider', 'attributes': {'id': ['dn'], 'email': ['mail'], 'name': ['cn'], 'preferredUsername': ['uid']}, 'bindDN': '', 'bindPassword': '', 'ca': '', 'insecure': 'false', 'url': 'ldap://ldap.example.com:389/ou=users,dc=example,dc=com?uid'}]
  83. # Configuring the ldap ca certificate
  84. #openshift_master_ldap_ca=<ca text>
  85. # or
  86. #openshift_master_ldap_ca_file=<path to local ca file to use>
  87. # Available variables for configuring certificates for other identity providers:
  88. #openshift_master_openid_ca
  89. #openshift_master_openid_ca_file
  90. #openshift_master_request_header_ca
  91. #openshift_master_request_header_ca_file
  92. # Cloud Provider Configuration
  93. #
  94. # Note: You may make use of environment variables rather than store
  95. # sensitive configuration within the ansible inventory.
  96. # For example:
  97. #openshift_cloudprovider_aws_access_key="{{ lookup('env','AWS_ACCESS_KEY_ID') }}"
  98. #openshift_cloudprovider_aws_secret_key="{{ lookup('env','AWS_SECRET_ACCESS_KEY') }}"
  99. #
  100. # AWS
  101. #openshift_cloudprovider_kind=aws
  102. # Note: IAM profiles may be used instead of storing API credentials on disk.
  103. #openshift_cloudprovider_aws_access_key=aws_access_key_id
  104. #openshift_cloudprovider_aws_secret_key=aws_secret_access_key
  105. #
  106. # Openstack
  107. #openshift_cloudprovider_kind=openstack
  108. #openshift_cloudprovider_openstack_auth_url=http://openstack.example.com:35357/v2.0/
  109. #openshift_cloudprovider_openstack_username=username
  110. #openshift_cloudprovider_openstack_password=password
  111. #openshift_cloudprovider_openstack_tenand_id=tenant_id
  112. #openshift_cloudprovider_openstack_tenant_name=tenant_name
  113. #openshift_cloudprovider_openstack_region=region
  114. #openshift_cloudprovider_openstack_lb_subnet_id=subnet_id
  115. # Project Configuration
  116. #osm_project_request_message=''
  117. #osm_project_request_template=''
  118. #osm_mcs_allocator_range='s0:/2'
  119. #osm_mcs_labels_per_project=5
  120. #osm_uid_allocator_range='1000000000-1999999999/10000'
  121. # Enable cockpit
  122. #osm_use_cockpit=true
  123. #
  124. # Set cockpit plugins
  125. #osm_cockpit_plugins=['cockpit-kubernetes']
  126. # Native high availability cluster method with optional load balancer.
  127. # If no lb group is defined, the installer assumes that a load balancer has
  128. # been preconfigured. For installation the value of
  129. # openshift_master_cluster_hostname must resolve to the load balancer
  130. # or to one or all of the masters defined in the inventory if no load
  131. # balancer is present.
  132. #openshift_master_cluster_method=native
  133. #openshift_master_cluster_hostname=openshift-ansible.test.example.com
  134. #openshift_master_cluster_public_hostname=openshift-ansible.test.example.com
  135. # Pacemaker high availability cluster method.
  136. # Pacemaker HA environment must be able to self provision the
  137. # configured VIP. For installation openshift_master_cluster_hostname
  138. # must resolve to the configured VIP.
  139. #openshift_master_cluster_method=pacemaker
  140. #openshift_master_cluster_password=openshift_cluster
  141. #openshift_master_cluster_vip=192.168.133.25
  142. #openshift_master_cluster_public_vip=192.168.133.25
  143. #openshift_master_cluster_hostname=openshift-ansible.test.example.com
  144. #openshift_master_cluster_public_hostname=openshift-ansible.test.example.com
  145. # Override the default controller lease ttl
  146. #osm_controller_lease_ttl=30
  147. # Configure controller arguments
  148. #osm_controller_args={'resource-quota-sync-period': ['10s']}
  149. # Configure api server arguments
  150. #osm_api_server_args={'max-requests-inflight': ['400']}
  151. # default subdomain to use for exposed routes
  152. #openshift_master_default_subdomain=apps.test.example.com
  153. # additional cors origins
  154. #osm_custom_cors_origins=['foo.example.com', 'bar.example.com']
  155. # default project node selector
  156. #osm_default_node_selector='region=primary'
  157. # Override the default pod eviction timeout
  158. #openshift_master_pod_eviction_timeout=5m
  159. # default storage plugin dependencies to install, by default the ceph and
  160. # glusterfs plugin dependencies will be installed, if available.
  161. #osn_storage_plugin_deps=['ceph','glusterfs','iscsi']
  162. # OpenShift Router Options
  163. #
  164. # An OpenShift router will be created during install if there are
  165. # nodes present with labels matching the default router selector,
  166. # "region=infra". Set openshift_node_labels per node as needed in
  167. # order to label nodes.
  168. #
  169. # Example:
  170. # [nodes]
  171. # node.example.com openshift_node_labels="{'region': 'infra'}"
  172. #
  173. # Router selector (optional)
  174. # Router will only be created if nodes matching this label are present.
  175. # Default value: 'region=infra'
  176. #openshift_hosted_router_selector='region=infra'
  177. #
  178. # Router replicas (optional)
  179. # Unless specified, openshift-ansible will calculate the replica count
  180. # based on the number of nodes matching the openshift router selector.
  181. #openshift_hosted_router_replicas=2
  182. #
  183. # Router certificate (optional)
  184. # Provide local certificate paths which will be configured as the
  185. # router's default certificate.
  186. #openshift_hosted_router_certificate={"certfile": "/path/to/router.crt", "keyfile": "/path/to/router.key"}
  187. # Openshift Registry Options
  188. #
  189. # An OpenShift registry will be created during install if there are
  190. # nodes present with labels matching the default registry selector,
  191. # "region=infra". Set openshift_node_labels per node as needed in
  192. # order to label nodes.
  193. #
  194. # Example:
  195. # [nodes]
  196. # node.example.com openshift_node_labels="{'region': 'infra'}"
  197. #
  198. # Registry selector (optional)
  199. # Registry will only be created if nodes matching this label are present.
  200. # Default value: 'region=infra'
  201. #openshift_registry_selector='region=infra'
  202. # Configure the multi-tenant SDN plugin (default is 'redhat/openshift-ovs-subnet')
  203. # os_sdn_network_plugin_name='redhat/openshift-ovs-multitenant'
  204. # Disable the OpenShift SDN plugin
  205. # openshift_use_openshift_sdn=False
  206. # Configure SDN cluster network CIDR block. This network block should
  207. # be a private block and should not conflict with existing network
  208. # blocks in your infrastructure that pods may require access to.
  209. # Can not be changed after deployment.
  210. #osm_cluster_network_cidr=10.1.0.0/16
  211. # Configure number of bits to allocate to each host’s subnet e.g. 8
  212. # would mean a /24 network on the host.
  213. #osm_host_subnet_length=8
  214. # Configure master API and console ports.
  215. #openshift_master_api_port=8443
  216. #openshift_master_console_port=8443
  217. # set RPM version for debugging purposes
  218. #openshift_pkg_version=-1.1
  219. # Configure custom named certificates
  220. # NOTE: openshift_master_named_certificates is cached on masters and is an
  221. # additive fact, meaning that each run with a different set of certificates
  222. # will add the newly provided certificates to the cached set of certificates.
  223. # If you would like openshift_master_named_certificates to be overwritten with
  224. # the provided value, specify openshift_master_overwrite_named_certificates.
  225. #openshift_master_overwrite_named_certificates: true
  226. #
  227. # Provide local certificate paths which will be deployed to masters
  228. #openshift_master_named_certificates=[{"certfile": "/path/to/custom1.crt", "keyfile": "/path/to/custom1.key"}]
  229. #
  230. # Detected names may be overridden by specifying the "names" key
  231. #openshift_master_named_certificates=[{"certfile": "/path/to/custom1.crt", "keyfile": "/path/to/custom1.key", "names": ["public-master-host.com"]}]
  232. # Session options
  233. #openshift_master_session_name=ssn
  234. #openshift_master_session_max_seconds=3600
  235. # An authentication and encryption secret will be generated if secrets
  236. # are not provided. If provided, openshift_master_session_auth_secrets
  237. # and openshift_master_encryption_secrets must be equal length.
  238. #
  239. # Signing secrets, used to authenticate sessions using
  240. # HMAC. Recommended to use secrets with 32 or 64 bytes.
  241. #openshift_master_session_auth_secrets=['DONT+USE+THIS+SECRET+b4NV+pmZNSO']
  242. #
  243. # Encrypting secrets, used to encrypt sessions. Must be 16, 24, or 32
  244. # characters long, to select AES-128, AES-192, or AES-256.
  245. #openshift_master_session_encryption_secrets=['DONT+USE+THIS+SECRET+b4NV+pmZNSO']
  246. # configure how often node iptables rules are refreshed
  247. #openshift_node_iptables_sync_period=5s
  248. # Configure nodeIP in the node config
  249. # This is needed in cases where node traffic is desired to go over an
  250. # interface other than the default network interface.
  251. #openshift_node_set_node_ip=True
  252. # Force setting of system hostname when configuring OpenShift
  253. # This works around issues related to installations that do not have valid dns
  254. # entries for the interfaces attached to the host.
  255. #openshift_set_hostname=True
  256. # Configure dnsIP in the node config
  257. #openshift_dns_ip=172.30.0.1
  258. # Persistent Storage Options
  259. #
  260. ## Registry Storage Options
  261. ##
  262. ## Storage Kind
  263. ## Specifies which storage kind will be used for the registry.
  264. ## nfs is the only supported kind at this time.
  265. ##openshift_hosted_registry_storage_kind=nfs
  266. ##
  267. ## Storage Host
  268. ## This variable can be used to identify a pre-existing storage host
  269. ## if a storage host group corresponding to the storage kind (such as
  270. ## [nfs]) is not specified,
  271. ##openshift_hosted_registry_storage_host=nfs.example.com
  272. ##
  273. ## NFS Export Options
  274. ##openshift_hosted_registry_storage_nfs_options='*(rw,root_squash)'
  275. ##
  276. ## NFS Export Directory
  277. ## Specify the root exports directory. This directory will be created
  278. ## if specifying an [nfs] host group.
  279. ## This variable must be supplied if using a pre-existing nfs server.
  280. ##openshift_hosted_registry_storage_nfs_directory=/exports
  281. ##
  282. ## Registry Volume Name
  283. ## Specify the storage volume name. This directory will be created
  284. ## within openshift_hosted_registry_storage_nfs_directory if
  285. ## specifying an [nfs] group. Ex: /exports/registry
  286. ## This variable must be supplied if using a pre-existing nfs server.
  287. ##openshift_hosted_registry_storage_volume_name=registry
  288. ##
  289. ## Persistent Volume Access Mode
  290. ##openshift_hosted_registry_storage_access_modes=['ReadWriteMany']
  291. # Configure node kubelet arguments
  292. #openshift_node_kubelet_args={'max-pods': ['40'], 'image-gc-high-threshold': ['90'], 'image-gc-low-threshold': ['80']}
  293. # Configure logrotate scripts
  294. # See: https://github.com/nickhammond/ansible-logrotate
  295. #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", "compress", "sharedscripts", "missingok"], "scripts": {"postrotate": "/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true"}}]
  296. # openshift-ansible will wait indefinitely for your input when it detects that the
  297. # value of openshift_hostname resolves to an IP address not bound to any local
  298. # interfaces. This mis-configuration is problematic for any pod leveraging host
  299. # networking and liveness or readiness probes.
  300. # Setting this variable to true will override that check.
  301. #openshift_override_hostname_check=true
  302. # Configure dnsmasq for cluster dns, switch the host's local resolver to use dnsmasq
  303. # and configure node's dnsIP to point at the node's local dnsmasq instance. Defaults
  304. # to True for Origin 1.2 and OSE 3.2. False for 1.1 / 3.1 installs, this cannot
  305. # be used with 1.0 and 3.0.
  306. # openshift_use_dnsmasq=False
  307. # Global Proxy Configuration
  308. # These options configure HTTP_PROXY, HTTPS_PROXY, and NOPROXY environment
  309. # variables for docker and master services.
  310. #openshift_http_proxy=http://USER:PASSWORD@IPADDR:PORT
  311. #openshift_https_proxy=https://USER:PASSWORD@IPADDR:PORT
  312. #openshift_no_proxy='.hosts.example.com,some-host.com'
  313. #
  314. # Most environments don't require a proxy between openshift masters, nodes, and
  315. # etcd hosts. So automatically add those hostnames to the openshift_no_proxy list.
  316. # If all of your hosts share a common domain you may wish to disable this and
  317. # specify that domain above.
  318. #openshift_generate_no_proxy_hosts: True
  319. #
  320. # These options configure the BuildDefaults admission controller which injects
  321. # environment variables into Builds. These values will default to their
  322. # corresponding values above but you may set them independently. See BuildDefaults
  323. # documentation at https://docs.openshift.org/latest/admin_guide/build_defaults_overrides.html
  324. #openshift_builddefaults_http_proxy=openshift_http_proxy
  325. #openshift_builddefaults_https_proxy=openshift_https_proxy
  326. #openshift_builddefaults_no_proxy=openshift_noproxy
  327. #openshift_builddefaults_git_http_proxy=openshift_builddefaults_http_proxy
  328. #openshift_builddefaults_git_https_proxy=openshift_builddefaults_https_proxy
  329. # Or you may optionally define your own serialized as json
  330. #openshift_builddefaults_json='{"BuildDefaults":{"configuration":{"apiVersion":"v1","env":[{"name":"HTTP_PROXY","value":"http://proxy.example.com.redhat.com:3128"},{"name":"NO_PROXY","value":"ose3-master.example.com"}],"gitHTTPProxy":"http://proxy.example.com:3128","kind":"BuildDefaultsConfig"}}}'
  331. # masterConfig.volumeConfig.dynamicProvisioningEnabled, configurable as of 1.2/3.2, enabled by default
  332. #openshift_master_dynamic_provisioning_enabled=False
  333. # host group for masters
  334. [masters]
  335. ose3-master[1:3]-ansible.test.example.com
  336. [etcd]
  337. ose3-etcd[1:3]-ansible.test.example.com
  338. [lb]
  339. ose3-lb-ansible.test.example.com
  340. # NOTE: Currently we require that masters be part of the SDN which requires that they also be nodes
  341. # However, in order to ensure that your masters are not burdened with running pods you should
  342. # make them unschedulable by adding openshift_schedulable=False any node that's also a master.
  343. [nodes]
  344. ose3-master[1:3]-ansible.test.example.com
  345. ose3-node[1:2]-ansible.test.example.com openshift_node_labels="{'region': 'primary', 'zone': 'default'}"