The topics in this section walk you through the steps to quickly configure and test a single node On-Prem Gateway deployment as well as a high availability deployment scenario where you have two On-Prem Gateway instances fronted by a load balancer.
If you want to run the On-Prem Gateway on Docker, see Deploying the On-Prem Gateway as a Docker Container.
Prerequisites
- Ensure that you have the Java SE Development Kit (JDK) installed. You can install either OpenJDK 8 or Oracle JDK 1.8.*.
Be sure that you meet the following system requirements before you download and deploy an On-Prem Gateway:
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 On-Prem Gateway instance.
Download an On-Prem Gateway instance
Log in to WSO2 API Cloud (https://api.cloud.wso2.com) as an Admin User
In the API Publisher, click On-Prem Gateways.
- Click Download On-Prem Gateway to start the download.
- You will receive a notification as shown below, when the download begins.
Now you have downloaded a single instance of the On-Prem Gateway. Next you can configure the On-Prem Gateway deployment depending on your use case.
Configure the On-Prem Gateway deployment
Test the deployment
Follow the steps below to test your On-Prem Gateway deployment:
- Log 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 On-Prem Gateway URL as indicated below, and 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>