API Control Plane 11.0 | Getting Started with API Control Plane | Connecting webMethods API Gateway | Connecting containerized API Gateway deployment to API Control Plane using Properties
 
Connecting containerized API Gateway deployment to API Control Plane using Properties
This use case outlines the procedure to connect API Gateway with API Control Plane using properties.
To establish the connection, configure API Control Plane agent within API Gateway through a set of properties. For more details, see Connecting webMethods API Gateway to API Control Plane section in webMethods API Gateway Administration guide.
Note:
API Control Plane is compatible with API Gateway version 10.15 Fix 10 (10.15.0.10) and above.
Ensure that you have performed the pre-requisites mentioned in the Deploy API Control Plane section.
*To connect API Gateway with API Control Plane
1. Configure API Control Plane agent with a set of properties.
Go to webmethods-api-control-plane\deployment\agent\webmethods-api-gateway using the following command:
cd webmethods-api-control-plane\deployment\agent\webmethods-api-gateway
.env file and docker-compose.yml file contains properties related to:
*API Gateway deployment configurations lets you specify the metadata of API Gateway that you want to administer from the API Control Plane such as the API Gateway name, and so on.
*API Control Plane configurations let you specify API Control Plane details to which API Gateway must establish the connectivity.
You can use the configurations as is or update based on your requirements.
Important properties to configure in the .env file:
Property
Description
GATEWAY_IMAGE
Specify API Gateway docker image within double quotes.
Example:
GATEWAY_IMAGE= "sagcr.azurecr.io/apigateway:10.15.0.11"
By default, API Gateway image is specified.
RUNTIME_NAME
Specify the name of your API Gateway instance.
CP_USERNAME
CP_PASSWORD
Specify the username and password of API Control Plane instance to which API Gateway must establish connectivity.
You can also specify the API Control Plane user password against the JAVA_OPTS property in the .env file if you are connecting with API Control Plane for the first time. The password can be removed later as it is saved in API Gateway passman and used for further restarts.
Example:
JAVA_OPTS='-Dapigw_cp_agentConfig_controlPlaneConfig_password=<password>'
For details about the properties in the docker-compose.yml file, Connecting webMethods API Gateway to API Control Plane section in webMethods API Gateway Administration guide. You can update the value of the properties based on your requirements.
2. Run API Gateway docker deployment scripts.
To deploy API Gateway with the sample configurations specified in the GIT Hub repository:
a. Go to webmethods-api-control-plane\deployment\agent\webmethods-api-gateway using the following command:
cd webmethods-api-control-plane\deployment\agent\webmethods-api-gateway
b. Update the location of API Gateway license under volumes section in the docker-compose file:

./apigateway_license_file_location:/opt/softwareag/IntegrationServer/instances/instance_name/config/licenseKey.xml:ro \
where:
apigateway_license_file_location is the location where you have stored your API Gateway license on your system.
<instance_name> is the name of your API Gateway instance.
c. Run the following command:
docker-compose up -d
The output must be as follows:
api-gw-up
See troubleshooting tips if you face any issue.
3. Access API Gateway.
*Access API Gateway using http://localhost:9072
*Login with the following credentials: Username: Administrator, Password: <default_password>
API Gateway home page appears.
4. Access API Control Plane with the url,
*https://localhost:8080 if API Control Plane is deployed using Docker.
*https://my-control-plane/ if API Control Plane is deployed using Helm.
If API Gateway is successfully connected with API Control Plane, the name and status of API Gateway gets auto populated on the dashboard and Runtimes screen in API Control Plane.
Note:
If API Gateway and API Control Plane is deployed in the same host machine, ensure to update the CP_URL as http://172.17.0.1:81 in the agent > .env file and access API Control Plane using https://localhost:8080
API Control Plane dashboard appears as follows:
apicp-apigw
The runtimes screen in API Control Plane appears as follows:
apigw-apicp-runtimes
Any transactions that you perform in your API Gateway instance get synchronized with API Control Plane, enabling you to monitor the metrics in API Control Plane. The interval in which API Gateway must send the metrics to API Control Plane is defined in the agent configuration, docker-compose.yml file. You can update the configurations based on your requirements.
Troubleshooting Tips:
1. If API Gateway is not listed in API Control Plane application after connecting, wait for a few minutes and refresh the API Control Plane application. If it is still not listed, check if API Gateway container is up and running.
2. Run the following command to check if the containers are up and running:
docker ps
3. If you see the following error message, the container name <abc> is already in use by container <id>, run the following commands to stop and remove the container:
docker stop <container_id>
docker rm <container_id>