Hi,

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 
<https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-web-interfaces.html>
.

My idea was to create routes such as:

   - /emr-services/[username]/hue -> random port jupyterhub machine -> 
   masternode:8888
   - /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 -> 
127.0.0.1:12345
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 (@46.44.168.252) 0.60ms
[W 2018-02-02 14:59:19.791 JupyterHub log:124] 404 GET 
/hub/emr-services/bas/hue ([email protected]) 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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/9d06052f-65d7-4188-b869-f33361f44e59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to