This repository has been archived by the owner on Oct 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (49 loc) · 2.41 KB
/
Makefile
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
banner:
@echo "################################################################"
@echo "## ##"
@echo "## ::::::::: :::::::::: ::: :::::::: :::::::: ##"
@echo "## :+: :+: :+: :+: :+: :+: :+: ##"
@echo "## +:+ +:+ +:+ +:+ +:+ +:+ ##"
@echo "## +#+ +#++:++# +#+ +#+ +:+ +#++:++#++ ##"
@echo "## +#+ +#+ +#+ +#+ +#+ +#+ ##"
@echo "## #+# #+# #+# #+# #+# #+# #+# ##"
@echo "## ######### ########## ########## ######## ######## ##"
@echo "## ##"
@echo "################################################################"
@echo " "
terraform: banner terraform.init terraform.validate terraform.apply terraform.post
terraform.init: banner
@echo "[terraform] Initializing cluster infrastructure with terraform"
@./bin/terraform-init.sh
terraform.validate: banner
@echo "[terraform] Validate cluster infrastructure with terraform"
@./bin/terraform-validate.sh
terraform.plan: banner
@echo "[terraform] Plan cluster infrastructure with terraform"
@./bin/terraform-plan.sh
terraform.apply: banner
@echo "[terraform] Creating cluster infrastructure with terraform"
@./bin/terraform-apply.sh
terraform.apply.force: banner
@echo "[terraform] Creating cluster infrastructure with terraform by bruceforce"
@./bin/terraform-apply.sh --loop
terraform.post: banner
@echo "[terraform] Postprocessing terraform infrastructure"
@./bin/generated/peering.sh
ansible: banner
@echo "[ansible] Configuring bootstraped infrastructure"
@./bin/ansible-playbook.sh
kubespray: banner kubespray.deploy kubespray.post
kubespray.clone: banner
@git clone --branch v2.21.0 https://github.com/kubernetes-sigs/kubespray.git .kubespray
kubespray.deploy: banner
@echo "[kubespray] Bootstrap cluster with kubespray"
@./bin/kubespray-deploy.sh
kubespray.post: banner
@echo "[kubespray] Postprocessing kubespray bootstrapping"
@./bin/kubespray-post.sh
deploy: terraform ansible kubespray
@echo "[kubespray] Deploy OCI Kubernetes Cluster"
destroy:
@echo "[bootstrap] Destroying OCI Kubernetes Cluster"
@echo -n "Are you sure? [y/N] " && read ans && if [ $${ans:-'N'} = 'y' ]; then cd terraform && terraform destroy -var-file="variables.tfvars"; fi