This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
/
eks-deploy-cluster.playbook.yaml
executable file
·67 lines (58 loc) · 2.12 KB
/
eks-deploy-cluster.playbook.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#############################################################
## NOT FOR PRODUCTION USE. ##
## THE CONTENT OF THIS FILE IS FOR LEARNING PURPOSES ONLY ##
## created by David Surey, Amazon Web Services, 2020 ##
#############################################################
- name: Setup and Customize Amazon EKS
hosts: localhost
gather_facts: no
vars:
ansible_ssh_private_key_file: "./secrets/id_rsa_eks"
ansible_user: ec2-user
tasks:
- name: check ansible version
when: (ansible_version.major == 2 and ansible_version.minor < 10 ) or (ansible_version.major < 2)
run_once: yes
fail:
msg: Please use Ansible 2.10 or newer
- name: import static var data
include_vars:
dir: vars/static
ignore_unknown_extensions: True
extensions:
- yaml
- name: setup bastion host
include_tasks: ./tasks/bastion.task.yaml
- name: import dynamic var data
include_vars:
dir: vars/dynamic
ignore_unknown_extensions: True
extensions:
- yaml
- name: wait for the bastion to be booted and bootstraped (first-start)
wait_for:
host: "{{ EKSBastionInstancePublicIP }}"
port: 22
timeout: 300
delay: 120
when: bastion_informations.changed
- name: Get AWS Account Information
delegate_to: "{{ EKSBastionInstancePublicIP }}"
aws_caller_info:
register: caller_info
retries: 20
delay: 10
until: "caller_info is not failed"
- name: setup the EKS Cluster and additional extensions of the cluster infrastructure
include_tasks: "{{ item }}"
loop:
- ./tasks/eks-cluster.task.yaml
- ./tasks/eks-storage-provider-ebscsi.task.yaml
- ./tasks/eks-storage-provider-efscsi.task.yaml
- ./tasks/eks-container-insights.task.yaml
- ./tasks/eks-cluster-autoscaler.task.yaml
- ./tasks/eks-loadbalancer-controller.task.yaml
- ./tasks/eks-external-dns.task.yaml
- ./tasks/eks-metrics-server.task.yaml
- ./tasks/eks-xray.task.yaml
- ./tasks/acm.task.yaml