-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
Β·51 lines (43 loc) Β· 1.72 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
Β·51 lines (43 loc) Β· 1.72 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
#!/bin/bash
set -e
echo "π HelmMissions Installation"
echo "============================="
echo ""
if [ -x "./bin/helm" ]; then
export PATH="$(pwd)/bin:$PATH"
fi
command -v kind >/dev/null || { echo "β kind not found. Install: brew install kind"; exit 1; }
command -v kubectl >/dev/null || { echo "β kubectl not found. Install: brew install kubectl"; exit 1; }
command -v helm >/dev/null || {
echo "β helm not found."
echo " Option 1: place a local binary at ./bin/helm"
echo " Option 2: install globally from https://helm.sh/docs/intro/install/"
exit 1
}
command -v python3 >/dev/null || { echo "β python3 not found"; exit 1; }
HELM_MAJOR=$(helm version --short | grep -oE 'v[0-9]+' | tr -d 'v' | head -n1)
if [[ -z "$HELM_MAJOR" || "$HELM_MAJOR" -lt 3 ]]; then
echo "β Helm 3+ required (found $(helm version --short))"
exit 1
fi
echo "β
Helm $(helm version --short)"
if [ ! -d "venv" ]; then
python3 -m venv venv
fi
source venv/bin/activate
pip install -q -r requirements.txt
echo "β
Python packages installed"
CLUSTER_NAME="helmissions"
if kind get clusters 2>/dev/null | grep -q "^${CLUSTER_NAME}$"; then
echo "β
Cluster '${CLUSTER_NAME}' already exists"
else
echo "π§ Creating cluster '${CLUSTER_NAME}'..."
kind create cluster --name "${CLUSTER_NAME}"
fi
kubectl config use-context "kind-${CLUSTER_NAME}"
kubectl create namespace "${CLUSTER_NAME}" --dry-run=client -o yaml | kubectl apply -f -
echo ""
echo "ββββββββββββββββββββββββββββββββββββ"
echo "β
HelmMissions is ready!"
echo " Run: ./play.sh"
echo "ββββββββββββββββββββββββββββββββββββ"