Configuration of NRP proxy for multiple backends


#1

Hi everyone,

I have a question concerning the NRP proxy. I realized a local installation on four Ubuntu 16.04 machines in our lab (same network with fixed IP and I have sudo rights on them). So, I end up with four separate NRP that run a front-end and a back-end each. However, I’d like to access the four machines behind a single front-end (to make it easier for the user but also to parallelize the virtual coach runs).

Is there a piece of documentation somewhere that summarizes how to configure the proxy to do this? I can’t remember exactly but I tested it by myself a time ago but I had some trouble and think there were issues in forwarding some ports.

Thanks a lot! Gabriel


#2

Hi Gabriel,

The easiest way that I can think of is that you use the running_mode script in the user-scripts repo and go to mode 1. This mode is a configuration which uses your local frontend but the backend servers in lugano/geneva as backends. If you are on running mode 1 then the config.json in the nrpBackendProxy repo should be easy to hack to make it point to your own backends. So:

  1. cd $HBP/user-scripts
  2. ./running_mode 1
  3. cd $HBP/nrpBackendProxy
  4. edit the config.json as suitable

I hope this helps!


#3

After you’ve updated the proxy settings, if your proxy is running on a separate machine than your VirtualCoach you’ll need to add a line to the proxy settings for the VirtualCoach to be able to use your new setup, edit:

$HBP/VirtualCoach/hbp_nrp_virtual_coach/hbp_nrp_virtual_coach/config.json

and add an entry to the proxy section in the same format as the local entry e.g.

"<name>" : "http://<ip>:8000"

then when you launch the virtual coach tell it to use this new custom backend setup:

vc = VirtualCoach(environment='<name>')

and you should be good to go.


#4

Hey Gabriel,

Maybe this wiki page is relevant also.
https://bbpteam.epfl.ch/project/spaces/pages/viewpage.action?pageId=25198695