Commit 9cb9b8d2 authored by Adam Fekete's avatar Adam Fekete
Browse files

new structure

parent 171e8277
Pipeline #67496 passed with stage
in 29 seconds
# default installed image for docker executor is: python:3.6
# using an image that can do git, docker, docker-compose
# https://docs.gitlab.com/ee/ci/docker/using_docker_build.html
image: youpy/docker-compose-git
image: docker:dind
variables:
GIT_SUBMODULE_STRATEGY: recursive
......@@ -14,7 +14,6 @@ variables:
stages:
- build
- deploy
build image:
stage: build
......@@ -27,31 +26,6 @@ build image:
--cache-from ${IMAGE_NAME}:latest
--tag ${IMAGE_NAME}:${IMAGE_TAG}
--tag ${IMAGE_NAME}:latest
notebook
.
- docker push ${IMAGE_NAME}:${IMAGE_TAG}
- docker push ${IMAGE_NAME}:latest
deploy to analytics-toolkit:
stage: deploy
only:
- master
when: manual
image: dtzar/helm-kubectl:2.14.3
before_script:
- echo $CI_KUBECONFIG | base64 -d > config
- export KUBECONFIG=${PWD}/config
- helm init --client-only
- helm repo add jupyterhub https://jupyterhub.github.io/helm-chart
- helm repo update
- helm version
script:
- helm upgrade --install $RELEASE jupyterhub/jupyterhub
--namespace $NAMESPACE
--version=0.8.0
--values jupyterhub/config.yml
--set singleuser.image.name=$IMAGE_NAME
--set singleuser.image.tag=$IMAGE_TAG
--set singleuser.imagePullSecret.registry=$CI_REGISTRY
--set singleuser.imagePullSecret.username=$CI_DEPLOY_USER
--set singleuser.imagePullSecret.password=$CI_DEPLOY_PASSWORD
--timeout=3600
# The keys with empty values are necessary and they are defined as environmental variables and applied by the helm command.
# Generate a random hex string representing 32 bytes to use as a security token.
# Run this command in a terminal and copy the output:
# openssl rand -hex 32
# more: https://zero-to-jupyterhub.readthedocs.io/en/latest/setup-jupyterhub.html
proxy:
secretToken: '2535e4f955ebdc1aff11b7951c00f30015a80ad9f3682ad7753158eff03f94d0'
service:
type: NodePort
nodePorts:
http: 31002
https:
enabled: false
hub:
extraEnv:
OAUTH2_AUTHORIZE_URL: https://labdev-nomad.esc.rzg.mpg.de/fairdi/keycloak/auth/realms/fairdi_nomad_test/protocol/openid-connect/auth
OAUTH2_TOKEN_URL: https://labdev-nomad.esc.rzg.mpg.de/fairdi/keycloak/auth/realms/fairdi_nomad_test/protocol/openid-connect/token
baseUrl: /workshop/
db:
type: sqlite-pvc
pvc:
storageClassName: manual-analytics-workshop-user-db
extraConfig: |
c.Authenticator.auto_login = True
auth:
type: custom
custom:
className: oauthenticator.generic.GenericOAuthenticator
config:
login_service: "keycloak"
client_id: "analytics-workshop"
client_secret: "3d96c107-b571-4e91-a5d0-dfece41bd77a"
token_url: https://labdev-nomad.esc.rzg.mpg.de/fairdi/keycloak/auth/realms/fairdi_nomad_test/protocol/openid-connect/token
userdata_url: https://labdev-nomad.esc.rzg.mpg.de/fairdi/keycloak/auth/realms/fairdi_nomad_test/protocol/openid-connect/userinfo
userdata_method: GET
userdata_params: {'state': 'state'}
username_key: sub
admin:
users:
- adam@fekete.co.uk
# type: dummy
# dummy:
# password: 'BigMax2019'
# whitelist:
# users:
# - luca
# - xiangyue
# - markus
# - adam
# - test1
# - test2
# admin:
# users:
# - luca
# - xiangyue
# - markus
# - adam
singleuser:
cpu:
limit: 12
guarantee: 0.2
memory:
limit: 10G
guarantee: 1G
image:
name: ''
tag: ''
imagePullSecret:
enabled: true
password: ''
registry: ''
username: ''
initContainers:
- name: fix-permissions
image: busybox
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
command: [ '/bin/sh', '-c', 'chown 1000:100 /home/jovyan']
volumeMounts:
- mountPath: /home/jovyan
name: home
subPath: '{username}'
lifecycleHooks:
postStart:
exec:
command: ["cp", "-a", "-n", "/home/tutorials", "/home/jovyan/"]
storage:
type: 'static'
static:
pvcName: 'analytics-workshop-user-data'
subPath: '{username}'
prePuller:
hook:
enabled: enable
scheduling:
userScheduler:
enabled: false
podPriority:
enabled: false
userPlaceholder:
enabled: false
replicas: 0
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment