APIGEE Edge: Environment

Hi,

 In APIGEE Edge, same API proxy can be deployed to different environments. How the env specific target endpoints can be configured !? (In the Target Endpoint how the backend APIs can be configured for Test and PROD envs)

 

Thanks,

Naveen Kumar T S

0 1 126
1 REPLY 1

@naveents1989 

Firstly, its not a recommended practice to define multiple environment specific target endpoints.

There are two ways you can achieve routing to a environment specific backend:

1. Using target servers

You should define a single target endpoint and make use of the "TargetServer" definition in the target endpoint. Targetserver in Apigee is an environment specific configuration entity. Apigee runtime will map the appropriate environment specific backend target host based on which environment virtual host received the API call.

Pls watch these videos that provide details on how to define target servers and use them in the target endpoint.

Apigee Edge - 4MV4D - Named Target Servers - Routing based on Environment - S14E03

https://www.youtube.com/watch?v=crnuHAgj9Vo 

2. Scripting in the Deployment Pipeline

You can use environment specific configuration/properties defined as part of your devops process. You can then replace the <Url> element value by reading the backend url from the properties file and modifying the targetendpoint xml file - using scripts in your deployment pipeline.

The first approach is cleaner and easier to implement. While the second one requires you to customize your deployment pipelines, so more scripting.