how to connect nginx, 3scale and opendaylight controller?

298 views Asked by At

I am using an Ubuntu machine with an Ubuntu guest OS. On the guest OS, I ran my OpenDaylight controller, making the topologies with Mininet and viewing them in the OpenDaylight GUI at localhost:8080. Next, I used Postman REST API Client extension on my Chrome Browser to make a GET request to my ODL Controller:

localhost:8080/restconf/operational/opendaylight-inventory:nodes/

I got the proper response to it in XML format. Now, I have to pass my request through NGINX proxy to 3Scale and get authentication using the app_id and app_key parameters. The request is then to be forwarded to the ODL controller so that I gan get the proper response.

I have already downloaded the proxy config files from NGINX. What modifications must be made in these files? What should be the request I enter in the Postman Client to get the same response as before?

1

There are 1 answers

1
Pili On

You should only need to change the location of the nginx_.lua file in nginx_.conf

If you want to change the port that Nginx listens on, you will also need to change the listen directive in the server block, to your desired port e.g

server {
  lua_code_cache off;
  listen 81;

Also, you will need to ensure that there is an upstream block for your backend, e.g

upstream backend_localhost {
  server localhost:8080 max_fails=5 fail_timeout=30;
}

but if you have entered this in the proxy configuration wizard that should already be there.

That should be all that you need to change/check.

The request in Postman should target Nginx instead of the ODL Controller, and pass in the application credentials e.g if Nginx is running on port 81

localhost:81/restconf/operational/opendaylight-inventory:nodes/?app_id=<YOUR_APP_ID>&app_key=<YOUR_APP_KEY>

Hopefully that should clear up any doubts. However, you can always email us at [email protected] if you have any further questions or add any comments here.