main.yml 8.9 KB

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