main.yml 10 KB

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