-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
61 lines (53 loc) · 2.33 KB
/
makefile
File metadata and controls
61 lines (53 loc) · 2.33 KB
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
# Variables
MINIKUBE_PROFILE := minikube-cluster
# MINIKUBE
start_cluster:
minikube start --profile=$(MINIKUBE_PROFILE)
kubectl delete namespace zuidui
delete_cluster:
minikube stop --profile=$(MINIKUBE_PROFILE)
minikube delete --profile=$(MINIKUBE_PROFILE)
@echo "Cluster deleted"
enable_ingress:
minikube addons enable ingress --profile=$(MINIKUBE_PROFILE)
# Install ArgoCD
install_argocd:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/manifests/install.yaml
# Install ArgoCD rollout
install_argocd_rollout:
kubectl create namespace argo-rollouts
kubectl apply -n argo-rollouts -f https://raw.githubusercontent.com/argoproj/argo-rollouts/stable/manifests/install.yaml
# Delete ArgoCD
delete_argocd:
kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/manifests/install.yaml
kubectl delete namespace argocd
@echo "Delete argocd namespace manually when objects are finalized"
# Delete ArgoCD rollout
install_argocd_rollout:
kubectl delete -n argo-rollouts -f https://raw.githubusercontent.com/argoproj/argo-rollouts/stable/manifests/install.yaml
kubectl delete namespace argo-rollouts
@echo "Delete argocd rollout namespace manually when objects are finalized"
deploy_app_minikube:
kubectl apply -f k8s/minikube/utils/
kubectl apply -f k8s/minikube/ingress/
kubectl apply -f k8s/minikube/volumes/
kubectl apply -f k8s/minikube/services/resources
kubectl apply -f k8s/minikube/services/
deploy_app_eks:
kubectl apply -f k8s/eks/utils/
kubectl apply -f k8s/eks/ingress/
kubectl apply -f k8s/eks/volumes/
kubectl apply -f k8s/eks/services/resources
kubectl apply -f k8s/eks/services/
#EKS
enable_ingress_EKS:
kubectl create namespace zuidui
kubectl create namespace ingress-nginx
helm install my-nginx-controller ingress-nginx/ingress-nginx --namespace ingress-nginx
# Tareas
start: start_cluster enable_ingress install_argocd install_argocd_rollout
start_eks: enable_ingress_EKS install_argocd_rollout install_argocd
#deploy: build-image load-image deploy-app expose-app apply-ingress