main.yml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. ---
  2. openshift_aws_create_s3: True
  3. openshift_aws_create_iam_cert: True
  4. openshift_aws_create_security_groups: True
  5. openshift_aws_create_launch_config: True
  6. openshift_aws_create_scale_group: True
  7. openshift_aws_node_group_type: master
  8. openshift_aws_wait_for_ssh: True
  9. openshift_aws_clusterid: default
  10. openshift_aws_region: us-east-1
  11. openshift_aws_vpc_name: "{{ openshift_aws_clusterid }}"
  12. openshift_aws_build_ami_group: "{{ openshift_aws_clusterid }}"
  13. openshift_aws_iam_cert_name: "{{ openshift_aws_clusterid }}-master-external"
  14. openshift_aws_iam_cert_path: ''
  15. openshift_aws_iam_cert_key_path: ''
  16. openshift_aws_scale_group_name: "{{ openshift_aws_clusterid }} openshift {{ openshift_aws_node_group_type }}"
  17. openshift_aws_iam_kms_alias: "alias/{{ openshift_aws_clusterid }}_kms"
  18. openshift_aws_ami: ''
  19. openshift_aws_ami_copy_wait: False
  20. openshift_aws_ami_encrypt: False
  21. openshift_aws_ami_copy_src_region: "{{ openshift_aws_region }}"
  22. openshift_aws_ami_name: openshift-gi
  23. openshift_aws_base_ami_name: ami_base
  24. openshift_aws_launch_config_bootstrap_token: ''
  25. openshift_aws_launch_config_name: "{{ openshift_aws_clusterid }}-{{ openshift_aws_node_group_type }}-{{ ansible_date_time.epoch }}"
  26. openshift_aws_users: []
  27. openshift_aws_ami_tags:
  28. bootstrap: "true"
  29. openshift-created: "true"
  30. clusterid: "{{ openshift_aws_clusterid }}"
  31. openshift_aws_s3_mode: create
  32. openshift_aws_s3_bucket_name: "{{ openshift_aws_clusterid }}-docker-registry"
  33. openshift_aws_elb_health_check:
  34. ping_protocol: tcp
  35. ping_port: 443
  36. response_timeout: 5
  37. interval: 30
  38. unhealthy_threshold: 2
  39. healthy_threshold: 2
  40. openshift_aws_elb_basename: "{{ openshift_aws_clusterid }}-{{ openshift_aws_node_group_type }}"
  41. openshift_aws_elb_name_dict:
  42. master:
  43. external: "{{ openshift_aws_elb_basename }}-external"
  44. internal: "{{ openshift_aws_elb_basename }}-internal"
  45. infra:
  46. external: "{{ openshift_aws_elb_basename }}"
  47. openshift_aws_elb_idle_timout: 400
  48. openshift_aws_elb_scheme: internet-facing
  49. openshift_aws_elb_cert_arn: ''
  50. openshift_aws_elb_listeners:
  51. master:
  52. external:
  53. - protocol: tcp
  54. load_balancer_port: 80
  55. instance_protocol: ssl
  56. instance_port: 443
  57. - protocol: ssl
  58. load_balancer_port: 443
  59. instance_protocol: ssl
  60. instance_port: 443
  61. # ssl certificate required for https or ssl
  62. ssl_certificate_id: "{{ openshift_aws_elb_cert_arn }}"
  63. internal:
  64. - protocol: tcp
  65. load_balancer_port: 80
  66. instance_protocol: tcp
  67. instance_port: 80
  68. - protocol: tcp
  69. load_balancer_port: 443
  70. instance_protocol: tcp
  71. instance_port: 443
  72. infra:
  73. external:
  74. - protocol: tcp
  75. load_balancer_port: 80
  76. instance_protocol: tcp
  77. instance_port: 443
  78. proxy_protocol: True
  79. - protocol: tcp
  80. load_balancer_port: 443
  81. instance_protocol: tcp
  82. instance_port: 443
  83. proxy_protocol: True
  84. openshift_aws_node_group_config_master_volumes:
  85. - device_name: /dev/sdb
  86. volume_size: 100
  87. device_type: gp2
  88. delete_on_termination: False
  89. openshift_aws_node_group_config_node_volumes:
  90. - device_name: /dev/sdb
  91. volume_size: 100
  92. device_type: gp2
  93. delete_on_termination: True
  94. openshift_aws_node_group_config_tags: "{{ openshift_aws_clusterid | build_instance_tags }}"
  95. openshift_aws_node_group_termination_policy: Default
  96. openshift_aws_node_group_replace_instances: []
  97. openshift_aws_node_group_replace_all_instances: False
  98. openshift_aws_node_group_config_extra_labels: {}
  99. openshift_aws_node_group_config:
  100. tags: "{{ openshift_aws_node_group_config_tags }}"
  101. master:
  102. instance_type: m4.xlarge
  103. ami: "{{ openshift_aws_ami }}"
  104. volumes: "{{ openshift_aws_node_group_config_master_volumes }}"
  105. health_check:
  106. period: 60
  107. type: EC2
  108. min_size: 3
  109. max_size: 3
  110. desired_size: 3
  111. tags:
  112. host-type: master
  113. sub-host-type: default
  114. labels:
  115. type: master
  116. wait_for_instances: True
  117. termination_policy: "{{ openshift_aws_node_group_termination_policy }}"
  118. replace_all_instances: "{{ openshift_aws_node_group_replace_all_instances }}"
  119. elbs: "{{ openshift_aws_elb_name_dict[openshift_aws_node_group_type].keys()| map('extract', openshift_aws_elb_name_dict[openshift_aws_node_group_type]) | list }}"
  120. compute:
  121. instance_type: m4.xlarge
  122. ami: "{{ openshift_aws_ami }}"
  123. volumes: "{{ openshift_aws_node_group_config_node_volumes }}"
  124. health_check:
  125. period: 60
  126. type: EC2
  127. min_size: 3
  128. max_size: 100
  129. desired_size: 3
  130. tags:
  131. host-type: node
  132. sub-host-type: compute
  133. labels:
  134. type: compute
  135. termination_policy: "{{ openshift_aws_node_group_termination_policy }}"
  136. replace_all_instances: "{{ openshift_aws_node_group_replace_all_instances }}"
  137. infra:
  138. instance_type: m4.xlarge
  139. ami: "{{ openshift_aws_ami }}"
  140. volumes: "{{ openshift_aws_node_group_config_node_volumes }}"
  141. health_check:
  142. period: 60
  143. type: EC2
  144. min_size: 2
  145. max_size: 20
  146. desired_size: 2
  147. tags:
  148. host-type: node
  149. sub-host-type: infra
  150. labels:
  151. type: infra
  152. termination_policy: "{{ openshift_aws_node_group_termination_policy }}"
  153. replace_all_instances: "{{ openshift_aws_node_group_replace_all_instances }}"
  154. elbs: "{{ openshift_aws_elb_name_dict[openshift_aws_node_group_type].keys()| map('extract', openshift_aws_elb_name_dict[openshift_aws_node_group_type]) | list }}"
  155. openshift_aws_elb_tags: "{{ openshift_aws_clusterid | build_instance_tags }}"
  156. openshift_aws_elb_az_load_balancing: False
  157. openshift_aws_elb_security_groups:
  158. - "{{ openshift_aws_clusterid }}" # default sg
  159. - "{{ openshift_aws_clusterid }}_{{ openshift_aws_node_group_type }}" # node type sg
  160. - "{{ openshift_aws_clusterid }}_{{ openshift_aws_node_group_type }}_k8s" # node type sg k8s
  161. openshift_aws_elb_instance_filter:
  162. "tag:clusterid": "{{ openshift_aws_clusterid }}"
  163. "tag:host-type": "{{ openshift_aws_node_group_type }}"
  164. instance-state-name: running
  165. openshift_aws_security_groups_tags: "{{ openshift_aws_clusterid | build_instance_tags }}"
  166. openshift_aws_node_security_groups:
  167. default:
  168. name: "{{ openshift_aws_clusterid }}"
  169. desc: "{{ openshift_aws_clusterid }} default"
  170. rules:
  171. - proto: tcp
  172. from_port: 22
  173. to_port: 22
  174. cidr_ip: 0.0.0.0/0
  175. - proto: all
  176. from_port: all
  177. to_port: all
  178. group_name: "{{ openshift_aws_clusterid }}"
  179. master:
  180. name: "{{ openshift_aws_clusterid }}_master"
  181. desc: "{{ openshift_aws_clusterid }} master instances"
  182. rules:
  183. - proto: tcp
  184. from_port: 80
  185. to_port: 80
  186. cidr_ip: 0.0.0.0/0
  187. - proto: tcp
  188. from_port: 443
  189. to_port: 443
  190. cidr_ip: 0.0.0.0/0
  191. compute:
  192. name: "{{ openshift_aws_clusterid }}_compute"
  193. desc: "{{ openshift_aws_clusterid }} compute node instances"
  194. infra:
  195. name: "{{ openshift_aws_clusterid }}_infra"
  196. desc: "{{ openshift_aws_clusterid }} infra node instances"
  197. rules:
  198. - proto: tcp
  199. from_port: 80
  200. to_port: 80
  201. cidr_ip: 0.0.0.0/0
  202. - proto: tcp
  203. from_port: 443
  204. to_port: 443
  205. cidr_ip: 0.0.0.0/0
  206. - proto: tcp
  207. from_port: 30000
  208. to_port: 32000
  209. cidr_ip: 0.0.0.0/0
  210. etcd:
  211. name: "{{ openshift_aws_clusterid }}_etcd"
  212. desc: "{{ openshift_aws_clusterid }} etcd instances"
  213. openshift_aws_vpc_tags:
  214. Name: "{{ openshift_aws_vpc_name }}"
  215. openshift_aws_subnet_name: us-east-1c
  216. openshift_aws_vpc:
  217. name: "{{ openshift_aws_vpc_name }}"
  218. cidr: 172.31.0.0/16
  219. subnets:
  220. us-east-1:
  221. - cidr: 172.31.48.0/20
  222. az: "us-east-1c"
  223. - cidr: 172.31.32.0/20
  224. az: "us-east-1e"
  225. - cidr: 172.31.16.0/20
  226. az: "us-east-1a"
  227. openshift_aws_node_run_bootstrap_startup: True
  228. openshift_aws_node_user_data: ''
  229. openshift_aws_node_config_namespace: openshift-node