API Gateway 11.1 | Administering API Gateway | Container-based Provisioning | Docker Configuration | Running API Gateway Docker Containers with Docker Compose | Running Clustered API Gateway and External Elasticsearch Containers and a Kibana Container
 
Running Clustered API Gateway and External Elasticsearch Containers and a Kibana Container
In this deployment scenario you can use the sample Docker Compose file apigw-elasticsearch-cluster-kibana.yml.
The figure depicts clustered API Gateway containers.
API Gateway containers
*To run clustered API Gateway and external Elasticsearch containers, and a external Kibana container
1. Set the environment variables to define the API Gateway and the external Kibana image as follows:
export APIGW_DOCKER_IMAGE_NAME=image name or filepath location of an existing image
export KIBANA_DOCKER_IMAGE_NAME=kibana image name
You can create the required API Gateway Docker image through API Gateway scripting. For details on creating a Docker image, see Building the Docker Image for an API Gateway Instance .
Specify the API Gateway image by changing the .env file. API Gateway uses the .env file when the working directory is .../samples/docker-compose, else you must specify the environment variables. .
API Gateway requires a customized external Kibana image. The Docker file for creating the external Kibana image is as follows:
FROM centos:7
COPY /opt/softwareag/profiles/IS_default/apigateway/dashboard /opt/softwareag/kibana
EXPOSE 9405
RUN chmod 777 /opt/softwareag/kibana/bin/kibana
CMD /opt/softwareag/kibana/bin/kibana
2. Run the following command to start the API Gateway Docker container and the external Elasticsearch container using the Docker Compose sample file:
cd SAG-Root/IntegrationServer/instances/default/packages/WmAPIGateway/resources/
samples/docker-compose
docker-compose -f apigw-elasticsearch-cluster-kibana.yml up
In the Docker Compose sample file apigw-elasticsearch-cluster-kibana.yml ensure that you have specified the required information such as image name, name and port of the external Elasticsearch host, server port, UI port, and external Kibana dashboard instance details. This creates and starts the containers. Run the docker ps command to view the details of the containers created.
To run it in the detached mode, append -d in the docker-compose command.
Note:
You can stop the API Gateway Docker container and the external Elasticsearch container using the docker-compose sample file with the following command:
docker-compose -f apigw-elasticsearch-cluster-kibana.yml down