main.yml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  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/sda1
  88. volume_size: 100
  89. device_type: gp2
  90. delete_on_termination: False
  91. - device_name: /dev/sdb
  92. volume_size: 100
  93. device_type: gp2
  94. delete_on_termination: False
  95. openshift_aws_node_group_config_node_volumes:
  96. - device_name: /dev/sda1
  97. volume_size: 100
  98. device_type: gp2
  99. delete_on_termination: True
  100. - device_name: /dev/sdb
  101. volume_size: 100
  102. device_type: gp2
  103. delete_on_termination: True
  104. openshift_aws_node_group_config_tags: "{{ openshift_aws_clusterid | build_instance_tags }}"
  105. openshift_aws_node_group_termination_policy: Default
  106. openshift_aws_node_group_replace_instances: []
  107. openshift_aws_node_group_replace_all_instances: False
  108. openshift_aws_ami_map:
  109. master: "{{ openshift_aws_ami }}"
  110. infra: "{{ openshift_aws_ami }}"
  111. compute: "{{ openshift_aws_ami }}"
  112. openshift_aws_master_group:
  113. - name: "{{ openshift_aws_clusterid }} master group"
  114. group: master
  115. tags:
  116. host-type: master
  117. sub-host-type: default
  118. runtime: docker
  119. openshift_aws_node_groups:
  120. - name: "{{ openshift_aws_clusterid }} compute group"
  121. group: compute
  122. tags:
  123. host-type: node
  124. sub-host-type: compute
  125. runtime: docker
  126. - name: "{{ openshift_aws_clusterid }} infra group"
  127. group: infra
  128. tags:
  129. host-type: node
  130. sub-host-type: infra
  131. runtime: docker
  132. openshift_aws_created_asgs: []
  133. openshift_aws_current_asgs: []
  134. # these will be used during upgrade
  135. openshift_aws_master_group_config:
  136. # The 'master' key is always required here.
  137. master:
  138. instance_type: m4.xlarge
  139. volumes: "{{ openshift_aws_node_group_config_master_volumes }}"
  140. health_check:
  141. period: 60
  142. type: EC2
  143. min_size: 3
  144. max_size: 3
  145. desired_size: 3
  146. wait_for_instances: True
  147. termination_policy: "{{ openshift_aws_node_group_termination_policy }}"
  148. replace_all_instances: "{{ openshift_aws_node_group_replace_all_instances }}"
  149. iam_role: "{{ openshift_aws_iam_role_name }}"
  150. policy_name: "{{ openshift_aws_iam_role_policy_name }}"
  151. policy_json: "{{ openshift_aws_iam_role_policy_json }}"
  152. elbs: "{{ openshift_aws_elb_name_dict['master'].keys()| map('extract', openshift_aws_elb_name_dict['master']) | list }}"
  153. openshift_aws_node_group_config:
  154. # The 'compute' key is always required here.
  155. compute:
  156. instance_type: m4.xlarge
  157. volumes: "{{ openshift_aws_node_group_config_node_volumes }}"
  158. health_check:
  159. period: 60
  160. type: EC2
  161. min_size: 3
  162. max_size: 100
  163. desired_size: 3
  164. termination_policy: "{{ openshift_aws_node_group_termination_policy }}"
  165. replace_all_instances: "{{ openshift_aws_node_group_replace_all_instances }}"
  166. iam_role: "{{ openshift_aws_iam_role_name }}"
  167. policy_name: "{{ openshift_aws_iam_role_policy_name }}"
  168. policy_json: "{{ openshift_aws_iam_role_policy_json }}"
  169. # The 'infra' key is always required here.
  170. infra:
  171. instance_type: m4.xlarge
  172. volumes: "{{ openshift_aws_node_group_config_node_volumes }}"
  173. health_check:
  174. period: 60
  175. type: EC2
  176. min_size: 2
  177. max_size: 20
  178. desired_size: 2
  179. termination_policy: "{{ openshift_aws_node_group_termination_policy }}"
  180. replace_all_instances: "{{ openshift_aws_node_group_replace_all_instances }}"
  181. iam_role: "{{ openshift_aws_iam_role_name }}"
  182. policy_name: "{{ openshift_aws_iam_role_policy_name }}"
  183. policy_json: "{{ openshift_aws_iam_role_policy_json }}"
  184. elbs: "{{ openshift_aws_elb_name_dict['infra'].keys()| map('extract', openshift_aws_elb_name_dict['infra']) | list }}"
  185. openshift_aws_elb_tags: "{{ openshift_aws_kube_tags }}"
  186. openshift_aws_elb_az_load_balancing: False
  187. openshift_aws_kube_tags: "{{ openshift_aws_clusterid | build_instance_tags }}"
  188. openshift_aws_elb_security_groups: "{{ openshift_aws_launch_config_security_groups }}"
  189. openshift_aws_launch_config_security_groups:
  190. compute:
  191. - "{{ openshift_aws_clusterid }}" # default sg
  192. - "{{ openshift_aws_clusterid }}_compute" # node type sg
  193. - "{{ openshift_aws_clusterid }}_compute_k8s" # node type sg k8s
  194. infra:
  195. - "{{ openshift_aws_clusterid }}" # default sg
  196. - "{{ openshift_aws_clusterid }}_infra" # node type sg
  197. - "{{ openshift_aws_clusterid }}_infra_k8s" # node type sg k8s
  198. master:
  199. - "{{ openshift_aws_clusterid }}" # default sg
  200. - "{{ openshift_aws_clusterid }}_master" # node type sg
  201. - "{{ openshift_aws_clusterid }}_master_k8s" # node type sg k8s
  202. openshift_aws_security_groups_tags: "{{ openshift_aws_kube_tags }}"
  203. openshift_aws_node_security_groups:
  204. default:
  205. name: "{{ openshift_aws_clusterid }}"
  206. desc: "{{ openshift_aws_clusterid }} default"
  207. rules:
  208. - proto: tcp
  209. from_port: 22
  210. to_port: 22
  211. cidr_ip: 0.0.0.0/0
  212. - proto: all
  213. from_port: all
  214. to_port: all
  215. group_name: "{{ openshift_aws_clusterid }}"
  216. master:
  217. name: "{{ openshift_aws_clusterid }}_master"
  218. desc: "{{ openshift_aws_clusterid }} master instances"
  219. rules:
  220. - proto: tcp
  221. from_port: 80
  222. to_port: 80
  223. cidr_ip: 0.0.0.0/0
  224. - proto: tcp
  225. from_port: 443
  226. to_port: 443
  227. cidr_ip: 0.0.0.0/0
  228. compute:
  229. name: "{{ openshift_aws_clusterid }}_compute"
  230. desc: "{{ openshift_aws_clusterid }} compute node instances"
  231. infra:
  232. name: "{{ openshift_aws_clusterid }}_infra"
  233. desc: "{{ openshift_aws_clusterid }} infra node instances"
  234. rules:
  235. - proto: tcp
  236. from_port: 80
  237. to_port: 80
  238. cidr_ip: 0.0.0.0/0
  239. - proto: tcp
  240. from_port: 443
  241. to_port: 443
  242. cidr_ip: 0.0.0.0/0
  243. - proto: tcp
  244. from_port: 30000
  245. to_port: 32000
  246. cidr_ip: 0.0.0.0/0
  247. etcd:
  248. name: "{{ openshift_aws_clusterid }}_etcd"
  249. desc: "{{ openshift_aws_clusterid }} etcd instances"
  250. openshift_aws_vpc_tags:
  251. Name: "{{ openshift_aws_vpc_name }}"
  252. openshift_aws_subnet_az: us-east-1c
  253. openshift_aws_vpc:
  254. name: "{{ openshift_aws_vpc_name }}"
  255. cidr: 172.31.0.0/16
  256. subnets:
  257. us-east-1:
  258. - cidr: 172.31.48.0/20
  259. az: "us-east-1c"
  260. - cidr: 172.31.32.0/20
  261. az: "us-east-1e"
  262. - cidr: 172.31.16.0/20
  263. az: "us-east-1a"
  264. openshift_aws_node_run_bootstrap_startup: True
  265. openshift_aws_node_user_data: ''
  266. openshift_aws_node_config_namespace: openshift-node
  267. openshift_aws_masters_groups: masters,etcd,nodes