Commit 03c7b1e3 authored by ogonzale's avatar ogonzale

Initial revision

parents
/
0:0 444 local/data/httpd/jupyter/conf/httpd.conf
0:0 444 local/data/httpd/jupyter/htdocs/index.html
0:0 444 local/soft/etc/jupyterhub/cbglogo.svg
0:0 444 local/soft/etc/jupyterhub/jupyterhub_config.py
0:0 544 local/soft/sbin/jupyterhubd
This diff is collapsed.
<VirtualHost *:80>
ServerName jupyter.mpi-cbg.de
ServerAlias jupyter
Redirect permanent / https://jupyter.mpi-cbg.de/
</VirtualHost>
<VirtualHost *:443>
ServerName jupyter.mpi-cbg.de
ServerAlias jupyter
ServerAdmin root@localhost
# logs
CustomLog /local/data/httpd/jupyter/logs/access_log combined
ErrorLog /local/data/httpd/jupyter/logs/error_log
# SSL stuff
SSLEngine On
SSLProxyEngine On
SSLCertificateFile /local/soft/etc/ssl/jupyter.crt
SSLCertificateKeyFile /local/soft/etc/ssl/jupyter.key
SSLCACertificateFile /local/soft/etc/ssl/jupyter.ca.crt
# forward all requests to the "real" jupyter service
ProxyPreserveHost On
ProxyRequests off
<Location ~ "/(user/[^/]*)/(api/kernels/[^/]+/channels|terminals/websocket)/?">
ProxyPass wss://localhost:1082
ProxyPassReverse wss://localhost:1082
</Location>
ProxyPass / https://localhost:1082/
ProxyPassReverse / https://localhost:1082/
</VirtualHost>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 2789.26 766"><defs><style>.a{fill:#c1272d;}.b{fill:url(#a);}.c{fill:#666;}.d{fill:#999;}.e{fill:#4d4d4d;}</style><radialGradient id="a" cx="492.58" cy="500.09" r="253.93" gradientUnits="userSpaceOnUse"><stop offset="0.37" stop-color="#fca953"/><stop offset="0.39" stop-color="#fca548"/><stop offset="0.48" stop-color="#fd992e"/><stop offset="0.57" stop-color="#fe911a"/><stop offset="0.67" stop-color="#ff8b0b"/><stop offset="0.8" stop-color="#ff8703"/><stop offset="1" stop-color="#ff8600"/></radialGradient></defs><title>cbg_logo_jupyter</title><circle class="a" cx="405.64" cy="455.5" r="122.5"/><path class="b" d="M602.64,225.26c-25.8-1.17-52.47-4-79-3.27-71.62,2-135.85,25-190.19,72.57C300,323.85,279.47,361,274.17,405.1c-4.22,35.07.6,69.18,30.32,93.12,13.14,10.59,29.09,18.1,44.57,25.28,22.06,10.24,45,18.29,64.29,34.06,31.46,25.76,52,57.77,59.07,98,2.05,11.68,3.31,23.5,4.58,35.29.76,7.1-14.24,17-20.5,13.43-1.55-.87-2-4.21-2.39-6.51-2.75-15.11-3.67-30.79-8.35-45.26-13.08-40.51-39-69.81-79.56-85.21-17-6.45-33.9-13.19-50.55-20.48-49-21.48-72.57-60.44-74.32-112.76-1.47-44.14,16.58-82.35,40.93-117.63,36.17-52.4,87.79-82.6,147.94-99.69,43.08-12.24,87-15,131.47-11,3,.26,6.07.27,9.11.36C587.62,206.66,594.69,211.11,602.64,225.26Z" transform="translate(-66.86 -53)"/><path class="b" d="M570.77,190.71c-8.34,0-15.31.3-22.26-.05C445.9,185.52,354.43,212,281,287c-32.39,33.08-55.64,72.19-64.32,118.39-9.13,48.63-2,94.43,29.32,134.16,18.13,23,43.5,35.52,70.75,45,17.85,6.22,35.74,12.89,52.5,21.53,33.28,17.16,49.25,46.71,54.66,82.73.82,5.49.82,11.11,1.79,16.56,1.21,6.79-2.22,8.8-8.07,9.83-20.4,3.59-19.5,3.53-23.26-16.68-4.23-22.74-16.11-41.91-35.53-54.55-16-10.42-33.44-18.87-50.74-27.13-35-16.7-66.86-37.15-89.77-69.24a144,144,0,0,1-27.14-79.29C187.44,371.89,228,297.2,305.05,241.26c45.4-33,96-54.43,151.67-61.78,29.74-3.92,60-3.67,90.06-5.17a9.31,9.31,0,0,1,5.67,1.6C558.41,180.43,564.12,185.28,570.77,190.71Z" transform="translate(-66.86 -53)"/><path class="b" d="M632.16,267.32C598,260.69,565.65,256.87,533,259.7c-59.5,5.14-113.13,24.23-155.16,68.62-19,20.05-28.71,44.55-28.13,72.41.37,17.57,6.27,33.7,19.34,45.63,20.17,18.42,41.19,35.91,62.08,53.53,28.42,24,51.95,51.6,68.54,85.23,13.28,26.9,18.84,55.42,22,84.79.59,5.48-.74,8.53-5.66,10.68-4.58,2-8.93,4.53-14.27,7.27-1.78-12.49-2.72-24.26-5.24-35.67-8.84-40-25.11-76.09-54.18-106-18.51-19-39.71-33.46-63.17-45.67A193.79,193.79,0,0,1,338.55,472c-30.49-27.8-37.51-67.36-20.12-107.83,17-39.59,45.7-68.87,82.78-90.07C434.62,255,470.73,244.39,509,240.76c33.71-3.19,67.16-1.36,100.57,3.41,6.43.92,11.31,3.32,14.26,9.47C625.91,257.89,628.75,261.76,632.16,267.32Z" transform="translate(-66.86 -53)"/><path class="b" d="M357.58,719c-11.05-.89-20.74-1.94-30.45-2.39-11.62-.53-18.6-6.57-26.49-15.19-14.4-15.73-31.49-29.12-48.17-42.61-30.3-24.52-59.08-50.39-77.6-85.38-22.77-43-34.05-88.85-28-137.55,12.26-99.16,63.54-173.76,146.71-227.22a380.51,380.51,0,0,1,166.49-59c11.55-1.26,23.09-2.62,34.6-4.21,12.33-1.71,20.57,6.48,31.87,12.11-20.17,1.7-38.52,2.71-56.74,4.88-115.72,13.8-207.5,65.8-267.21,168.48-15.71,27-28.25,55-33.17,86.5-13,83.34,27,175.62,101,218.33,16.21,9.36,32.58,18.52,48.23,28.75,17.07,11.16,30.57,25.74,37,45.76C356.31,712.5,356.66,714.91,357.58,719Z" transform="translate(-66.86 -53)"/><path class="b" d="M653.4,314.2c-25.16-7.1-49.11-11.43-73.5-10.2-32.28,1.63-63.95,6.8-92,24.48-12.82,8.07-22.79,19.09-31.06,31.8-9.85,15.15-10.19,31-5.54,47.89,7.16,25.94,23.1,46.79,39.42,67.05C518,509.15,539,546.33,551.24,588c5.25,17.8,8.11,36.33,11.67,54.6a9.06,9.06,0,0,1-2.52,7.14c-5.19,4.74-11,8.83-17.7,14.1-1.84-11.54-3.07-21.93-5.2-32.12-9.52-45.42-26.67-87.45-57.16-123.06-14.58-17-30.24-33.1-45.1-49.88-12.88-14.54-25.16-29.89-31.51-48.37-9-26.23-6.49-51.37,12.35-73.3,20.6-24,47.8-37,77.27-45.84,32.66-9.78,66.18-11.2,99.94-8.09,13.83,1.27,27.57,3.52,41.4,4.73,6.47.56,10.16,3.37,12.17,9.34C648.62,302.51,650.82,307.6,653.4,314.2Z" transform="translate(-66.86 -53)"/><path class="b" d="M667.53,370.51c-13.8,0-26.48-1.1-38.86.3a185.56,185.56,0,0,0-39,8.46c-18.9,6.47-29.33,26.14-29.31,46,0,26,10.23,49.44,16.16,74,8.34,34.45,16.76,68.88,25,103.35.49,2.07.57,5.11-.59,6.56-5.39,6.78-11.29,13.15-18.11,20.93-1.95-9.77-3.35-17.4-5-25a586.83,586.83,0,0,0-53-145.39c-7.45-14.32-12.62-30-17.37-45.52-7.12-23.2,8.05-50.28,26.88-61.73,15.69-9.53,32.81-14.4,50.69-16.87a181.55,181.55,0,0,1,69.19,3.8c5.8,1.44,8.56,4.21,9.41,9.92C664.63,356.42,666.19,363.45,667.53,370.51Z" transform="translate(-66.86 -53)"/><path class="b" d="M471.79,132.47c-20.8,3.84-41.79,6.86-62.36,11.66-74.73,17.42-139.2,53-193.54,107.74-46.76,47.11-75.34,103-86.27,167.87-14.18,84.11,6.84,158.89,62.68,223.63,11.72,13.6,23.55,27.09,36.38,41.84-3.34-1.64-5.62-2.41-7.5-3.74-18.79-13.23-37.68-26.34-56.22-39.92-22.23-16.28-31.61-41.23-40.73-65.4-29.62-78.5-24.38-156.45,8.61-232.59,36.94-85.29,101.06-143.9,184.22-183.13a413.28,413.28,0,0,1,123.84-36.6c10-1.29,20.81,4.16,31.25,6.51Z" transform="translate(-66.86 -53)"/><path class="b" d="M88.73,539c-5.87-19.68-11.92-39.31-17.58-59.06-10.22-35.67-.31-69.61,10-103.2,18.68-60.64,54.27-110.72,97.9-156C229.8,168.12,291,133.87,360.84,114.43c9.62-2.68,20.58-.74,30.91-.62,4.22,0,8.43,1,13.41,1.61-18.93,5.66-37.5,10.32-55.43,16.73C233,173.89,149.52,251,104.07,367.11,87.59,409.2,84.2,453.54,87.89,498.44c1.09,13.28,2,26.57,3,39.86Z" transform="translate(-66.86 -53)"/><path class="b" d="M623.94,576.31c-3.53-29.34-7.39-56.29-9.81-83.38-1.49-16.64.45-33.35,7.17-49,7.94-18.5,22.6-27.76,42.3-29.73,4.64-.46,7,.85,7,6.13-.35,54.59-15.12,105.06-42.95,151.85C627.13,573,626.34,573.63,623.94,576.31Z" transform="translate(-66.86 -53)"/><path class="b" d="M74.82,341.2C99.3,236,187.78,144.1,303.27,120.44,200.23,166.22,120.21,235.79,74.82,341.2Z" transform="translate(-66.86 -53)"/><circle class="c" cx="520.14" cy="42" r="42"/><circle class="c" cx="37.64" cy="103.5" r="32.5"/><circle class="d" cx="78.14" cy="709" r="57"/><path class="e" d="M826.69,663.1h22.94q27.3,0,38.78-14.82t11.47-46.77V230.84h63.35V601.51q0,62.18-29.22,89.77t-82.19,27.6Z" transform="translate(-66.86 -53)"/><path class="e" d="M1048.42,230.84h63.36V458.59q0,46.49,18.57,72t55.7,25.57q39.33,0,59.53-24.7t20.21-64.78V230.84h54.61V464.4q0,33.12-9.28,60.42t-26.49,46.48a118.69,118.69,0,0,1-42.33,29.92Q1217.18,612,1186.05,612q-66.09,0-101.85-37.18t-35.78-111.55Z" transform="translate(-66.86 -53)"/><path class="e" d="M1405.6,237.81a280.55,280.55,0,0,1,44.78-10.17,353.38,353.38,0,0,1,52.43-3.78q31.67,0,57.89,8.14t45.06,23.82A103.13,103.13,0,0,1,1634.7,295q10.11,23.52,10.11,54.32,0,29.63-7.92,53.16t-22.67,39.8a100.12,100.12,0,0,1-35,25q-20.2,8.71-44.78,8.72a95.75,95.75,0,0,1-19.66-2,113.6,113.6,0,0,1-17.48-4.93V437.67H1505q36.57,0,54.88-22.08t18.3-65.07q0-20.32-6.83-34.57A59.84,59.84,0,0,0,1552.51,293a81.38,81.38,0,0,0-28.13-12.78,141.9,141.9,0,0,0-34.68-4.07H1469V605H1405.6Z" transform="translate(-66.86 -53)"/><path class="e" d="M1787.88,450.45,1674.29,230.84h69.9l80.28,155.7,81.38-155.7h62.26l-116.87,215V605h-63.36Z" transform="translate(-66.86 -53)"/><path class="e" d="M1993.23,230.84h276.34l-19.66,54.61h-91.75V605h-63.35V285.45H1993.23Z" transform="translate(-66.86 -53)"/><path class="e" d="M2312.17,230.84h202.07l-19.66,54.61H2375.52V388.87h114.69l-19.66,54.61h-95V550.39h145.27L2501.13,605h-189Z" transform="translate(-66.86 -53)"/><path class="e" d="M2693.37,459.75h-45.88V605h-63.35V236.65q21.3-4.65,45.6-8.72t57.07-4.07a187.55,187.55,0,0,1,52.43,7q24,7,41.51,20.62a94.41,94.41,0,0,1,27.3,34.28q9.84,20.63,9.83,48.51a108.35,108.35,0,0,1-6,36.61,127.66,127.66,0,0,1-15.57,30.5,129.31,129.31,0,0,1-21.3,23.82,124.31,124.31,0,0,1-22.66,16L2856.11,605h-74.27Zm-45.88-183.6v136h66.63q13.64-9.87,25.94-28.47t12.29-44.74q0-29.62-17.21-46.19t-60.34-16.56Z" transform="translate(-66.86 -53)"/></svg>
\ No newline at end of file
This diff is collapsed.
#!/bin/bash
# run the hub in the background and try to always keep it running
# local software is installed here
SOFT=/local/soft
# make sure we run local software
export PATH=$SOFT/bin:$PATH
# this is the stdout/stdin from the command below, including messages from
# the hub and the proxy
OUTALL=$SOFT/etc/jupyterhub/logs/jupyterhub.out
# this is the output from the hub, as defined in the config file
OUTHUB=$SOFT/etc/jupyterhub/logs/jupyterhub.log
# log a message with date and time
logdate() {
echo "[ $( date +"%Y-%m-%d %H:%M:%S" ) daemon] $*"
}
if [ "$1" == "--daemon" ]
then
# go to a directory that will always exist, to avoid error messages
# from disappearing directories
cd /
# start the hub and keep it alive
while ! pgrep -x jupyterhub &> /dev/null
do
# if the hub dies but the proxy doesn't, we have to terminate
# it. it must be the only one whose PPID is 1 (which if the hub
# is down should be the only one period, but well)
pids=$( pgrep -f -P 1 configurable-http-proxy )
let tries=0
while [ ! -z "$pids" ]
do
if [ $tries -lt 5 ]
then
# ask 5 times the proxy to terminate
logdate "Killing orphan proxy processes (try #$tries)"
kill $pids
let tries=tries+1
else
# after 5 times, try forever to kill it with -9
logdate "Killing orphan proxy processes with -9"
kill -9 $pids
fi
sleep 10
pids=$( pgrep -f -P 1 configurable-http-proxy )
done &> $OUTALL
# rotate logs before starting the hub
for logfile in $OUTALL $OUTHUB
do
if [ -e "$logfile" ]
then
if [ -s "$logfile" ]
then
new="$logfile.$( date -r "$logfile" +"%y%m%d-%H%M%S" )"
mv "$logfile" "$new"
gzip "$new"
else
rm "$logfile"
fi
fi
done
# start the hub
jupyterhub -f $SOFT/etc/jupyterhub/jupyterhub_config.py &> $OUTALL
done
else
# replace $0 with a "daemonized" version of itself
setsid $0 --daemon &
fi
Markdown is supported
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