main.yml 5.7 KB

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