main.yml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. ---
  2. openshift_aws_create_vpc: True
  3. openshift_aws_create_s3: True
  4. openshift_aws_create_iam_cert: True
  5. openshift_aws_create_security_groups: True
  6. openshift_aws_create_launch_config: True
  7. openshift_aws_create_scale_group: True
  8. openshift_aws_kubernetes_cluster_status: owned # or shared
  9. openshift_aws_node_group_type: master
  10. openshift_aws_wait_for_ssh: True
  11. openshift_aws_clusterid: default
  12. openshift_aws_region: us-east-1
  13. openshift_aws_vpc_name: "{{ openshift_aws_clusterid }}"
  14. openshift_aws_build_ami_group: "{{ openshift_aws_clusterid }}"
  15. openshift_aws_iam_cert_name: "{{ openshift_aws_clusterid }}-master-external"
  16. openshift_aws_iam_cert_path: ''
  17. openshift_aws_iam_cert_chain_path: ''
  18. openshift_aws_iam_cert_key_path: ''
  19. openshift_aws_scale_group_name: "{{ openshift_aws_clusterid }} openshift {{ openshift_aws_node_group_type }}"
  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_launch_config_name: "{{ openshift_aws_clusterid }}-{{ openshift_aws_node_group_type }}-{{ ansible_date_time.epoch }}"
  29. openshift_aws_users: []
  30. openshift_aws_ami_tags:
  31. bootstrap: "true"
  32. openshift-created: "true"
  33. clusterid: "{{ openshift_aws_clusterid }}"
  34. openshift_aws_s3_mode: create
  35. openshift_aws_s3_bucket_name: "{{ openshift_aws_clusterid }}-docker-registry"
  36. openshift_aws_elb_health_check:
  37. ping_protocol: tcp
  38. ping_port: 443
  39. response_timeout: 5
  40. interval: 30
  41. unhealthy_threshold: 2
  42. healthy_threshold: 2
  43. openshift_aws_elb_name: "{{ openshift_aws_clusterid }}-{{ openshift_aws_node_group_type }}"
  44. openshift_aws_elb_idle_timout: 400
  45. openshift_aws_elb_scheme: internet-facing
  46. openshift_aws_elb_cert_arn: ''
  47. openshift_aws_elb_listeners:
  48. master:
  49. external:
  50. - protocol: tcp
  51. load_balancer_port: 80
  52. instance_protocol: ssl
  53. instance_port: 443
  54. - protocol: ssl
  55. load_balancer_port: 443
  56. instance_protocol: ssl
  57. instance_port: 443
  58. # ssl certificate required for https or ssl
  59. ssl_certificate_id: "{{ openshift_aws_elb_cert_arn }}"
  60. internal:
  61. - protocol: tcp
  62. load_balancer_port: 80
  63. instance_protocol: tcp
  64. instance_port: 80
  65. - protocol: tcp
  66. load_balancer_port: 443
  67. instance_protocol: tcp
  68. instance_port: 443
  69. openshift_aws_node_group_config_master_volumes:
  70. - device_name: /dev/sdb
  71. volume_size: 100
  72. device_type: gp2
  73. delete_on_termination: False
  74. openshift_aws_node_group_config_node_volumes:
  75. - device_name: /dev/sdb
  76. volume_size: 100
  77. device_type: gp2
  78. delete_on_termination: True
  79. openshift_aws_node_group_config_tags: "{{ openshift_aws_clusterid | build_instance_tags(openshift_aws_kubernetes_cluster_status) }}"
  80. openshift_aws_node_group_config:
  81. tags: "{{ openshift_aws_node_group_config_tags }}"
  82. master:
  83. instance_type: m4.xlarge
  84. ami: "{{ openshift_aws_ami }}"
  85. volumes: "{{ openshift_aws_node_group_config_master_volumes }}"
  86. health_check:
  87. period: 60
  88. type: EC2
  89. min_size: 3
  90. max_size: 3
  91. desired_size: 3
  92. tags:
  93. host-type: master
  94. sub-host-type: default
  95. wait_for_instances: True
  96. compute:
  97. instance_type: m4.xlarge
  98. ami: "{{ openshift_aws_ami }}"
  99. volumes: "{{ openshift_aws_node_group_config_node_volumes }}"
  100. health_check:
  101. period: 60
  102. type: EC2
  103. min_size: 3
  104. max_size: 100
  105. desired_size: 3
  106. tags:
  107. host-type: node
  108. sub-host-type: compute
  109. infra:
  110. instance_type: m4.xlarge
  111. ami: "{{ openshift_aws_ami }}"
  112. volumes: "{{ openshift_aws_node_group_config_node_volumes }}"
  113. health_check:
  114. period: 60
  115. type: EC2
  116. min_size: 2
  117. max_size: 20
  118. desired_size: 2
  119. tags:
  120. host-type: node
  121. sub-host-type: infra
  122. openshift_aws_elb_security_groups:
  123. - "{{ openshift_aws_clusterid }}"
  124. - "{{ openshift_aws_clusterid }}_{{ openshift_aws_node_group_type }}"
  125. openshift_aws_elb_instance_filter:
  126. "tag:clusterid": "{{ openshift_aws_clusterid }}"
  127. "tag:host-type": "{{ openshift_aws_node_group_type }}"
  128. instance-state-name: running
  129. openshift_aws_node_security_groups:
  130. default:
  131. name: "{{ openshift_aws_clusterid }}"
  132. desc: "{{ openshift_aws_clusterid }} default"
  133. rules:
  134. - proto: tcp
  135. from_port: 22
  136. to_port: 22
  137. cidr_ip: 0.0.0.0/0
  138. - proto: all
  139. from_port: all
  140. to_port: all
  141. group_name: "{{ openshift_aws_clusterid }}"
  142. master:
  143. name: "{{ openshift_aws_clusterid }}_master"
  144. desc: "{{ openshift_aws_clusterid }} master instances"
  145. rules:
  146. - proto: tcp
  147. from_port: 80
  148. to_port: 80
  149. cidr_ip: 0.0.0.0/0
  150. - proto: tcp
  151. from_port: 443
  152. to_port: 443
  153. cidr_ip: 0.0.0.0/0
  154. compute:
  155. name: "{{ openshift_aws_clusterid }}_compute"
  156. desc: "{{ openshift_aws_clusterid }} compute node instances"
  157. infra:
  158. name: "{{ openshift_aws_clusterid }}_infra"
  159. desc: "{{ openshift_aws_clusterid }} infra node instances"
  160. rules:
  161. - proto: tcp
  162. from_port: 80
  163. to_port: 80
  164. cidr_ip: 0.0.0.0/0
  165. - proto: tcp
  166. from_port: 443
  167. to_port: 443
  168. cidr_ip: 0.0.0.0/0
  169. - proto: tcp
  170. from_port: 30000
  171. to_port: 32000
  172. cidr_ip: 0.0.0.0/0
  173. etcd:
  174. name: "{{ openshift_aws_clusterid }}_etcd"
  175. desc: "{{ openshift_aws_clusterid }} etcd instances"
  176. openshift_aws_vpc_tags:
  177. Name: "{{ openshift_aws_vpc_name }}"
  178. openshift_aws_subnet_name: us-east-1c
  179. openshift_aws_vpc:
  180. name: "{{ openshift_aws_vpc_name }}"
  181. cidr: 172.31.0.0/16
  182. subnets:
  183. us-east-1:
  184. - cidr: 172.31.48.0/20
  185. az: "us-east-1c"
  186. - cidr: 172.31.32.0/20
  187. az: "us-east-1e"
  188. - cidr: 172.31.16.0/20
  189. az: "us-east-1a"