main.yml 12 KB

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