Dismantling API Gateway

webMethods API Gateway guide

Author: Balakrishnan, Balaji Vaidyanathan, Praveen
Supported Versions: 10.1

Introduction

API Gateway bundles Kibana, dashboard and data visualization software and Elasticsearch, the primary datastore for APIs metadata, policies, events, metrics etc to get started with almost no configuration. But you might not want to have a Elasticsearch and a kibana instance for every API Gateway instance and you might want them to scale independently and there might be other cases when one would like to run them on independent nodes. In this tutorial let's see a couple of deployment scenarios.

Please note that the steps mentioned in this document is applicable only for API Gateway version 10.1. Also API Gateway 10.1 is compatible only with Elasticsearch 2.3.2. This restriction is however lifted in 10.2 and above versions where the API Gateway supports Elasticsearch versions less than 6.x

Default Deployment (API Gateway, Elasticserach, and Kibana in same node)

Custom Deployment 1 (Elasticsearch in separate node)

Hint

  1. gwhost is the machine where the Gateway is installed. Stop the Elasticsearch windows service or daemon service if it had been installed as so.
  2. eshost is the machine where the InternalDatastore is installed

Steps

  1. Open <Root>\IntegrationServer\instances\<Instance_Name>\packages\WmAPIGateway\config\resources\elasticsearch\config.properties and change the values of the following properties. Please check Elasticsearch Best Practices for more details on configuring external Elasticsearch.
    • pg.gateway.elasticsearch.hosts = <list of Elasticsearch nodes, sample eshost:9240>
    • pg.gateway.elasticsearch.autostart to false
  2. Open <Root>\profiles\IS_<Instance_Name>\apigateway\config\uiconfiguration.properties and change apigw.es.url = http://gwhost:9240 to apigw.es.url = http://eshost:9240
  3. Restart API Gateway

Custom Deployment 2 (Elasticsearch and Kibana in separate nodes)

Hint

  1. gwhost is the machine where the Gateway is installed. Stop the Elasticsearch windows service or daemon service if it had been installed as so.
  2. eshost is the machine where the InternalDatastore is installed.
  3. kihost is the machine where the Kibana is installed. To install kibana, just copy the <Root>\profiles\IS_<Instance_Name>\apigateway\dashboard folder into kihost. Use dashboard\bin\kibana.bat or kibana to start the kibana server.

Steps

  1. Follow the steps mentioned in the "Custom Deployment 1" above except the last "restart" step
  2. Open <Root>\profiles\IS_<Instance_Name>\apigateway\config\uiconfiguration.properties and set apigw.kibana.autostart to false
  3. Open <Root>\profiles\IS_<Instance_Name>\apigateway\config\uiconfiguration.properties and set apigw.es.url to http://eshost:9240
  4. Open <Root>\IntegrationServer\instances\<Instance_Name>\packages\WmAPIGateway\config\resources\beans\gateway-core.xml and change  <entry key="dashboardInstance" value="http://localhost:9405"/> to  <entry key="dashboardInstance" value="http://kihost:9405"/>
  5. Restart API Gateway

API Gateway Components Support Matrix

API Gateway
Elasticsearch
Kibana
Filebeat
Comments
9.12 2.3.2   NA Filebeat is not shipped with 9.12

10.0

2.3.2   NA Filebeat is not shipped with 10.0
10.1 2.3.2   NA Filebeat is not shipped with 10.1
10.2 < 5.6.4 5.6.7 NA

InternalDataStore is 5.6.4 but API Gateway can work with versions below 5.6.4

Filebeat is not shipped with 10.2

10.3 < 5.6.4 5.6.7 6.0.1 InternalDataStore is 5.6.4 but API Gateway can work with versions below 5.6.4