Different Target Endpoints for each deployment environment

I am setting up proxies and our target endpoints will be different for Dev, QA and production environments.

I am confuse as to where I would configure a different target endpoint each deployment environment, so when we want to deploy to QA and production.

For example:

Dev - dev.mydomain.com/api

Test - qa.mydomain.com/api

Prod – mydomain.com/api

I would expect when I deploy to Dev all my target endpoints would go to dev.mydomain.com/api

I see I can configure target endpoints in the proxy definition, but do not understand how to redirect based on environment.

I can see that I can set target servers in Environments, but again do not see how to configure a single proxy definition to point to appropriate target based on environment it is running in.

0 4 1,627
4 REPLIES 4

Hi @Brian Murphy

I will recommend to create a Target server with the same name in all 3 environments (dev, test & prod)

. For e.g. if the target server name is backend-target-server, configure it in target endpoint as following. Also if your target server is an https endpoint then create it using the management API. Refer this link

This makes your api proxy independent of different endpoints for different environments.

<TargetEndpoint name="default">
  <HTTPTargetConnection>
    <LoadBalancer>
      <Server name="backend-target-server" />
    </LoadBalancer>
    <Path>/api</Path>
  </HTTPTargetConnection>
</TargetEndpoint>

I tried this and now the Proxy comes back with a 503 error. When I trace it I see the properties for targetEndpoint, targetBasePath have values, but the targetURL is -NA-

What did I miss? I configured it exactly as about twice and redeployed.

@Brian Murphy Can you post a screenshot of your trace and target flow xml over here, also 503 seems the service might not be reachable from your edge env. Did you verify that ?

Target configuration - Also response was a 502 not a 503 sorry

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TargetEndpoint name="default">
<HTTPTargetConnection>
<LoadBalancer>
<Server name="SnapLogic"/>
</LoadBalancer>
<Path>/api/1/rest/slsched/feed/AramarkDev/DataManagement</Path>
</HTTPTargetConnection>
</TargetEndpoint>

Thank you