-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathquickstart.sh
65 lines (52 loc) · 1.83 KB
/
quickstart.sh
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
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
DEVBOX_DIR=$(dirname $SCRIPT_DIR)
echo "---------------------------------------------"
echo "-- kind/quickstart.sh"
echo "---------------------------------------------"
bash $DEVBOX_DIR/kind/config/generate.sh > /tmp/kind-config.yml
cat /tmp/kind-config.yml
kind create cluster --config /tmp/kind-config.yml || {
echo "fail to create kind cluster"
exit 1
}
#----------------------------------------
# Install CNI
#----------------------------------------
KIND_CNI=${KIND_CNI:-default}
if [ "$KIND_CNI" != "default" ];
then
bash ${SCRIPT_DIR}/cni/${KIND_CNI}/install.sh
fi
#----------------------------------------
# Install metric-server
#----------------------------------------
kubectl apply -k ${SCRIPT_DIR}/metric-server
#----------------------------------------
# Install monitoring
#----------------------------------------
# bash $DEVBOX_DIR/loki/k8s-install.sh
# bash $DEVBOX_DIR/prometheus/k8s-install.sh
# bash $DEVBOX_DIR/grafana/k8s-install.sh
#----------------------------------------
# Install cert-manager
#----------------------------------------
bash $DEVBOX_DIR/cert-manager/k8s-install.sh
#----------------------------------------
# Install ingress controller
#----------------------------------------
export DEVBOX_INGRESS=${DEVBOX_INGRESS:-traefik}
if [ "$DEVBOX_INGRESS" != "traefik" ];
then
NGINX_MODE=kind bash $DEVBOX_DIR/nginx-ingress-controller/k8s-install.sh
else
TRAEFIK_MODE=kind bash $DEVBOX_DIR/traefik/k8s-install.sh
fi
#----------------------------------------
# Install dashboard
#----------------------------------------
bash $DEVBOX_DIR/kubernetes-dashboard/k8s-install.sh
#----------------------------------------
# Install whoami
#----------------------------------------
bash $DEVBOX_DIR/whoami/k8s-install.sh