Skip to content

Commit

Permalink
charts: update variables
Browse files Browse the repository at this point in the history
  • Loading branch information
rokroskar committed Oct 10, 2018
1 parent c8e74e4 commit 38e0e6f
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:8.11.1 as react-builder
FROM node:8.11.1-alpine as react-builder

# Uncomment the following line to allow live updating of files for development.
# ADD . /app
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/chartpress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ charts:
contextPath: ../singleuser
buildArgs:
JUPYTERHUB_VERSION: "0.9.2"
RENKU_VERSION: "0.2.0rc1"
RENKU_VERSION: "0.2.0"
dockerfilePath: ../singleuser/Dockerfile
valuesPath: jupyterhub.singleuser.image
paths:
Expand Down
8 changes: 6 additions & 2 deletions helm-chart/renku-notebooks/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: DEFAULT_NOTEBOOK_IMAGE
value: "{{ .Values.jupyterhub.singleuser.image.name }}:{{ .Values.jupyterhub.singleuser.image.tag }}"
{{ if eq .Values.debug true }}
- name: FLASK_DEBUG
value: "1"
Expand All @@ -49,11 +51,13 @@ spec:
- name: GITLAB_REGISTRY_SECRET
value: {{ template "renku.fullname" . }}-registry
- name: GITLAB_URL
{{ if .Values.gitlab_url }}
value: {{ .Values.gitlab_url }}
{{ if .Values.global.gitlab.url }}
value: {{ .Values.gitlab.url }}
{{ else }}
value: {{ template "notebooks.http" . }}://{{ .Values.global.renku.domain}}/gitlab
{{ end }}
- name: IMAGE_BUILD_TIMEOUT
value: "{{ .Values.imageBuildTimeout }}"
- name: IMAGE_REGISTRY
value: {{ .Values.imageRegistry }}
ports:
Expand Down
9 changes: 6 additions & 3 deletions helm-chart/renku-notebooks/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
global:
useHTTPS: false

## specify the GitLab instance URL
# gitlab:
# url:
gitlab:
## specify the GitLab instance URL
url:

replicaCount: 1

Expand All @@ -31,6 +31,9 @@ image:
## Set the default image registry
# imageRegistry:

## set the image build timeout
imageBuildTimeout: '600'

# enable the security context - if using telepresence for development, disable it
securityContext:
enabled: true
Expand Down
6 changes: 3 additions & 3 deletions jupyterhub/jupyterhub-k8s.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM jupyterhub/k8s-hub:bf3550b
FROM jupyterhub/k8s-hub:0.7.0

USER root

COPY requirements-k8s.txt /tmp/requirements.renku.txt
RUN pip3 install -r /tmp/requirements.renku.txt --no-cache-dir
COPY requirements-k8s.txt /tmp/requirements.txt
RUN pip3 install -r /tmp/requirements.txt --no-cache-dir

COPY spawners.py /usr/local/lib/python3.6/dist-packages/

Expand Down
8 changes: 5 additions & 3 deletions singleuser/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Build as renku/singleuser
# Run with the DockerSpawner in JupyterHub

ARG JUPYTERHUB_VERSION=0.9
ARG JUPYTERHUB_VERSION=0.9.2
ARG BASE_IMAGE=jupyterhub/singleuser:$JUPYTERHUB_VERSION

FROM $BASE_IMAGE
ARG JUPYTERHUB_VERSION
ARG RENKU_VERSION=0.2.0rc1
ARG RENKU_VERSION=0.2.0
MAINTAINER Swiss Data Science Center <info@datascience.ch>


Expand All @@ -33,8 +33,10 @@ RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.d
USER $NB_USER

# install jupyterlab, papermill, git extension and renku-jupyterlab-ts
COPY requirements.txt /tmp/requirements.txt

RUN python3 -m pip install -U pip && \
pip install -U jupyterlab papermill && \
pip install -r /tmp/requirements.txt && \
jupyter labextension update @jupyterlab/hub-extension --no-build && \
jupyter labextension install @jupyterlab/git --no-build && \
jupyter labextension install renku-jupyterlab-ts --no-build && \
Expand Down
2 changes: 2 additions & 0 deletions singleuser/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jupyterlab==0.34.0
papermill
5 changes: 3 additions & 2 deletions src/notebooks_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,10 @@ def get_notebook_image(user, namespace, project, commit_sha):
gl_project = get_gitlab_project(user, namespace, project)

# image build timeout -- configurable, defaults to 10 minutes
image_build_timeout = int(os.getenv('GITLAB_IMAGE_BUILD_TIMEOUT', 600))
image_build_timeout = int(os.getenv('IMAGE_BUILD_TIMEOUT', 600))

image = os.getenv('DEFAULT_NOTEBOOK_IMAGE', 'renku/singleuser:latest')

image = 'renku/singleuser:latest'
commit_sha_7 = commit_sha[:7]

for pipeline in gl_project.pipelines.list():
Expand Down

0 comments on commit 38e0e6f

Please sign in to comment.