API Gateway 10.15 | Administering API Gateway | Deployment | Deployment Configurations | Externalizing Configurations | Connecting webMethods API Gateway to API Control Plane | API Control Plane Agent Configuration using Properties
 
API Control Plane Agent Configuration using Properties
This section explains how to configure API Control Plane agent using properties based on how you deploy API Gateway.
How to configure API Control Plane Agent using properties in containerized environment?
If API Gateway is deployed as Docker container, the properties are provided when you start API Gateway using the docker run command.
A sample docker run command that is used to start API Gateway container is as follows:
docker run -e apigw_cp_agentConfig_enabled=true --env apigw_cp_agentConfig_runtimeConfig_runtimeName=props-demo......
In the sample docker run command, the apigw_cp_agentConfig_enabled property enables the API Control Plane agent configuration and apigw_cp_agentConfig_runtimeConfig_runtimeName property specifies the runtime name that you want to monitor in API Control Plane. Similarly you can provide the other API Control Plane agent configuration properties. For details about the available API Control Plane agent configuration properties, see API Control Plane Agent Properties.
A sample docker compose file that is used to start API Gateway and Elasticsearch is as follows:
version: "3.5"

services:

apigateway:
depends_on:
- elasticsearch
image: ${GATEWAY_IMAGE}
container_name: apigw01
environment:
- apigw_elasticsearch_hosts=elasticsearch:9200
- apigw_elasticsearch_http_username=
- apigw_elasticsearch_http_password=
- apigw_cp_agentConfig_enabled=true
- apigw_cp_agentConfig_controlPlaneConfig_retry_maxAttempts=60
- apigw_cp_agentConfig_controlPlaneConfig_retry_retryTimeIntervalInSeconds=60
- apigw_cp_agentConfig_runtimeConfig_runtimeName=API_Gateway_CHN
- apigw_cp_agentConfig_runtimeConfig_description=My test description apigw_cp_agentConfig_runtimeConfig_tags= test,local,dev
- apigw_cp_agentConfig_runtimeConfig_location=Chennai
- apigw_cp_agentConfig__runtimeConfig_region=Chennai
- apigw_cp_agentConfig_controlPlaneConfig_controlPlaneURL=<valid API Control Plane URL>
- apigw_cp_agentConfig_controlPlaneConfig_username=<put username here>
- apigw_cp_agentConfig_controlPlaneConfig_password=<put password here>
ports:
- 5555:5555
- 9072:9072
networks:
- cp-gateway

elasticsearch:
...............
..............
...............
Note:
If API Gateway is deployed using Kubernetes, the API Control Plane agent properties are provided through a ConfigMap when you start API Gateway using the Helm command.
How to configure API Control Plane Agent using properties in non-containerized environment?
If API Gateway is deployed in non-containerized environment, the system properties can be added as a part of the custom_wrapper.conf at \profiles\IS_default\configuration\custom_wrapper.conf to configure API Control Plane agent.
wrapper.java.additional.306=-Dapigw_cp_agentConfig_enabled=true
wrapper.java.additional.307=-Dapigw_cp_agentConfig_runtimeConfig_runtimeName=demo-props
wrapper.java.additional.308=-Dapigw_cp_agentConfig_controlPlaneConfig_controlPlaneURL=<valid API Control Plane URL>
wrapper.java.additional.309=-Dapigw_cp_agentConfig_controlPlaneConfig_username=<username-here>
wrapper.java.additional.310=-Dapigw_cp_agentConfig_controlPlaneConfig_password=<password-here>
wrapper.java.additional.311=-Dapigw_cp_agentConfig_runtimeConfig_description="My test description"