Several gadgets installation

Prev Next

Let's assume our LiveDesign server is hosted on livedesign.discngine.com and we have two Pipeline Pilot servers: pp.dev.discngine.com and pp.prod.discngine.com.
We want to have two gadgets on LiveDesign:

  • PP Connector, which will point to pp.prod.discngine.com and be defined on LiveDesign under /discngine/ldconn
  • PP Connector DEV, which will point to pp.dev.discngine.com and be defined on LiveDesign under /discngine/ldconn-dev

Nginx configuration

The nginx configuration located at /etc/nginx/endpoints.d/ldconn.conf should look like:

# Location for the first gadget (proxy calls to PP prod)
location /discngine/ldconn/ {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass https://pp.prod.discngine.com:9943/discngine/ldconn/;
        proxy_read_timeout 600;
}

# Location for the second gadget (proxy calls to PP dev)
location /discngine/ldconn-dev/ {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass https://pp.dev.discngine.com:9943/discngine/ldconn$path_remainder;
        proxy_read_timeout 600;
}

#Mutualisation of the session endpoint as it will be the same for both gadgets
location /discngine/ldconn/session/ {
    default_type text/plain;

    if ( $http_cookie ~ "JSESSIONID=(?<token>[^;]*)" ) {
        return 200 $1;
    }
    return 401;        
}

Admin panel

The declaration of the gadget in the admin panel should look like:

[
  // ... other gadgets
  {
    "categoryName": "Discngine",
    "gadgets": [
        {
            "name": "PP Connector",
            "location": "/discngine/ldconn/index.htm?pipelinePilotServerUrl=https://pp.prod.discngine.com:9943"
        },
        {
            "name": "PP Connector DEV",
            "location": "/discngine/ldconn-dev/index.htm?pipelinePilotServerUrl=https://pp.dev.discngine.com:9943"
        }
    ]
  }
]