-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
81 lines (69 loc) · 2.51 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Makefile to install Docker, KIND, OpenTofu, Cosign, kubectl, and Helm
# Variables
KUBECTL_VERSION = v1.30.3
KIND_VERSION = v0.20.0
COSIGN_VERSION = v2.4.0
TOFU_VERSION = v1.8.1
HELM_VERSION = v3.15.3
# Targets
.PHONY: all docker kind opentofu cosign kubectl helm
all: docker kind opentofu cosign kubectl helm
docker:
@echo "Installing Docker..."
@curl -fsSL https://get.docker.com -o get-docker.sh
@sh get-docker.sh
@sudo usermod -aG docker $$USER
@rm get-docker.sh
@echo "Docker installed successfully."
kind:
@echo "Installing KIND..."
@curl -Lo ./kind https://kind.sigs.k8s.io/dl/$(KIND_VERSION)/kind-linux-amd64
@chmod +x ./kind
@sudo mv ./kind /usr/local/bin/kind
@echo "KIND installed successfully."
opentofu:
@echo "Installing Tofu CLI..."
@wget --secure-protocol=TLSv1_2 --https-only https://get.opentofu.org/install-opentofu.sh -O install-opentofu.sh
@chmod +x install-opentofu.sh
@sh install-opentofu.sh --install-method standalone
@rm -f install-opentofu.sh
@echo "Tofu CLI installed successfully."
cosign:
@echo "Installing Cosign..."
@curl -Lo ./cosign https://github.com/sigstore/cosign/releases/download/$(COSIGN_VERSION)/cosign-linux-amd64
@chmod +x ./cosign
@sudo mv ./cosign /usr/local/bin/cosign
@echo "Cosign installed successfully."
kubectl:
@echo "Installing kubectl..."
@curl -LO "https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/linux/amd64/kubectl"
@chmod +x ./kubectl
@sudo mv ./kubectl /usr/local/bin/kubectl
@echo "kubectl installed successfully."
helm:
@echo "Installing Helm..."
@curl -Lo helm.tar.gz https://get.helm.sh/helm-$(HELM_VERSION)-linux-amd64.tar.gz
@tar -zxvf helm.tar.gz
@sudo mv linux-amd64/helm /usr/local/bin/helm
@rm -rf linux-amd64 helm.tar.gz
@echo "Helm installed successfully."
clean:
@echo "Cleaning up installed binaries..."
@sudo rm -f /usr/local/bin/kind
@sudo rm -f /usr/local/bin/opentofu
@sudo rm -f /usr/local/bin/cosign
@sudo rm -f /usr/local/bin/kubectl
@sudo rm -f /usr/local/bin/helm
@echo "Cleanup done."
help:
@echo "Makefile to install Docker, KIND, OpenTofu, Cosign, kubectl, and Helm."
@echo "Usage:"
@echo " make all Install all tools."
@echo " make docker Install Docker."
@echo " make kind Install KIND."
@echo " make opentofu Install OpenTofu."
@echo " make cosign Install Cosign."
@echo " make kubectl Install kubectl."
@echo " make helm Install Helm."
@echo " make clean Remove installed binaries."
@echo " make help Display this help message."