Skip to content
Snippets Groups Projects
Commit 45d65c46 authored by František Dvořák's avatar František Dvořák
Browse files

Enable internal monitoring

parent 99357b96
No related branches found
No related tags found
No related merge requests found
......@@ -81,10 +81,10 @@ singleuser:
image: "valtri/single-user:jupyter-4e-collab"
hub:
# services:
# status:
# url: "http://status-web/"
# admin: true
services:
status:
url: "http://status-web/"
admin: true
image:
name: valtri/hub
tag: "3.x-eosc4" # EOSC, jupyter 3.1.0
......
......@@ -6,8 +6,10 @@
- name: Configure helm repo
shell: |-
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm repo add eginotebooks https://egi-federation.github.io/egi-notebooks-chart/
helm repo update
when: "'jupyterhub' not in ansible_local.helm_repos | map(attribute='name') | list"
when: "'jupyterhub' not in ansible_local.helm_repos | map(attribute='name') | list or
'eginotebooks' not in ansible_local.helm_repos | map(attribute='name') | list"
- name: Get Secrets from Vault for notebooks
vars:
name: "{{ item | basename | splitext | first }}"
......@@ -45,6 +47,7 @@
vars:
name: "{{ item | basename | splitext | first }}"
version: "3.2.1" # app 4.0.2 (2023-11-27)
monitor_version: "0.3.0"
shell: |-
helm status --namespace {{ name }} {{ name }}
if [ $? -ne 0 ]; then
......@@ -55,6 +58,16 @@
helm upgrade --version {{ version }} -f /tmp/{{ item | basename }} --timeout 2h \
--namespace {{ name }} {{ name }} jupyterhub/jupyterhub
fi
helm status --namespace {{ name }} {{ name }}-monitor
if [ $? -ne 0 ]; then
helm install --namespace {{ name }} \
-f /tmp/{{ item | basename }} --version {{ monitor_version }} \
{{ name }}-monitor eginotebooks/notebooks-monitor
else
helm upgrade --version {{ monitor_version }} \
-f /tmp/{{ item | basename }} --namespace {{ name }} \
{{ name }}-monitor eginotebooks/notebooks-monitor
fi
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
......@@ -97,4 +110,4 @@
PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
when: true
with_fileglob:
- "../deployments/*.yaml"
- "../deployments/*.yaml"
......@@ -104,10 +104,10 @@ singleuser:
nvidia.com/gpu: 1
hub:
# services:
# status:
# url: "http://status-web/"
# admin: true
services:
status:
url: "http://status-web/"
admin: true
image:
name: valtri/hub
tag: "3.x-eosc4" # EOSC, jupyter 3.1.0
......
......@@ -6,8 +6,10 @@
- name: Configure helm repo
shell: |-
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm repo add eginotebooks https://egi-federation.github.io/egi-notebooks-chart/
helm repo update
when: "'jupyterhub' not in ansible_local.helm_repos | map(attribute='name') | list"
when: "'jupyterhub' not in ansible_local.helm_repos | map(attribute='name') | list or
'eginotebooks' not in ansible_local.helm_repos | map(attribute='name') | list"
- name: Get Secrets from Vault for notebooks
vars:
name: "{{ item | basename | splitext | first }}"
......@@ -34,6 +36,7 @@
vars:
name: "{{ item | basename | splitext | first }}"
version: "3.2.1" # app 4.0.2 (2023-11-27)
monitor_version: "0.3.0"
shell: |-
helm status --namespace {{ name }} {{ name }}
if [ $? -ne 0 ]; then
......@@ -44,6 +47,16 @@
helm upgrade --version {{ version }} -f /tmp/{{ item | basename }} --timeout 2h \
--namespace {{ name }} {{ name }} jupyterhub/jupyterhub
fi
helm status --namespace {{ name }} {{ name }}-monitor
if [ $? -ne 0 ]; then
helm install --namespace {{ name }} \
-f /tmp/{{ item | basename }} --version {{ monitor_version }} \
{{ name }}-monitor eginotebooks/notebooks-monitor
else
helm upgrade --version {{ monitor_version }} \
-f /tmp/{{ item | basename }} --namespace {{ name }} \
{{ name }}-monitor eginotebooks/notebooks-monitor
fi
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
......@@ -86,7 +99,7 @@
PATH: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
when: true
with_fileglob:
- "../deployments/*.yaml"
- "../deployments/*.yaml"
- hosts: nfs
become: true
tasks:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment