Is there good solution to manage two environments?

Hello !

Recently I have one question.

I managed two environments jupyterHub.

One is GKE cluster using zero-to-jupyterhub-k8s.

The other is just one workstation using Docker jupyterHub.
(I recently built an on-premise environment due to cost concerns.)

Recently, I am thinking about whether there is a way to manage two environments using only one jupyterhub. (Or It’s like a jupyterhub)

For example, if i create a singleuser notebook in GKE jupyterHub, i want it to be created on workstation based on the conditions.

Is there good solution about that?

If you have a similar concern, please share it with me.

You might like to use the sshspawner. You can then run the JupyterHub on one machine and connect to the other machine.

Regarding the part of “based on conditions”, I guess the easiest is to programm your own spawner that implements exactly the logic you want, maybe mixing the code from several spawners that you like.

1 Like

wrapspawner can be used to select from multiple Spawners based on different conditions. So you can have one sub-Spawner that launches in kubernetes with KubeSpawner, and another that launches elsewhere with SSH or some other. If you set up Docker with tcp/tls, you could probably make the remote spawner be DockerSpawner, if you can get the docker client credentials and environment setup into your Hub container.

1 Like