main.yml 12 KB

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