Red Hat OpenShift API Management
API management available as a service
OpenShift API Management: Set up your environment
Red Hat OpenShift API Management is an add-on supported on Red Hat OpenShift Dedicated and Red Hat OpenShift Service on AWS. As a new customer of Red Hat OpenShift API Management, the following instructions will guide you through the setup process.
Note: Even if you haven’t signed up for Red Hat OpenShift API Management, you will still be able to play with it by following the instructions provided on the getting started page. As a user, you will be able to set up your own API gateway, create and secure your APIs, and learn more about managing and sharing APIs.
Pro tip: Click on the screenshots to view them at full size.
Create an OpenShift Dedicated Cluster
To get started, sign in to Red Hat OpenShift Hybrid Cloud Console here.
The first step is to create a cluster. (Figure 1.)
- Select the OpenShift > Clusters menu in the left navigation pane.
- Select Create cluster. If you have an OpenShift Dedicated trial, select Create trial cluster.
Enter details to set up your OpenShift Dedicated cluster
Your next step is to enter details about your cluster.
- Choose your Subscription type (Figure 2). You can choose the Free trial if it is available.
- Choose Infrastructure type.
- Click Next to continue.
Select a cloud provider
Your next step is to select an infrastructure provider.
- When prompted to Select a cloud provider, choose AWS (Figure 3a).
- Fill in the values for the following AWS account details as shown in Figure 3b, using your own account details:
- AWS Account ID
- AWS access key ID
- AWS secret access key
- Click Next.
Enter cluster details
- Enter the following details for your cluster:
- Cluster name of your choice
- Version (4.10.4 at the time of writing)
- Region of your choice
- Availability (choose Single zone for this trial)
- Click the box next to Enable workload monitoring and leave the Encryption section as is, as shown in Figure 4.
Review and create the cluster
- Review the settings and click Create cluster (Figure 8a).
- Installation will take about 15 minutes.
- Once installation is complete, you will see the dashboard showing that the Cluster installed successfully (Figure 8b).
Add identity provider
As shown in Figure 10, set up the following:
- Enter a unique name (GitHub, in this case).
- An OAuth callback URL is automatically generated in the provided field.
- Make a note of this since you will use this to register the GitHub application in the next step.
- Choose claim as your Mapping method.
Register a new OAuth Application
Next you will need to create a new OAuth application
- Log in to GitHub (in a different window)
- Access your profile Settings.
- Choose Developer settings found at the bottom of the left hand menu
- Click on the button New OAuth App.
As shown in Figure 11a, create a new OAuth application:
- For Application name, type whatever name you’d like to assign to your app. This should match the name provided in Figure 4 (osd-rhoam, in this case).
- In "Homepage URL", type the full URL to your app's website (you can also choose https://console.redhat.com).
- Enter the Authorization Callback URL from the Hybrid Cloud Console as noted in Figure 10a.
- Click Register application.
On the next page:
- Generate a Client secret
- Copy the Client ID and Client secret. You’ll use these in the next step.
Complete creation of cluster identity provider
Return to the Hybrid Cloud Console.
- Enter the Client ID and Client secret provided by GitHub in the previous step.
- Enter an optional Hostname if you are using a hosted instance of GitHub Enterprise.
- Select Use organizations or Use teams if you want to restrict access to a particular GitHub organization or team, and enter the name of that organization or team.
- Click Add.
Add admin users
Administrator roles are managed using a dedicated-admins group on the cluster. You can add and remove users from Red Hat OpenShift Cluster Manager.
- Click the Access control tab (Figure 13a).
- Click Add User.
- In the Add cluster user popup (Figure 13b):
- Enter the User ID you want to add. This would be the GitHub user ID within the GitHub organization you added in the previous step.
- Choose the dedicated-admins group.
- Click Add user.
This completes the installation of OpenShift Dedicated.
Installing Red Hat OpenShift API Management
Once OpenShift Dedicated cluster is set up, you can add OpenShift API Management to the cluster.
- Click the Add-ons tab to view a list of available add-ons.
- Click the Red Hat OpenShift API Management card (Figure 14a).
- Click the Install button that appears on the popup card (Figure 14b).
Configuring Red Hat OpenShift API Management
Next, you need to provide the additional details necessary to configure OpenShift API Management.
- Accept the default value for CIDR range unless you have a VPC/VPN setup.
- Enter your email address for notification purposes.
- Select Evaluation or 100 Thousand Requests Per Day as the value for Quota.
- Check the box to acknowledge the Addon Resource Requirements.
- Click the Install button.
The initial installation will take about 30 to 45 minutes.
Configuring Red Hat OpenShift API Management
After installation is complete, OpenShift API Management should show up as Installed in the Clusters > Add-ons page (Figure 16a).
- Click the Open Console button to navigate to the OpenShift Web Console.
- You will be asked to log in to the OpenShift console using your Github identity provider. Authorize this access by clicking on the Authorize button at the bottom of the page (Figure 16b).
- You will be redirected to the OpenShift Dedicated dashboard page.
Launch OpenShift API Management
- From the OpenShift console, access API Management from the application switcher in the top menu bar. (Figure 17.)
- You can also access API Management SSO from the application switcher. You will need to use GitHub authentication for this as well.
Installation and set up of Red Hat OpenShift API Management is now complete. You can now create and secure your APIs!