Skip to content

Commit

Permalink
Add jupyterhub-ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jul 28, 2021
1 parent 27bbb34 commit bb47f27
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 8 deletions.
75 changes: 73 additions & 2 deletions config/hubs/jmte.cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,75 @@ hubs:
# Along with this, we also make use of the autohttps system that
# requires us to configure an letsencrypt email.
#
service:
type: LoadBalancer
https:
enabled: true
type: letsencrypt
letsencrypt:
contactEmail: [email protected]

service:
# jupyterhub-ssh/sftp integration part 1/3:
#
# We must accept traffic to the k8s Service (proxy-public) receiving traffic
# from the internet. Port 22 is typically used for both SSH and SFTP, but we
# can't use the same port for both so we use 2222 for SFTP in this example.
#
extraPorts:
- name: ssh
port: 22
targetPort: ssh
- name: sftp
port: 2222
targetPort: sftp
traefik:
# jupyterhub-ssh/sftp integration part 2/3:
#
# We must accept traffic arriving to the autohttps pod (traefik) from the
# proxy-public service. Expose a port and update the NetworkPolicy
# to tolerate incoming (ingress) traffic on the exposed port.
#
extraPorts:
- name: ssh
containerPort: 8022
- name: sftp
containerPort: 2222
networkPolicy:
allowedIngressPorts: [http, https, ssh, sftp]
# jupyterhub-ssh/sftp integration part 3/3:
#
# We must let traefik know it should listen for traffic (traefik entrypoint)
# and route it (traefik router) onwards to the jupyterhub-ssh k8s Service
# (traefik service).
#
extraStaticConfig:
entryPoints:
ssh-entrypoint:
address: :8022
sftp-entrypoint:
address: :2222
extraDynamicConfig:
tcp:
services:
ssh-service:
loadBalancer:
servers:
- address: jupyterhub-ssh:22
sftp-service:
loadBalancer:
servers:
- address: jupyterhub-sftp:22
routers:
ssh-router:
entrypoints: [ssh-entrypoint]
rule: HostSNI(`*`)
service: ssh-service
sftp-router:
entrypoints: [sftp-entrypoint]
rule: HostSNI(`*`)
service: sftp-service



hub:
config:
Authenticator:
Expand Down Expand Up @@ -219,3 +280,13 @@ hubs:
# per Dask cluster limits.
c.ClusterConfig.cluster_max_cores = 256
c.ClusterConfig.cluster_max_memory = "1028G"
jupyterhub-ssh:
hubUrl: http://proxy-http:8000

ssh:
enabled: true

sftp:
enabled: false
15 changes: 9 additions & 6 deletions hub-templates/daskhub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ description: Deployment Chart for a dask-enabled JupyterHub
name: daskhub
version: "0.1.0"
dependencies:
- name: basehub
version: "0.1.0"
repository: file://../basehub
- name: dask-gateway
version: "0.9.0"
repository: 'https://dask.org/dask-gateway-helm-repo/'
- name: basehub
version: "0.1.0"
repository: file://../basehub
- name: dask-gateway
version: "0.9.0"
repository: 'https://dask.org/dask-gateway-helm-repo/'
- name: jupyterhub-ssh
version: 0.0.1-n114.h3c48a9f
repository: https://yuvipanda.github.io/jupyterhub-ssh/

0 comments on commit bb47f27

Please sign in to comment.