main.yml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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. tags:
  142. host-type: master
  143. sub-host-type: master
  144. runtime: docker
  145. openshift_aws_node_groups:
  146. - name: "{{ openshift_aws_clusterid }} compute group"
  147. group: compute
  148. tags:
  149. host-type: node
  150. sub-host-type: compute
  151. runtime: docker
  152. - name: "{{ openshift_aws_clusterid }} infra group"
  153. group: infra
  154. tags:
  155. host-type: node
  156. sub-host-type: infra
  157. runtime: docker
  158. openshift_aws_node_group_mappings:
  159. master: 'node-config-master'
  160. compute: 'node-config-compute'
  161. infra: 'node-config-infra'
  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