Deployment options
This topic discusses the various deployment options that are supported by IBM PEM.
The deployment diagrams that are provided are high level and might not include all the components for the deployment.
API Gateway Deployment
API Gateway is a service through which REST API calls are made. The following figure depicts the
API Gateway:%20(1).jpg)
Perform the following before deployment:
- Expose the gateway through a new domain or sub domain.
- If Reverse Proxy or Load Balancer is configured, modify the rules to accommodate API Gateway.
For
example:
// Load Balancers <Proxy balancer://pem-cluster> // PEM cluster BalancerMember https://<PEM Hostname 1> loadfactor=1 ping=10 retry=10 route=pemapp1 BalancerMember https://<PEM Hostname 2> loadfactor=1 ping=10 retry=10 route=pemapp2 ProxySet lbmethod=bytraffic ProxySet stickysession=ROUTEID </Proxy> <Proxy balancer://pem-api-cluster> // API Gateway cluster BalancerMember https://<API Gateway Hostname 1> loadfactor=1 ping=10 retry=10 route=pemapi1 BalancerMember https://<API Gateway Hostname 2> loadfactor=1 ping=10 retry=10 route= pemapi2 ProxySet lbmethod=bytraffic </Proxy> // Routing configuration <Location /TestSponsor> // Direct UI requests to PEM servers ProxyPass balancer://pem-cluster/TestSponsor ProxyPassReverse balancer://pem-cluster/TestSponsor </Location> <Location /mrmws/sponsors/TestSponsor> // Direct all €˜mrmws€™ API requests to API Gateway servers ProxyPass balancer://pem-api-cluster/mrmws/sponsors/TestSponsor ProxyPassReverse balancer://pem-api-cluster/mrmws/sponsors/TestSponsor </Location> <Location /pemws/sponsors/TestSponsor > // Direct all €˜pemws€™ API requests to API Gateway servers ProxyPass balancer://pem-api-cluster/pemws/sponsors/TestSponsor ProxyPassReverse balancer://pem-api-cluster/pemws/sponsors/TestSponsor </Location> <LocationMatch "^\/mrmws\/sponsors\/TestSponsor\/user\/signin.*$" > // Direct Login API request to PEM servers ProxyPass balancer://pem-cluster ProxyPassReverse balancer://pem-cluster </LocationMatch> <Location /rest > // Direct all 'rest' context API requests to API Gateway servers ProxyPass balancer://pem-api-cluster/rest ProxyPassReverse balancer://pem-api-cluster/rest </Location> -
The single context method of calling APIs is only available if API Gateway container is started. To access single context APIs and read documentation available at https://10.15.103.131/rest/doc/<sponsor-context>/swagger-ui.html set the following rules:
<LocationMatch "^/rest/doc/([^/]+)/(.+)" > ProxyPass balancer://svtgateway_cluster/rest/$2 ProxyPassReverse balancer://svtgateway_cluster/rest/$2 </LocationMatch> <LocationMatch "^/rest/doc/([^/]+)/(swagger-resources.*)" > ProxyPass balancer://svtgateway_cluster/$2 ProxyPassReverse balancer://svtgateway_cluster/$2 </LocationMatch>