main.yml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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_launch_config_bootstrap_token: ''
  28. openshift_aws_users: []
  29. openshift_aws_copy_base_ami_tags: False
  30. openshift_aws_ami_tags:
  31. bootstrap: "true"
  32. openshift-created: "true"
  33. parent: "{{ openshift_aws_base_ami | default('unknown') }}"
  34. openshift_aws_s3_mode: create
  35. openshift_aws_s3_bucket_name: "{{ openshift_aws_clusterid }}-docker-registry"
  36. openshift_aws_elb_basename: "{{ openshift_aws_clusterid }}"
  37. openshift_aws_elb_master_external_name: "{{ openshift_aws_elb_basename }}-master-external"
  38. openshift_aws_elb_master_internal_name: "{{ openshift_aws_elb_basename }}-master-internal"
  39. openshift_aws_elb_infra_name: "{{ openshift_aws_elb_basename }}-infra"
  40. openshift_aws_elb_cert_arn: ''
  41. openshift_aws_elb_dict:
  42. master:
  43. external:
  44. cross_az_load_balancing: False
  45. health_check:
  46. ping_protocol: tcp
  47. ping_port: "{{ openshift_master_api_port }}"
  48. response_timeout: 5
  49. interval: 30
  50. unhealthy_threshold: 2
  51. healthy_threshold: 2
  52. idle_timeout: 400
  53. listeners:
  54. - protocol: tcp
  55. load_balancer_port: 80
  56. instance_protocol: ssl
  57. instance_port: "{{ openshift_master_api_port }}"
  58. - protocol: ssl
  59. load_balancer_port: "{{ openshift_master_api_port }}"
  60. instance_protocol: ssl
  61. instance_port: "{{ openshift_master_api_port }}"
  62. ssl_certificate_id: "{{ openshift_aws_elb_cert_arn }}"
  63. name: "{{ openshift_aws_elb_master_external_name }}"
  64. tags: "{{ openshift_aws_kube_tags }}"
  65. internal:
  66. cross_az_load_balancing: False
  67. health_check:
  68. ping_protocol: tcp
  69. ping_port: "{{ openshift_master_api_port }}"
  70. response_timeout: 5
  71. interval: 30
  72. unhealthy_threshold: 2
  73. healthy_threshold: 2
  74. idle_timeout: 400
  75. listeners:
  76. - protocol: tcp
  77. load_balancer_port: 80
  78. instance_protocol: tcp
  79. instance_port: 80
  80. - protocol: tcp
  81. load_balancer_port: "{{ openshift_master_api_port }}"
  82. instance_protocol: tcp
  83. instance_port: "{{ openshift_master_api_port }}"
  84. name: "{{ openshift_aws_elb_master_internal_name }}"
  85. tags: "{{ openshift_aws_kube_tags }}"
  86. infra:
  87. external:
  88. cross_az_load_balancing: False
  89. health_check:
  90. ping_protocol: tcp
  91. ping_port: 443
  92. response_timeout: 5
  93. interval: 30
  94. unhealthy_threshold: 2
  95. healthy_threshold: 2
  96. idle_timeout: 400
  97. listeners:
  98. - protocol: tcp
  99. load_balancer_port: 80
  100. instance_protocol: tcp
  101. instance_port: 80
  102. proxy_protocol: True
  103. - protocol: tcp
  104. load_balancer_port: 443
  105. instance_protocol: tcp
  106. instance_port: 443
  107. proxy_protocol: True
  108. name: "{{ openshift_aws_elb_infra_name }}"
  109. tags: "{{ openshift_aws_kube_tags }}"
  110. openshift_aws_node_group_config_master_volumes:
  111. - device_name: /dev/sda1
  112. volume_size: 100
  113. volume_type: gp2
  114. delete_on_termination: False
  115. - device_name: /dev/sdb
  116. volume_size: 100
  117. volume_type: gp2
  118. delete_on_termination: False
  119. openshift_aws_node_group_config_node_volumes:
  120. - device_name: /dev/sda1
  121. volume_size: 100
  122. volume_type: gp2
  123. delete_on_termination: True
  124. - device_name: /dev/sdb
  125. volume_size: 100
  126. volume_type: gp2
  127. delete_on_termination: True
  128. # build_instance_tags is a custom filter in role lib_utils
  129. openshift_aws_node_group_config_tags: "{{ openshift_aws_clusterid | build_instance_tags }}"
  130. openshift_aws_node_group_termination_policy: Default
  131. openshift_aws_node_group_replace_instances: []
  132. openshift_aws_node_group_replace_all_instances: False
  133. openshift_aws_ami_map:
  134. master: "{{ openshift_aws_ami }}"
  135. infra: "{{ openshift_aws_ami }}"
  136. compute: "{{ openshift_aws_ami }}"
  137. openshift_aws_master_group:
  138. - name: "{{ openshift_aws_clusterid }} master group"
  139. group: master
  140. node_group_config: node-config-master
  141. tags:
  142. host-type: master
  143. sub-host-type: default
  144. runtime: docker
  145. openshift_aws_node_groups:
  146. - name: "{{ openshift_aws_clusterid }} compute group"
  147. group: compute
  148. node_group_config: node-config-compute
  149. tags:
  150. host-type: node
  151. sub-host-type: compute
  152. runtime: docker
  153. - name: "{{ openshift_aws_clusterid }} infra group"
  154. group: infra
  155. node_group_config: node-config-infra
  156. tags:
  157. host-type: node
  158. sub-host-type: infra
  159. runtime: docker
  160. openshift_aws_created_asgs: []
  161. openshift_aws_current_asgs: []
  162. openshift_aws_scale_group_health_check:
  163. period: 60
  164. type: EC2
  165. # these will be used during upgrade
  166. openshift_aws_master_group_config:
  167. # The 'master' key is always required here.
  168. master:
  169. instance_type: "{{ openshift_aws_master_group_instance_type | default('m4.xlarge') }}"
  170. volumes: "{{ openshift_aws_node_group_config_master_volumes }}"
  171. health_check: "{{ openshift_aws_scale_group_health_check }}"
  172. min_size: "{{ openshift_aws_master_group_min_size | default(3) }}"
  173. max_size: "{{ openshift_aws_master_group_max_size | default(3) }}"
  174. desired_size: "{{ openshift_aws_master_group_desired_size | default(3) }}"
  175. wait_for_instances: True
  176. termination_policy: "{{ openshift_aws_node_group_termination_policy }}"
  177. replace_all_instances: "{{ openshift_aws_node_group_replace_all_instances }}"
  178. iam_role: "{{ openshift_aws_iam_master_role_name | default(openshift_aws_iam_role_name) }}"
  179. policy_name: "{{ openshift_aws_iam_master_role_policy_name | default(openshift_aws_iam_role_policy_name) }}"
  180. policy_json: "{{ openshift_aws_iam_master_role_policy_json | default(openshift_aws_iam_role_policy_json) }}"
  181. elbs: "{{ openshift_aws_elb_dict | json_query('master.[*][0][*].name') }}"
  182. openshift_aws_node_group_config:
  183. # The 'compute' key is always required here.
  184. compute:
  185. instance_type: "{{ openshift_aws_compute_group_instance_type | default('m4.xlarge') }}"
  186. volumes: "{{ openshift_aws_node_group_config_node_volumes }}"
  187. health_check: "{{ openshift_aws_scale_group_health_check }}"
  188. min_size: "{{ openshift_aws_compute_group_min_size | default(3) }}"
  189. max_size: "{{ openshift_aws_compute_group_max_size | default(100) }}"
  190. desired_size: "{{ openshift_aws_compute_group_desired_size | default(3) }}"
  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_node_role_name | default(openshift_aws_iam_role_name) }}"
  194. policy_name: "{{ openshift_aws_iam_node_role_policy_name | default(openshift_aws_iam_role_policy_name) }}"
  195. policy_json: "{{ openshift_aws_iam_node_role_policy_json | default(openshift_aws_iam_role_policy_json) }}"
  196. # The 'infra' key is always required here.
  197. infra:
  198. instance_type: "{{ openshift_aws_infra_group_instance_type | default('m4.xlarge') }}"
  199. volumes: "{{ openshift_aws_node_group_config_node_volumes }}"
  200. health_check: "{{ openshift_aws_scale_group_health_check }}"
  201. min_size: "{{ openshift_aws_infra_group_min_size | default(2) }}"
  202. max_size: "{{ openshift_aws_infra_group_max_size | default(20) }}"
  203. desired_size: "{{ openshift_aws_infra_group_desired_size | default(2) }}"
  204. termination_policy: "{{ openshift_aws_node_group_termination_policy }}"
  205. replace_all_instances: "{{ openshift_aws_node_group_replace_all_instances }}"
  206. iam_role: "{{ openshift_aws_iam_node_role_name | default(openshift_aws_iam_role_name) }}"
  207. policy_name: "{{ openshift_aws_iam_node_role_policy_name | default(openshift_aws_iam_role_policy_name) }}"
  208. policy_json: "{{ openshift_aws_iam_node_role_policy_json | default(openshift_aws_iam_role_policy_json) }}"
  209. elbs: "{{ openshift_aws_elb_dict | json_query('infra.[*][0][*].name') }}"
  210. # build_instance_tags is a custom filter in role lib_utils
  211. openshift_aws_kube_tags: "{{ openshift_aws_clusterid | build_instance_tags }}"
  212. openshift_aws_elb_security_groups: "{{ openshift_aws_launch_config_security_groups }}"
  213. openshift_aws_launch_config_security_groups:
  214. compute:
  215. - "{{ openshift_aws_clusterid }}" # default sg
  216. - "{{ openshift_aws_clusterid }}_compute" # node type sg
  217. - "{{ openshift_aws_clusterid }}_compute_k8s" # node type sg k8s
  218. infra:
  219. - "{{ openshift_aws_clusterid }}" # default sg
  220. - "{{ openshift_aws_clusterid }}_infra" # node type sg
  221. - "{{ openshift_aws_clusterid }}_infra_k8s" # node type sg k8s
  222. master:
  223. - "{{ openshift_aws_clusterid }}" # default sg
  224. - "{{ openshift_aws_clusterid }}_master" # node type sg
  225. - "{{ openshift_aws_clusterid }}_master_k8s" # node type sg k8s
  226. openshift_aws_security_groups_tags: "{{ openshift_aws_kube_tags }}"
  227. openshift_aws_node_security_groups:
  228. default:
  229. name: "{{ openshift_aws_clusterid }}"
  230. desc: "{{ openshift_aws_clusterid }} default"
  231. rules:
  232. - proto: tcp
  233. from_port: 22
  234. to_port: 22
  235. cidr_ip: 0.0.0.0/0
  236. - proto: all
  237. from_port: all
  238. to_port: all
  239. group_name: "{{ openshift_aws_clusterid }}"
  240. master:
  241. name: "{{ openshift_aws_clusterid }}_master"
  242. desc: "{{ openshift_aws_clusterid }} master instances"
  243. rules:
  244. - proto: tcp
  245. from_port: 80
  246. to_port: 80
  247. cidr_ip: 0.0.0.0/0
  248. - proto: tcp
  249. from_port: "{{ openshift_master_api_port }}"
  250. to_port: "{{ openshift_master_api_port }}"
  251. cidr_ip: 0.0.0.0/0
  252. compute:
  253. name: "{{ openshift_aws_clusterid }}_compute"
  254. desc: "{{ openshift_aws_clusterid }} compute node instances"
  255. infra:
  256. name: "{{ openshift_aws_clusterid }}_infra"
  257. desc: "{{ openshift_aws_clusterid }} infra node 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. - proto: tcp
  268. from_port: 30000
  269. to_port: 32000
  270. cidr_ip: 0.0.0.0/0
  271. etcd:
  272. name: "{{ openshift_aws_clusterid }}_etcd"
  273. desc: "{{ openshift_aws_clusterid }} etcd instances"
  274. openshift_aws_vpc_tags:
  275. Name: "{{ openshift_aws_vpc_name }}"
  276. openshift_aws_vpc:
  277. name: "{{ openshift_aws_vpc_name }}"
  278. cidr: 172.31.0.0/16
  279. subnets:
  280. us-east-1:
  281. - cidr: 172.31.48.0/20
  282. az: "us-east-1c"
  283. default_az: true
  284. - cidr: 172.31.32.0/20
  285. az: "us-east-1e"
  286. - cidr: 172.31.16.0/20
  287. az: "us-east-1a"
  288. openshift_aws_subnet_az: "{{ openshift_aws_vpc.subnets[openshift_aws_region] | get_default_az }}"
  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