This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from NERSC/deploy-18-10
Deploy 18 10
- Loading branch information
Showing
15 changed files
with
179 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#!/bin/bash | ||
|
||
docker build --no-cache -t registry.spin.nersc.gov/das/jupyterhub-base.gaffer:latest . | ||
branch=deploy-18-10 | ||
docker build --no-cache -t registry.spin.nersc.gov/das/jupyterhub-base.$branch:latest . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,36 @@ | ||
FROM registry.spin.nersc.gov/das/jupyterhub-base.gaffer:latest | ||
ARG branch=unknown | ||
|
||
FROM registry.spin.nersc.gov/das/jupyterhub-base.${branch}:latest | ||
LABEL maintainer="Rollin Thomas <rcthomas@lbl.gov>" | ||
WORKDIR /srv | ||
|
||
# Install gsissh | ||
# Authenticator and spawner | ||
|
||
RUN \ | ||
apt-get update && \ | ||
apt-get install --yes \ | ||
apt-transport-https && \ | ||
echo "deb http://downloads.globus.org/toolkit/gt6/stable/deb/ jessie contrib" >> /etc/apt/sources.list && \ | ||
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 44AE7EC2FAF24365 && \ | ||
apt-get update && \ | ||
apt-get install --yes \ | ||
gsi-openssh-clients | ||
pip install git+https://github.com/nersc/sshapiauthenticator.git && \ | ||
pip install git+https://github.com/nersc/sshspawner.git | ||
|
||
# MFA-enabled login template | ||
|
||
# Add certs | ||
ADD templates templates | ||
|
||
ADD certs /etc/grid-security/certificates | ||
# Install announcement service components | ||
|
||
# JupyterHub GSI Authenticator and SSH Spawner from NERSC | ||
|
||
RUN \ | ||
pip install --no-cache-dir git+https://github.com/NERSC/gsiauthenticator.git && \ | ||
pip install --no-cache-dir git+https://github.com/NERSC/sshspawner.git | ||
cp /tmp/jupyterhub/examples/service-announcement/announcement.py . && \ | ||
cp /tmp/jupyterhub/examples/service-announcement/templates/page.html templates/. | ||
|
||
# Hub scripts | ||
|
||
ADD hub-scripts/*.sh /srv/ | ||
|
||
# Volume for user cert/key files | ||
|
||
VOLUME /certs | ||
|
||
# Config and entrypoint script | ||
# Entrypoint and command | ||
|
||
ADD jupyterhub_config.py docker-entrypoint.sh /srv/ | ||
ADD hub-scripts/*.sh /srv/ | ||
|
||
WORKDIR /srv | ||
ADD docker-entrypoint.sh jupyterhub_config.py /srv/ | ||
RUN chmod +x docker-entrypoint.sh | ||
CMD ["jupyterhub", "--debug"] | ||
ENTRYPOINT ["./docker-entrypoint.sh"] | ||
CMD ["jupyterhub", "--debug"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
#!/bin/bash | ||
|
||
docker build --no-cache -t registry.spin.nersc.gov/das/jupyterhub-jupyter-dev.gaffer:latest . | ||
branch=deploy-18-10 | ||
|
||
docker build \ | ||
--build-arg branch=$branch \ | ||
--no-cache \ | ||
--tag registry.spin.nersc.gov/das/jupyterhub-jupyter-dev.$branch:latest . |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,6 @@ file_env() { | |
} | ||
|
||
file_env 'POSTGRES_PASSWORD' | ||
file_env 'SKEY' | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# Get rid of any certs older than 2 weeks | ||
# Get rid of any cert files older than 2 weeks | ||
|
||
find /certs -type f -name 'x509_*' -mtime +14 -exec rm {} \; | ||
limit=14 | ||
|
||
find /certs -type f -name '*.key' -mtime +$limit -exec rm {} \; | ||
find /certs -type f -name '*.key-cert.pub' -mtime +$limit -exec rm {} \; | ||
find /certs -type f -name '*.key.pub' -mtime +$limit -exec rm {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# Test a user's ability to gsissh in. | ||
# Test user's ability to ssh | ||
|
||
username=$1 | ||
cert=/certs/x509_$username | ||
cert=/certs/$username.key | ||
echo $username $cert | ||
if [ ! -f $cert ]; then | ||
echo " ... no cert for $username" | ||
exit 1 | ||
fi | ||
export X509_USER_CERT=$cert | ||
export X509_USER_KEY=$cert | ||
gsissh \ | ||
-o StrictHostKeyChecking=no \ | ||
-l $username \ | ||
-p 2222 cori19-224.nersc.gov | ||
/usr/bin/ssh \ | ||
-i $cert \ | ||
-l $username \ | ||
-o PreferredAuthentications=publickey \ | ||
-o StrictHostKeyChecking=no \ | ||
-p 22 \ | ||
cori19-224.nersc.gov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.