main.yml 12 KB

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