WSO2 Micro Gateway Installation and architecture - wso2

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?

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:
Installed all prerequisites
Install directly in the server
Changed the hostname to IP address in deployment.toml since I tried changing in carbon.xml and api-manager.xml but it get override
All the services were successfully active
Carbon Admin - http://192.168.1.50:9443/carbon, Admin Module - http://192.168.1.50:9443/admin, Developer Portal - http://192.168.1.50:9444/devportal, Publisher - http://192.168.1.50:9443/publisher
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.

Related

How to publishing API created in WSO2 to WSO2 API Manager on Remote server

How do I upload the API I created in WSO2 Integration Studio installed on my own computer to the WSO2 API Manager on the remote server.
From the Add new server menu, I clicked the WSO2 Remote Server option under WSO2 and entered the host and server URL information, but it did not publish. When I examined WSO2's own documents, I could not find detailed resources about connecting to a remote server and publishing.
Can you help with this?
Can you add your integration studio version and WSO2 Api Manager version?
You can try this documentation https://apim.docs.wso2.com/en/latest/integrate/develop/working-with-service-catalog/
You can register the service in the service catelog as below.
Start the WSO2 Micro Integrator pointing to API Manager.
You should have the carbon app of that particular service in the Micro Integrator.
When Micro Integrator starts it registers the available services in the API Manager.
From logging into the APIM publisher you can create an API.
Instructions are available here - https://apim.docs.wso2.com/en/latest/integrate/develop/working-with-service-catalog/

How to connect a server that run wso2 API manager to show statics on a server that run wso2 analytics

How to connect a server that run wso2 API manager to show statics on a server that run wso2 analytics that actually exist on differnt servers with different IP.
I am using version 3.2.0
You can follow the documentation and configure analytics for APIM 3.2.0.
In the configurations, instead of using localhost, use the IP address of the analytics server.
https://apim.docs.wso2.com/en/3.2.0/learn/analytics/configuring-apim-analytics/#configuring-apim-analytics

WSO2 API Manager - Exposing services to third parties

We have architecture pattern (Layered DMZ) where:
1. External facing applications are deployed in 3 layered DMZ (DMZ1 for Web Server, DMZ2 for App Server and DMZ3 for Database server)
2. We do not allow DMZ1 directly talking to LAN, however DMZ2, DMZ3 can talk to LAN
WSO2 API Manager will be installed in LAN, the issue is how do we expose services from LAN API store to external world. Which design pattern is best suited for this? I have couple of options
Option 1:
Deploy another instance of API Manager in DMZ1 which 3rd party can access
Deploy set of services in DMZ1 API Manager only for 3rd party access
Have reverse proxy in DMZ2 which talks to LAN server
Option2:
Single instance of API Manager deployed in LAN
Reverse proxy in DMZ1
Forward proxy in DMZ2 (which currently we do not have)
Forward proxy talks to LAN
I remember IBM has virtual/physical Datapower appliance which acts as ab external API gateway, how do we achieve similar design pattern with WSO2?
Many thanks in advance
WSO2 API Manager will be installed in LAN, the issue is how do we expose services from LAN API store to external world
WSO2 API Manager has a component API Gateway. Actually todays there are two ways to do that
Use API Gateway
API Gatway is an instance of API Manager with parameters specifying, that the instance is a gateway, so other modules (key manager, store, publisher) are disabled or not used
We use API Gateway in DMZ. This instace will authenticate and authorize the calling clients. However, the gateway still needs to call KeyManager web services for token validation and the publisher needs to call gateway for API deployment
(KeyManager and publisher are the services in the APIM in LAN)
Using API Micro Gateway
Needs to be deployed as individual modules and are able to validate client's tokens (jwt tokens) even without any connection to the LAN instance
Note: When not using static api keys, but OAuth authentication, then you need to expose a route to the token and revoke service
Resources:
https://docs.wso2.com/m/mobile.action#page/97564467
https://apim.docs.wso2.com/en/latest/Learn/APIGateway/overview-of-the-api-gateway/
https://wso2.com/api-management/api-microgateway/
There are several common deployment patterns recommended by WSO2 for API Manager which can be found below.
https://docs.wso2.com/display/AM260/Deployment+Patterns#DeploymentPatterns-WSO2APIManagerdeploymentpatterns
You can go for pattern #4 or #5. Pattern #5 will keep your total cost down in terms of license fee and infrastructure fee.

WSO2 Store : Swagger UI / API Test is using wrong IP

I am setting up a WSO2 docker. I am using the WSO2 Dockerfiles from github (https://github.com/wso2/docker-apim) an the latest WSO2 Api Manager version (2.10). The Installation has succeeded, so I started the docker container. WSO2 starts up and I was able to deploy a Swagger URL based API.
I am also able to access the API through the store interface. And here starts my trouble: When I am trying to test the API through the integrated Swagger UI, the API manager is making use of the internal docker IP:
I have set up this port configuration:
How can I force WSO2 Api Manager to use the Docker public IP?
Many thanks :-)
In the repository/conf/api-manager.xml you can find following element
APIGateway/Environments/Environment/GatewayEndpoint
If you have multiple gateways, you may want to create an HTTP(S) load balancer.

I can't configure WSO2 API Manager at EC2 instance of AWS

I can't configure WSO2 API Manager at EC2 instance of AWS . I install jdk & Set JAVA_HOME at the particular EC2 instance .Then I using sh command to stated the service , service is stated. But I can't display any response at browser when I hit
https://IP:9443
I already successful configure WSO2 API Manager at my local machine.
version of WSO2 API Manager is 1.9.1