-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
53 lines (43 loc) · 1.54 KB
/
install.sh
File metadata and controls
53 lines (43 loc) · 1.54 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
#!/bin/bash
# Function to check if a command exists
check_command() {
if ! command -v "$1" &>/dev/null; then
echo "❌ Error: '$1' is not installed. Please install it and try again."
exit 1
fi
}
# Check for required tools
echo "🔍 Checking if required tools are installed..."
check_command kind
check_command docker
check_command kubectl
echo "✅ All required tools are installed."
# Create Kubernetes cluster using Kind
echo "🚀 Creating Kind cluster..."
kind create cluster --config kind-config.yaml
# Add Helm repositories
echo "🔄 Adding Helm repositories..."
helm repo add cilium https://helm.cilium.io
helm repo update
# Install Tetragon
echo "📦 Installing Tetragon..."
helm install tetragon cilium/tetragon \
--namespace kube-system \
--set tetragon.enableBTF=true \
--set tetragon.enableProcessCred=true \
--set tetragon.enableProcessNs=true \
--set tetragon.enableKernelEvents=true \
--set tetragon.enableTracingPolicies=true \
--set tetragon.bpf.mountPath=/sys/fs/bpf
echo "✅ Installed Tetragon."
# Install Prometheus and Grafana
echo "📊 Installing Prometheus and Grafana..."
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
kubectl create ns monitoring
helm install monitoring prometheus-community/kube-prometheus-stack \
-n monitoring \
-f ./grafana_prometheus/custom_kube_prometheus_stack.yml
echo "✅ Installed Prometheus and Grafana."
echo "🚀 Grafana username: admin and Password: prom-operator"
echo "🎉 Installation completed successfully!"