-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (40 loc) · 1.66 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
.PHONY: help config master nodes post_install control_plane k8s_flush destroy
# Colors for terminal output
GREEN := \033[0;32m
NC := \033[0m # No Color
# Default target
all: config master nodes post_install control_plane
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " ${GREEN}help${NC} : Show this help message"
@echo " ${GREEN}config${NC} : Run basic configuration playbook"
@echo " ${GREEN}master${NC} : Set up the Kubernetes master node"
@echo " ${GREEN}nodes${NC} : Set up the Kubernetes worker nodes"
@echo " ${GREEN}post_install${NC} : Run post-installation tasks"
@echo " ${GREEN}control_plane${NC}: Set up the Kubernetes control plane"
@echo " ${GREEN}k8s_flush${NC} : Flush Kubernetes settings"
@echo " ${GREEN}destroy${NC} : Destroy the entire cluster"
@echo " ${GREEN}all${NC} : Run all steps (config, master, nodes, post_install, control_plane)"
config:
@echo "${GREEN}Running configuration playbook...${NC}"
ansible-playbook playbooks/configuration.yaml
master:
@echo "${GREEN}Setting up Kubernetes master node...${NC}"
ansible-playbook playbooks/master.yaml
nodes:
@echo "${GREEN}Setting up Kubernetes worker nodes...${NC}"
ansible-playbook playbooks/nodes.yaml
post_install:
@echo "${GREEN}Running post-installation tasks...${NC}"
ansible-playbook playbooks/k8s_post.yaml
control_plane:
@echo "${GREEN}Setting up Kubernetes control plane...${NC}"
ansible-playbook playbooks/control_plane.yaml
k8s_flush:
@echo "${GREEN}Flushing Kubernetes settings...${NC}"
ansible-playbook playbooks/k8s_flush.yaml
destroy:
@echo "${GREEN}Destroying the entire cluster...${NC}"
./destroy.sh