main.yml 9.1 KB

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