-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (50 loc) · 2.09 KB
/
deploy_infrastructure_on_aws.yml
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
name: Deploy infrastructure on AWS
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install Terraform
run: |
sudo apt-get update
sudo apt-get install -y gnupg software-properties-common curl
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update && sudo apt-get install terraform
terraform --version
- name: Install kubectl
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y kubectl
kubectl version --client
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Set Terraform working directory
run: cd deployments/enterprise/modules
working-directory: deployments/enterprise/modules
- name: Initialize Terraform
run: terraform init
- name: Create VPC
run: terraform apply -target="module.vpc" -auto-approve
- name: Create EKS Cluster
run: |
terraform apply -target="module.eks_blueprints" -auto-approve
terraform output -raw configure_kubectl | bash
- name: Deploy EKS Blueprints K8s Addons
run: terraform apply -target="module.eks_blueprints_kubernetes_addons" -auto-approve
- name: Deploy Kubeflow Utils
run: terraform apply -target="module.kubeflow_utils" -auto-approve
- name: Deploy Kubeflow
run: terraform apply -target="module.kubeflow_components" -auto-approve
- name: Deploy Monitoring
run: terraform apply -target="module.monitoring" -auto-approve