main.yml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. ---
  2. openshift_aws_create_s3: True
  3. openshift_aws_create_iam_cert: True
  4. openshift_aws_delete_iam_cert: "{{ openshift_aws_create_iam_cert }}"
  5. openshift_aws_create_iam_role: False
  6. openshift_aws_create_security_groups: True
  7. openshift_aws_create_launch_config: True
  8. openshift_aws_create_scale_group: True
  9. openshift_aws_node_group_upgrade: False
  10. openshift_aws_wait_for_ssh: True
  11. openshift_aws_clusterid: default
  12. openshift_aws_region: us-east-1
  13. openshift_aws_vpc_name: "{{ openshift_aws_clusterid }}"
  14. openshift_aws_build_ami_group: "{{ openshift_aws_clusterid }}"
  15. openshift_aws_iam_cert_name: "{{ openshift_aws_clusterid }}-master-external"
  16. openshift_aws_iam_cert_path: ''
  17. openshift_aws_iam_cert_key_path: ''
  18. openshift_aws_iam_role_name: "openshift_node_describe_instances_{{ openshift_aws_clusterid }}"
  19. openshift_aws_iam_role_policy_json: "{{ lookup('file', 'describeinstances.json') }}"
  20. openshift_aws_iam_role_policy_name: "describe_instances_{{ openshift_aws_clusterid }}"
  21. openshift_aws_iam_kms_alias: "alias/{{ openshift_aws_clusterid }}_kms"
  22. openshift_aws_ami: ''
  23. openshift_aws_ami_copy_wait: False
  24. openshift_aws_ami_encrypt: False
  25. openshift_aws_ami_copy_src_region: "{{ openshift_aws_region }}"
  26. openshift_aws_ami_name: openshift-gi
  27. openshift_aws_base_ami_name: ami_base
  28. openshift_aws_instance_type: m4.xlarge
  29. openshift_aws_launch_config_bootstrap_token: ''
  30. openshift_aws_users: []
  31. openshift_aws_copy_base_ami_tags: False
  32. openshift_aws_ami_tags:
  33. bootstrap: "true"
  34. openshift-created: "true"
  35. parent: "{{ openshift_aws_base_ami | default('unknown') }}"
  36. openshift_aws_s3_mode: create
  37. openshift_aws_s3_bucket_name: "{{ openshift_aws_clusterid }}-docker-registry"
  38. openshift_aws_vpc_tags:
  39. Name: "{{ openshift_aws_vpc_name }}"
  40. openshift_aws_vpc:
  41. name: "{{ openshift_aws_vpc_name }}"
  42. cidr: 172.31.0.0/16
  43. subnets:
  44. us-east-1:
  45. - cidr: 172.31.48.0/20
  46. az: "us-east-1c"
  47. # - cidr: 172.31.32.0/20
  48. # az: "us-east-1e"
  49. # - cidr: 172.31.16.0/20
  50. # az: "us-east-1a"
  51. openshift_aws_create_dns: False
  52. openshift_aws_dns_provider: "route53"
  53. # openshift_aws_dns_zone: ""
  54. # ie. openshift_aws_dns_zone: "{{ openshift_aws_clusterid }}.example.com"
  55. openshift_aws_dns_records:
  56. # Pertains to inventory file key: openshift_master_cluster_public_hostname
  57. - record: 'api'
  58. elb_name: "{{ openshift_aws_elb_dict['master']['external']['name'] }}"
  59. type: 'CNAME'
  60. kind: 'elb'
  61. private_zone: False
  62. # Pertains to inventory file key: openshift_master_cluster_hostname
  63. - record: 'internal.api'
  64. elb_name: "{{ openshift_aws_elb_dict['master']['internal']['name'] }}"
  65. type: 'CNAME'
  66. kind: 'elb'
  67. private_zone: False
  68. # Pertains to inventory file key: openshift_master_default_subdomain
  69. - record: '*.apps'
  70. elb_name: "{{ openshift_aws_elb_dict['infra']['external']['name'] }}"
  71. type: "CNAME"
  72. kind: "elb"
  73. private_zone: False
  74. - record: 'logs'
  75. elb_name: "{{ openshift_aws_elb_dict['infra']['external']['name'] }}"
  76. type: "CNAME"
  77. kind: "elb"
  78. private_zone: False
  79. - record: 'metrics'
  80. elb_name: "{{ openshift_aws_elb_dict['infra']['external']['name'] }}"
  81. type: "CNAME"
  82. kind: "elb"
  83. private_zone: False
  84. - record: 'registry'
  85. elb_name: "{{ openshift_aws_elb_dict['infra']['external']['name'] }}"
  86. type: "CNAME"
  87. kind: "elb"
  88. private_zone: False
  89. # A public or private vpc attached Route53 zone will be created based on
  90. # private_zone boolean. Split-tier dns is supported.
  91. openshift_aws_elb_basename: "{{ openshift_aws_clusterid }}"
  92. openshift_aws_elb_master_external_name: "{{ openshift_aws_elb_basename }}-master-external"
  93. openshift_aws_elb_master_internal_name: "{{ openshift_aws_elb_basename }}-master-internal"
  94. openshift_aws_elb_infra_name: "{{ openshift_aws_elb_basename }}-infra"
  95. openshift_aws_elb_cert_arn: ''
  96. openshift_aws_elb_dict:
  97. master:
  98. external:
  99. cross_az_load_balancing: False
  100. health_check:
  101. ping_protocol: tcp
  102. ping_port: "{{ openshift_master_api_port }}"
  103. response_timeout: 5
  104. interval: 30
  105. unhealthy_threshold: 2
  106. healthy_threshold: 2
  107. idle_timeout: 400
  108. listeners:
  109. - protocol: tcp
  110. load_balancer_port: 80
  111. instance_protocol: ssl
  112. instance_port: "{{ openshift_master_api_port }}"
  113. - protocol: ssl
  114. load_balancer_port: "{{ openshift_master_api_port }}"
  115. instance_protocol: ssl
  116. instance_port: "{{ openshift_master_api_port }}"
  117. ssl_certificate_id: "{{ openshift_aws_elb_cert_arn }}"
  118. name: "{{ openshift_aws_elb_master_external_name }}"
  119. tags: "{{ openshift_aws_kube_tags }}"
  120. internal:
  121. cross_az_load_balancing: False
  122. health_check:
  123. ping_protocol: tcp
  124. ping_port: "{{ openshift_master_api_port }}"
  125. response_timeout: 5
  126. interval: 30
  127. unhealthy_threshold: 2
  128. healthy_threshold: 2
  129. idle_timeout: 400
  130. listeners:
  131. - protocol: tcp
  132. load_balancer_port: 80
  133. instance_protocol: tcp
  134. instance_port: 80
  135. - protocol: tcp
  136. load_balancer_port: "{{ openshift_master_api_port }}"
  137. instance_protocol: tcp
  138. instance_port: "{{ openshift_master_api_port }}"
  139. name: "{{ openshift_aws_elb_master_internal_name }}"
  140. tags: "{{ openshift_aws_kube_tags }}"
  141. infra:
  142. external:
  143. cross_az_load_balancing: False
  144. health_check:
  145. ping_protocol: tcp
  146. ping_port: 443
  147. response_timeout: 5
  148. interval: 30
  149. unhealthy_threshold: 2
  150. healthy_threshold: 2
  151. idle_timeout: 400
  152. listeners:
  153. - protocol: tcp
  154. load_balancer_port: 80
  155. instance_protocol: tcp
  156. instance_port: 80
  157. proxy_protocol: True
  158. - protocol: tcp
  159. load_balancer_port: 443
  160. instance_protocol: tcp
  161. instance_port: 443
  162. proxy_protocol: True
  163. name: "{{ openshift_aws_elb_infra_name }}"
  164. tags: "{{ openshift_aws_kube_tags }}"
  165. openshift_aws_node_group_config_master_volumes:
  166. - device_name: /dev/sda1
  167. volume_size: 100
  168. volume_type: gp2
  169. delete_on_termination: False
  170. - device_name: /dev/sdb
  171. volume_size: 100
  172. volume_type: gp2
  173. delete_on_termination: False
  174. openshift_aws_node_group_config_node_volumes:
  175. - device_name: /dev/sda1
  176. volume_size: 100
  177. volume_type: gp2
  178. delete_on_termination: True
  179. - device_name: /dev/sdb
  180. volume_size: 100
  181. volume_type: gp2
  182. delete_on_termination: True
  183. # build_instance_tags is a custom filter in role lib_utils
  184. openshift_aws_node_group_config_tags: "{{ openshift_aws_clusterid | build_instance_tags }}"
  185. openshift_aws_node_group_termination_policy: Default
  186. openshift_aws_node_group_replace_instances: []
  187. openshift_aws_node_group_replace_all_instances: False
  188. openshift_aws_ami_map:
  189. master: "{{ openshift_aws_ami }}"
  190. infra: "{{ openshift_aws_ami }}"
  191. compute: "{{ openshift_aws_ami }}"
  192. openshift_aws_master_group:
  193. - name: "{{ openshift_aws_clusterid }} master group"
  194. group: master
  195. node_group_config: node-config-master
  196. tags:
  197. host-type: master
  198. sub-host-type: default
  199. runtime: docker
  200. openshift_aws_node_groups:
  201. - name: "{{ openshift_aws_clusterid }} compute group"
  202. group: compute
  203. node_group_config: node-config-compute
  204. tags:
  205. host-type: node
  206. sub-host-type: compute
  207. runtime: docker
  208. - name: "{{ openshift_aws_clusterid }} infra group"
  209. group: infra
  210. node_group_config: node-config-infra
  211. tags:
  212. host-type: node
  213. sub-host-type: infra
  214. runtime: docker
  215. openshift_aws_created_asgs: []
  216. openshift_aws_current_asgs: []
  217. openshift_aws_scale_group_health_check:
  218. period: 60
  219. type: EC2
  220. # these will be used during upgrade
  221. openshift_aws_master_group_config:
  222. # The 'master' key is always required here.
  223. master:
  224. instance_type: "{{ openshift_aws_master_group_instance_type | default(openshift_aws_instance_type) }}"
  225. volumes: "{{ openshift_aws_node_group_config_master_volumes }}"
  226. health_check: "{{ openshift_aws_scale_group_health_check }}"
  227. min_size: "{{ openshift_aws_master_group_min_size | default(3) }}"
  228. max_size: "{{ openshift_aws_master_group_max_size | default(3) }}"
  229. desired_size: "{{ openshift_aws_master_group_desired_size | default(3) }}"
  230. wait_for_instances: True
  231. termination_policy: "{{ openshift_aws_node_group_termination_policy }}"
  232. replace_all_instances: "{{ openshift_aws_node_group_replace_all_instances }}"
  233. iam_role: "{{ openshift_aws_iam_master_role_name | default(openshift_aws_iam_role_name) }}"
  234. policy_name: "{{ openshift_aws_iam_master_role_policy_name | default(openshift_aws_iam_role_policy_name) }}"
  235. policy_json: "{{ openshift_aws_iam_master_role_policy_json | default(openshift_aws_iam_role_policy_json) }}"
  236. elbs: "{{ openshift_aws_elb_dict | json_query('master.[*][0][*].name') }}"
  237. openshift_aws_node_group_config:
  238. # The 'compute' key is always required here.
  239. compute:
  240. instance_type: "{{ openshift_aws_compute_group_instance_type | default(openshift_aws_instance_type) }}"
  241. volumes: "{{ openshift_aws_node_group_config_node_volumes }}"
  242. health_check: "{{ openshift_aws_scale_group_health_check }}"
  243. min_size: "{{ openshift_aws_compute_group_min_size | default(3) }}"
  244. max_size: "{{ openshift_aws_compute_group_max_size | default(100) }}"
  245. desired_size: "{{ openshift_aws_compute_group_desired_size | default(3) }}"
  246. termination_policy: "{{ openshift_aws_node_group_termination_policy }}"
  247. replace_all_instances: "{{ openshift_aws_node_group_replace_all_instances }}"
  248. iam_role: "{{ openshift_aws_iam_node_role_name | default(openshift_aws_iam_role_name) }}"
  249. policy_name: "{{ openshift_aws_iam_node_role_policy_name | default(openshift_aws_iam_role_policy_name) }}"
  250. policy_json: "{{ openshift_aws_iam_node_role_policy_json | default(openshift_aws_iam_role_policy_json) }}"
  251. # The 'infra' key is always required here.
  252. infra:
  253. instance_type: "{{ openshift_aws_infra_group_instance_type | default(openshift_aws_instance_type) }}"
  254. volumes: "{{ openshift_aws_node_group_config_node_volumes }}"
  255. health_check: "{{ openshift_aws_scale_group_health_check }}"
  256. min_size: "{{ openshift_aws_infra_group_min_size | default(2) }}"
  257. max_size: "{{ openshift_aws_infra_group_max_size | default(20) }}"
  258. desired_size: "{{ openshift_aws_infra_group_desired_size | default(2) }}"
  259. termination_policy: "{{ openshift_aws_node_group_termination_policy }}"
  260. replace_all_instances: "{{ openshift_aws_node_group_replace_all_instances }}"
  261. iam_role: "{{ openshift_aws_iam_node_role_name | default(openshift_aws_iam_role_name) }}"
  262. policy_name: "{{ openshift_aws_iam_node_role_policy_name | default(openshift_aws_iam_role_policy_name) }}"
  263. policy_json: "{{ openshift_aws_iam_node_role_policy_json | default(openshift_aws_iam_role_policy_json) }}"
  264. elbs: "{{ openshift_aws_elb_dict | json_query('infra.[*][0][*].name') }}"
  265. # build_instance_tags is a custom filter in role lib_utils
  266. openshift_aws_kube_tags: "{{ openshift_aws_clusterid | build_instance_tags }}"
  267. openshift_aws_elb_security_groups: "{{ openshift_aws_launch_config_security_groups }}"
  268. openshift_aws_launch_config_security_groups:
  269. compute:
  270. - "{{ openshift_aws_clusterid }}" # default sg
  271. - "{{ openshift_aws_clusterid }}_compute" # node type sg
  272. - "{{ openshift_aws_clusterid }}_compute_k8s" # node type sg k8s
  273. infra:
  274. - "{{ openshift_aws_clusterid }}" # default sg
  275. - "{{ openshift_aws_clusterid }}_infra" # node type sg
  276. - "{{ openshift_aws_clusterid }}_infra_k8s" # node type sg k8s
  277. master:
  278. - "{{ openshift_aws_clusterid }}" # default sg
  279. - "{{ openshift_aws_clusterid }}_master" # node type sg
  280. - "{{ openshift_aws_clusterid }}_master_k8s" # node type sg k8s
  281. openshift_aws_security_groups_tags: "{{ openshift_aws_kube_tags }}"
  282. openshift_aws_node_security_groups:
  283. default:
  284. name: "{{ openshift_aws_clusterid }}"
  285. desc: "{{ openshift_aws_clusterid }} default"
  286. rules:
  287. - proto: tcp
  288. from_port: 22
  289. to_port: 22
  290. cidr_ip: 0.0.0.0/0
  291. - proto: all
  292. from_port: 1
  293. to_port: 65535
  294. group_name: "{{ openshift_aws_clusterid }}"
  295. master:
  296. name: "{{ openshift_aws_clusterid }}_master"
  297. desc: "{{ openshift_aws_clusterid }} master instances"
  298. rules:
  299. - proto: tcp
  300. from_port: 80
  301. to_port: 80
  302. cidr_ip: 0.0.0.0/0
  303. - proto: tcp
  304. from_port: "{{ openshift_master_api_port }}"
  305. to_port: "{{ openshift_master_api_port }}"
  306. cidr_ip: 0.0.0.0/0
  307. compute:
  308. name: "{{ openshift_aws_clusterid }}_compute"
  309. desc: "{{ openshift_aws_clusterid }} compute node instances"
  310. infra:
  311. name: "{{ openshift_aws_clusterid }}_infra"
  312. desc: "{{ openshift_aws_clusterid }} infra node instances"
  313. rules:
  314. - proto: tcp
  315. from_port: 80
  316. to_port: 80
  317. cidr_ip: 0.0.0.0/0
  318. - proto: tcp
  319. from_port: "{{ openshift_master_api_port }}"
  320. to_port: "{{ openshift_master_api_port }}"
  321. cidr_ip: 0.0.0.0/0
  322. - proto: tcp
  323. from_port: 30000
  324. to_port: 32000
  325. cidr_ip: 0.0.0.0/0
  326. etcd:
  327. name: "{{ openshift_aws_clusterid }}_etcd"
  328. desc: "{{ openshift_aws_clusterid }} etcd instances"
  329. openshift_aws_node_run_bootstrap_startup: True
  330. openshift_aws_node_user_data: ''
  331. openshift_aws_node_config_namespace: openshift-node
  332. openshift_aws_masters_groups: masters,etcd,nodes
  333. # By default, don't delete things like the shared IAM instance
  334. # profile and uploaded ssh keys
  335. openshift_aws_enable_uninstall_shared_objects: False
  336. # S3 bucket names are global by default and can take minutes/hours for the
  337. # name to become available for re-use (assuming someone doesn't take the
  338. # name in the meantime). Default to just emptying the contents of the S3
  339. # bucket if we've been asked to create the bucket during provisioning.
  340. openshift_aws_really_delete_s3_bucket: False