Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit 29b9dfd

Browse files
authored
Merge pull request #42 from NERSC/deploy-18-10
Deploy 18 10
2 parents 876ed97 + 5364f62 commit 29b9dfd

15 files changed

Lines changed: 179 additions & 149 deletions

base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ RUN \
5656
npm install -g configurable-http-proxy && \
5757
git clone https://github.com/jupyterhub/jupyterhub.git && \
5858
cd jupyterhub && \
59-
git checkout tags/0.9.2 && \
59+
git checkout tags/0.9.4 && \
6060
/opt/anaconda3/bin/python setup.py js && \
6161
/opt/anaconda3/bin/pip --no-cache-dir install . && \
6262
cp examples/cull-idle/cull_idle_servers.py /opt/anaconda3/bin/. && \

base/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/bash
22

3-
docker build --no-cache -t registry.spin.nersc.gov/das/jupyterhub-base.gaffer:latest .
3+
branch=deploy-18-10
4+
docker build --no-cache -t registry.spin.nersc.gov/das/jupyterhub-base.$branch:latest .

jupyter-dev/Dockerfile

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,36 @@
1-
FROM registry.spin.nersc.gov/das/jupyterhub-base.gaffer:latest
1+
ARG branch=unknown
2+
3+
FROM registry.spin.nersc.gov/das/jupyterhub-base.${branch}:latest
24
LABEL maintainer="Rollin Thomas <rcthomas@lbl.gov>"
5+
WORKDIR /srv
36

4-
# Install gsissh
7+
# Authenticator and spawner
58

69
RUN \
7-
apt-get update && \
8-
apt-get install --yes \
9-
apt-transport-https && \
10-
echo "deb http://downloads.globus.org/toolkit/gt6/stable/deb/ jessie contrib" >> /etc/apt/sources.list && \
11-
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 44AE7EC2FAF24365 && \
12-
apt-get update && \
13-
apt-get install --yes \
14-
gsi-openssh-clients
10+
pip install git+https://github.com/nersc/sshapiauthenticator.git && \
11+
pip install git+https://github.com/nersc/sshspawner.git
12+
13+
# MFA-enabled login template
1514

16-
# Add certs
15+
ADD templates templates
1716

18-
ADD certs /etc/grid-security/certificates
17+
# Install announcement service components
1918

20-
# JupyterHub GSI Authenticator and SSH Spawner from NERSC
21-
2219
RUN \
23-
pip install --no-cache-dir git+https://github.com/NERSC/gsiauthenticator.git && \
24-
pip install --no-cache-dir git+https://github.com/NERSC/sshspawner.git
20+
cp /tmp/jupyterhub/examples/service-announcement/announcement.py . && \
21+
cp /tmp/jupyterhub/examples/service-announcement/templates/page.html templates/.
22+
23+
# Hub scripts
24+
25+
ADD hub-scripts/*.sh /srv/
2526

2627
# Volume for user cert/key files
2728

2829
VOLUME /certs
2930

30-
# Config and entrypoint script
31+
# Entrypoint and command
3132

32-
ADD jupyterhub_config.py docker-entrypoint.sh /srv/
33-
ADD hub-scripts/*.sh /srv/
34-
35-
WORKDIR /srv
33+
ADD docker-entrypoint.sh jupyterhub_config.py /srv/
3634
RUN chmod +x docker-entrypoint.sh
37-
CMD ["jupyterhub", "--debug"]
3835
ENTRYPOINT ["./docker-entrypoint.sh"]
36+
CMD ["jupyterhub", "--debug"]

jupyter-dev/build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
#!/bin/bash
22

3-
docker build --no-cache -t registry.spin.nersc.gov/das/jupyterhub-jupyter-dev.gaffer:latest .
3+
branch=deploy-18-10
4+
5+
docker build \
6+
--build-arg branch=$branch \
7+
--no-cache \
8+
--tag registry.spin.nersc.gov/das/jupyterhub-jupyter-dev.$branch:latest .

jupyter-dev/certs/70d35895.0

Lines changed: 0 additions & 23 deletions
This file was deleted.

jupyter-dev/certs/70d35895.signing_policy

Lines changed: 0 additions & 3 deletions
This file was deleted.

jupyter-dev/certs/b6b8acc0.0

Lines changed: 0 additions & 17 deletions
This file was deleted.

jupyter-dev/certs/b6b8acc0.signing_policy

Lines changed: 0 additions & 35 deletions
This file was deleted.

jupyter-dev/docker-entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ file_env() {
2424
}
2525

2626
file_env 'POSTGRES_PASSWORD'
27+
file_env 'SKEY'
2728

2829
exec "$@"
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3-
# Get rid of any certs older than 2 weeks
3+
# Get rid of any cert files older than 2 weeks
44

5-
find /certs -type f -name 'x509_*' -mtime +14 -exec rm {} \;
5+
limit=14
6+
7+
find /certs -type f -name '*.key' -mtime +$limit -exec rm {} \;
8+
find /certs -type f -name '*.key-cert.pub' -mtime +$limit -exec rm {} \;
9+
find /certs -type f -name '*.key.pub' -mtime +$limit -exec rm {} \;

0 commit comments

Comments
 (0)