This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Deploying the Microgateway
This section walks you through the following Microgateway deployment scenarios:
- A single node Microgateway deployment.
- A high availability deployment scenario where you have two Microgateway instances fronted by a load balancer.
If you want to run the Microgateway on Docker, see Deploying the Microgateway as a Docker Container.
The following topics provide step-by-step instructions to get started with your Microgateway deployment:
Prerequisites
To download and run the Microgateway:
Ensure that you have the Java SE Development Kit (JDK) installed. You can install either OpenJDK 8 or Oracle JDK 1.8.*.
Important!
WSO2 recommends installing JDK 8u161 or later.
Be sure that you meet the following system requirements:
Physical - 3 GHz Dual-core Xeon/Opteron (or latest)
- 4 GB RAM (2 GB for JVM and 2 GB for the operating system)
- 10 GB free disk space
- ~ Recommended minimum - 2 Cores.
For high concurrencies and better performance you can use 4 Cores.
Disk space is based on the expected storage requirement calculated by considering file uploads and backup policies.
Virtual Machine (VM) - 2 compute units minimum (each unit having 1.0-1.2 GHz Opteron/Xeon processor)
- 4 GB RAM
- 10 GB free disk space
- One CPU unit for the operating system and one for JVM.
~ 512 MB heap size. This is generally sufficient to process typical SOAP messages but the requirements vary with larger message sizes and the number of messages processed concurrently.
EC2 - One c5.large instance to run one Microgateway instance.
Download a Microgateway instance
Sign in to WSO2 API Cloud (https://api.cloud.wso2.com) as an admin user.
On the API Publisher, click Microgateways.
- Click DOWNLOAD MICROGATEWAY to start the download.
Once the Microgateway download completes, you can configure the Microgateway deployment depending on your use case.
Configure the Microgateway deployment
Test the deployment
Follow the steps below to test your Microgateway deployment:
- Sign in to WSO2 API Cloud and create an API.
- Subscribe to and invoke the API.
Invoke the API using curl .
The curl command to invoke the GET method of the API should be similar to the following:
curl -k -X GET --header 'Accept: text/xml' --header 'Authorization: Bearer dXNlckBvcmcuY29tQHRlc3RPcmcxMjM6UGFzc3dvcmQ=’ 'https://gateway.api.cloud.wso2.com:443/t/ccc2222/phoneverify/1.0.0/CheckPhoneNumber?PhoneNumber=18006785432&LicenseKey=0'
Replace
https://gateway.api.cloud.wso2.com:443
in the above curl command with your Microgateway URL as indicated below, and then run it. The response to this curl should be identical to that received in the previous step.
curl -k -X GET --header 'Accept: text/xml' --header 'Authorization: Bearer dXNlckBvcmcuY29tQHRlc3RPcmcxMjM6UGFzc3dvcmQ=’ 'https://on-premise-gateway-ip:8243/t/ccc2222/phoneverify/1.0.0/CheckPhoneNumber?PhoneNumber=18006785432&LicenseKey=0'
Note that you can also use the HTTP port for API invocations. The HTTP port number would be 8280 by default. An example is given below.
curl -X GET --header 'Accept: text/xml' --header 'Authorization: Bearer dXNlckBvcmcuY29tQHRlc3RPcmcxMjM6UGFzc3dvcmQ=’ 'http://on-premise-gateway-ip:8280/t/ccc2222/phoneverify/1.0.0/CheckPhoneNumber?PhoneNumber=18006785432&LicenseKey=0'
If your request is successful, your response will be similar to the following.
<?xml version="1.0" encoding="utf-8"?> <PhoneReturn xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ws.cdyne.com/PhoneVerify/query"> <Company>Toll Free</Company> <Valid>true</Valid> <Use>Assigned to a code holder for normal use.</Use> <State>TF</State> <RC /> <OCN /> <OriginalNumber>18006785432</OriginalNumber> <CleanNumber>8006785432</CleanNumber> <SwitchName /> <SwitchType /> <Country>United States</Country> <CLLI /> <PrefixType>Landline</PrefixType> <LATA /> <sms>Landline</sms> <Email /> <AssignDate>Unknown</AssignDate> <TelecomCity /> <TelecomCounty /> <TelecomState>TF</TelecomState> <TelecomZip /> <TimeZone /> <Lat /> <Long /> <Wireless>false</Wireless> <LRN /> </PhoneReturn>