Chapter 2. Adding API Designer as a service to your OpenShift Cluster

2.1. Adding API Designer as a service to an OpenShift 4 project

For OpenShift 4.x, you need to verify that your OpenShift administrator has installed and subscribed to the API Designer operator in your project as described in the Fuse on OpenShift Guide.

Optionally, the OpenShift administrator might have also added the API Designer as a service to the project. If not, you must do that task.

Note

A previous name for API Designer, Apicurito, is still visible in the API Designer operator’s interface.

Prerequisite

Your OpenShift administrator has installed the API Designer operator and subscribed to it in your OpenShift project.

Procedure

  1. In your web browser, open the OpenShift console and log in with your credentials (for example, username developer and password developer).
  2. Select Topology.
  3. Select the project that includes the API Designer operator.
  4. Verify that you see an icon that is labeled apicurito-operator.

    API Designer operator

    If there is another icon for apicurito-service then your OpenShift administrator already added the API Designer as a service to the project.

    If there is not an icon for apicurito-service, continue to step 5.

  5. In the left navigation pane, click Add+.
  6. Select the From Catalog option.
  7. In the search field, type API to filter the catalog items.
  8. Click the Apicurito CRD card.
  9. Click Create.

    A default form with a minimal starting template for the API Designer instance opens. The size option refers to the number of pods for the API Designer. The default is three pods for the new resource types that contain logic specific to managing API Designer.

  10. Accept the default value or, optionally, edit it.
  11. Click Create to trigger the start up of the pods, services, and other components of the new API Designer instance.
  12. To verify that the API Designer service is added to the project, select Topology and then confirm that you see an icon for apicurito-service.

2.2. Adding API Designer as a service to an OpenShift 3 project

You can add API Designer as a service to your OpenShift 3 project from the OpenShift service catalog. You can access this instance at a URL external to the OpenShift environment.

Prerequisites

  • Obtain the hostname that will allow you to access API Designer by following the guidelines recommended by your OpenShift system administrator.
  • Verify that the Fuse on OpenShift images and templates, including apidesigner-ui and fuse-apidesigner-generator, are installed on your OpenShift cluster, by running the following command in a command window:

    oc get is -n openshift

    If the images and templates are not pre-installed, or if the provided versions are out of date, install (or update) the Fuse on OpenShift images and templates as described in the Fuse on OpenShift Guide.

Procedure

To add API Designer as a service to your OpenShift project:

  1. In a command window, log in to the OpenShift server:

    oc login -u developer -p developer
  2. Create a new project namespace. For example, the following command creates a new project named test:

    oc new-project test
  3. In your web browser, open the OpenShift console and log in with your credentials (for example, username developer and password developer).
  4. Click Catalog. In the Catalog search field, type API Designer and then select Red Hat Fuse API Designer.

    The Information step of the Red Hat Fuse API Designer wizard opens.

  5. Click Next.

    The Configuration step of the Red Hat Fuse API Designer wizard opens.

  6. In the Image Stream Namespace field, type openshift.
  7. In the ROUTE_HOSTNAME field, type the external hostname that allows you to access the API Designer instance, for example apidesigner-myproject.192.168.64.43.nip.io.
  8. Accept the default values for the rest of the settings in the Configuration step and click Create.

    The Results step of the template wizard opens.

  9. Click Close.
  10. In the OpenShift web console, in the My Projects pane, select the project, for example select test.

    The project’s Overview tab opens, showing the apidesigner-ui application.

  11. Click the arrow to the left of the apidesigner-ui deployment to expand and view the deployment details.
  12. Click the link for the API Designer instance, for example https://apidesigner-myproject.192.168.64.43.nip.io.

    API Designer opens in a new web browser window or tab.

Note

If you cannot open the API Designer instance, you might need to edit your computer’s /etc/hosts file to add the ROUTE_HOSTNAME by using the following syntax, where $OPENSHIFT_IP_ADDR is the IP address for the OpenShift server and apidesigner.my-minishift.apicurio.io is the ROUTE_HOSTNAME that you specified in step 7.

$OPENSHIFT_IP_ADDR apidesigner.my-minishift.apicurio.io