Self-Managed API Gateway On OpenShift
Last updated
Last updated
From main dashboard, select Account Settings from dropdown list menu.
Select Personal -> Tokens menu from left panel, then click Add Access Token link.
Enter following details, then click Create Access token button.
Name: Local Gateway
Scopes: Select Account Management API
Permission: Read Only
Copy the token to somewhere you can recall later. Then click I have copied the token button.
A new access token should be created.
Login to OpenShift web console, and switch to Administrator perspective. Select Home -> Projects menu from left panel, then click Create Project button.
Enter following details, then click Create button.
Name: api-gateway
Display name: API Gateway
The project should be created. Then Select Workloads -> Secrets menu from left panel.
Make sure the current project is api-gateway you've just created. Then click on Create button.
Enter following details, then click Create button.
Secret name: apicast-secret
Key: AdminPortalURL
Value: Enter 3scale admin portal URL in this format: https://<ACCESS_TOKEN>@3scale-admin.apps.<DOMAIN>
where the ACCESS_TOKEN
is the access token you've created in 3scale. And DOMAIN
is the OpenShift cluster domain (You can use oc whoami --show-console|awk -F'apps.' '{print $2}'
command to get the domain value. Or just copy from the URL in web browser.)
The secret should be created.
Select Operators -> OperatorHub menu from left panel.
Enter gateway
in search box then select Red Hat Integration - 3scale APIcast gateway...
A panel will be show on the right side, click Install button.
Select follwing options, then click Install button.
Update channel: threescale-2.12
Installation mode: A specific namespace on the cluster
Installed Namespace: api-gateway
Wait until the operator get installed successfully. Then click View Operator button.
Click Create instance link to create APIcast (API Gateway) instance.
Switch to YAML view then replace the existing code snippet with the snippet below. DO NOT forget to replace CLUSTER_DOMAIN
with the OpenShift cluster domain (just copy from the URL in web browser.) Then click Create button.
A new instance of APIcast should be created. Select Networking -> Routes to see the API Gateway route.
A new route should be created as per the .exposedHost.host
value in the YAML configuration above. Copy the route URL clipboard or somewhere you can recall becasue you'll need this to configure 3scale.
Switch to 3scale admin web console, click Human Resource Services link in the Products panel from the main dashboard.
Select Integration -> Settings menu from left panel. Then replace the Production Public Base URL with the APIcast (API Gateway) route URL.
Scroll down to bottom of the page then click Update Product button.
Select Integaration -> Configuration menu from left panel. Then click Promote v.n to Staging APIcast button. And then click Promote v.n to Production APIcast button as well.
The Production APIcast URL should be changed to the new APIcast URL now.
Change API Gateway URL in Postman to the new URL.
using collection.