Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add simple architecture diagram #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yuvipanda
Copy link
Owner

The diagrams package lets us create nice, graphviz
based diagrams from python.

The `diagrams` package lets us create nice, graphviz
based diagrams from python.
@yuvipanda
Copy link
Owner Author

Need to figure out where to include this in the docs

with Diagram("JupyterHub + SSH + SFTP", show=False, outformat="png", filename=f"{IMAGES_DIR}/architecture") as diag:
autohttps = Deployment("autohttps")
ssh = autohttps >> Edge(label="port 22") >> Deployment("jupyterhub-ssh")
sftp = autohttps >> Edge(label="port 2222") >> Deployment("jupyterhub-sftp")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The SFTP k8s service expose a port with name ssh and number 22 (Recent change by me from number 2222)
  2. The SFTP k8s service targets a port with the name ssh on the pod (Recent change by me from targeting port 2222 by number rather than name)
  3. The SFTP k8s pod expose a port with name ssh and number 2222

Services can have sensible numbers <1000, pods should stay above 1000 though to comply with pod security policies etc.

Suggested change
sftp = autohttps >> Edge(label="port 2222") >> Deployment("jupyterhub-sftp")
sftp = autohttps >> Edge(label="port 22") >> Deployment("jupyterhub-sftp")


IMAGES_DIR = "source/_static/images"

with Diagram("JupyterHub + SSH + SFTP", show=False, outformat="png", filename=f"{IMAGES_DIR}/architecture") as diag:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to clarify this is assuming we have deployed jupyterhub ssh alongside z2jh.

@consideRatio
Copy link
Collaborator

consideRatio commented Nov 4, 2020

❤️ wieeee more diagrams! :D This is a very helpful diagram!

Questions raised when I viewed it (here):

  • What does a red line mean? It means SSH traffic right? Let's make the line between autohttps and jupyterhub-ssh red as well. And the one from autohttps to SFTP perhaps.
  • What does "start server if needed" refer to? It would be good to clarify that the jupyterhub-ssh server does this via REST if needed.
  • Perhaps a dedicated color for HTTP traffic, or somehow make it clearer that the storage is mounted to the pods rather than for example SFTP sending SSH/HTTP traffic further along to the user storage.

@GeorgianaElena
Copy link
Collaborator

😍 Such a nice diagram! I think it would be really useful to have it somewhere super visible, like the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants