-
Notifications
You must be signed in to change notification settings - Fork 0
/
initial-setup.sh
56 lines (39 loc) · 1.31 KB
/
initial-setup.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
# For details, see blog post
# Install K3s
# ============================
#
# (Don't really curl ... | sh without inspecting source!)
# If we are use K8s's default ingress controller (traefik) and use k8s cert-manager.io for https:
# curl -sfL https://get.k3s.io | sh -
# Otherwise, to use jupyter's cert manager, or manual caddy, do:
curl -sfL https://get.k3s.io | sh -s - --disable=traefik
echo "export KUBECONFIG=/etc/rancher/k3s/k3s.yaml" >> ~/.bashrc
source ~/.bashrc
sudo chown $(id -u) /etc/rancher/k3s/k3s.yaml
# Install Helm
# ============================
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
# Enable GPU + timeslicing
# ============================
bash nvidia/nvidia-device-plugin.sh
# Launch JupyterHub
# ==========================
# edit config files appropriately and:
helm upgrade --cleanup-on-fail \
--install testjuypterhelm jupyterhub/jupyterhub \
--namespace testjupyter \
--create-namespace \
--version=3.2.1 \
--values public-config.yaml \
--values private-config.yaml
# identically:
# bash jupyterhub/jupyterhub.sh
# Additional setup
# ==========================
## if using a cert-manager
helm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.13.3 \
--set installCRDs=true