From b0415f2ce829190558bd706d1843f8c4fcd1fa09 Mon Sep 17 00:00:00 2001 From: "nagle.zhang" <1247555725@qq.com> Date: Tue, 19 Apr 2022 00:24:36 +0800 Subject: [PATCH] add some test. --- bootstrap.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 58f766c..918de06 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,11 +1,20 @@ #!/bin/bash -# basic tools(git, curl) -# k3s and set current context as k3s -curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644 && export KUBECONFIG=/etc/rancher/k3s/k3s.yaml +# k3s and set current context as k3s , k3s use trafik as ingress controller by default. +(which k3s &> /dev/null && test -f /etc/rancher/k3s/k3s.yaml) || \ + curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644 + +export KUBECONFIG=/etc/rancher/k3s/k3s.yaml +kubectl get namespace jitsi &> /dev/null || \ + sudo -E kubectl create namespace jitsi + +sudo -E kubectl config set-context --current --namespace=jitsi # helm -curl -sfL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash -s - -#export KUBECONFIG=/etc/rancher/k3s/k3s.yaml -sudo helm repo add jitsi https://jitsi-contrib.github.io/jitsi-helm/ -sudo helm install shlug-jitsi jitsi/jitsi-meet -f values.yml +which helm &> /dev/null || \ + curl -sfL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash -s - + +# jitsi +sudo -E helm repo add jitsi https://jitsi-contrib.github.io/jitsi-helm/ +sudo -E helm install shlug-jitsi jitsi/jitsi-meet -f values.yml -n jitsi +