I've written an AWS EMR spawner which spins up an EMR cluster for each user 
and starts a notebook server on the master node. An ssh tunnel is created 
to route traffic from the notebook on the master node to a random local 
port on the jupyterhub machine. This works, however I cannot figure out how 
to add additional routes to view the EMR web interfaces 

My idea was to create routes such as:

   - /emr-services/[username]/hue -> random port jupyterhub machine -> 
   - /emr-services/[username]/yarn-rm -> random port jupyterhub machine 
   -> masternode:8088
   - /emr-services/[username]/hdfs-namenode -> random port jupyterhub 
   machine -> masternode:50070
I thought it'd be best to create /emr-services/[username]/* routes to not 
intervene with anything at /user/[username]/*.

At this point I'm stuck. I've implemented a custom spawner which creates 
ssh tunnels for all admin uis during starting the notebook. The 
/user/[username] -> notebook route is added in Proxy.add_user(). I've 
overridden this method to add additional custom routes and see my route 
being created and http requests being redirected in the logs:

14:43:49.422 - info: [ConfigProxy] Adding route /emr-services/bas/hue ->
14:43:49.422 - info: [ConfigProxy] 201 POST /api/routes/emr-services/bas/hue

[I 2018-02-02 14:59:19.730 JupyterHub log:124] 302 GET 
/emr-services/bas/hue → /hub/emr-services/bas/hue (@ 0.60ms
[W 2018-02-02 14:59:19.791 JupyterHub log:124] 404 GET 
/hub/emr-services/bas/hue (bas@ 9.32ms

curl -L localhost:12345 on the jupyterhub machine gives me the Hue UI, but 
browsing to http://jupyterhub-machine/emr-services/bas/hue gives me a 404.

Any idea what I'm missing?

You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to