main.yml 5.9 KB

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