1

Does the Micro Gateway and API manager always have to be installed on the same servers?

Does the Micro Gateway setup require WSO2 Identity Server and WSO2 Enterprise Integrator for Hybrid API?

We have an architecture that would be working with 3 servers (1) Cloud for API Manager and Developer Portal providing Authentication and Analytics and store for (2) Production Environment (3) Sandbox Environment Does the API manager needs to be installed in all the servers to set API Gateway and API Micro Gateway?

Ray
  • 31
  • 3
  • Micro Gateway(MGW) and API Manager(APIM) does not needs to be in the same server. MGW communicates using http, jms and etc when it connects with APIM. And MGW is an independent gateway. It does not necessarily require APIM. MGW require a Key manager component like WSO2 Identity to issue the tokens in order to access the APIs exposed via MGW. Based on your small description I assume you can have APIM in cloud and either API gateway profile or MGW in production and sandbox environments. We need to decide what are the requirements in order for got to either MGW or APIM Gateway in on premise. – Rajith Roshan Jan 02 '20 at 04:20

1 Answers1

1

So here are the task that I have tried to set the WSO2 API manager and the Micro Gateway services in my local system , so here is a sample configuration

OS: Ubuntu server 18 LTS
WSO2 API Manager - Local Server IP: 192.168.1.50
WSO2 MicroGateway service (Sandbox) - Local Server IP: 192.168.1.51
WSO2 MicroGateway service (Production) - Local Server IP: 192.168.1.52

API Manager:

MicroGateway:

  • Create a mock hello world API using PHP to access the backend and datastore services.
  • Created a sample OpenAPI 3.0 yaml file to forward the request to the backend php services.
  • Installed all prerequisites
  • I had document to install the Microgateway services in docker, but I decided to try the MGW services installation directly within the server without docker
  • Created a API using micro-gw init and placed the yaml file within api-definitions
  • created the build successfully
  • Ran the build using gateway which was accessible using Postman.
  • Tried to change the hostname of microgateway service to listen IP instead of localhost but gets overrides to localhost:9090 however the service can be accessible using IP so no further changes made.

Configuration of API Manager and MGW

  • Uploaded the same YAML to API manager using publisher to configure the API manager and microgateway services.
  • Used API managers key certificates to set the microgateway (which failed)
  • create the end points to point to Production and Sandbox micro gateways using the IP address and the port number http://192.168.1.51:9090 and http://192.168.1.52:9090
  • Accessed the developer portal, created a token key.
  • However, the token failed to help access the microgateway service. Even I tried using the URL provided by the API manager http://192.168.1.50/sample/context/1/test but still inaccessible.