Chapter 2. Getting Started for Administrators


If you are an OpenShift administrator, you can prepare an OpenShift cluster for Fuse on OpenShift deployments by:

  1. Configuring authentication to the Red Hat Container Registry.
  2. Installing the Fuse on OpenShift images and templates.

2.1. Configuring Red Hat Container Registry Authentication

You must configure authentication to Red Hat container registry before you can import and use the Red Hat Fuse on OpenShift image streams and templates.

Procedure

  1. Log in to the OpenShift Server as an administrator:

    oc login -u system:admin
  2. Log in to the OpenShift project where you want to install the image streams. We recommend that you use the openshift project for the Fuse on OpenShift image streams.

    oc project openshift
  3. Create a docker-registry secret using either your Red Hat Customer Portal account or your Red Hat Developer Program account credentials. Replace <pull_secret_name> with the name of the secret that you wish to create.

    oc create secret docker-registry <pull_secret_name> \
      --docker-server=registry.redhat.io \
      --docker-username=CUSTOMER_PORTAL_USERNAME \
      --docker-password=CUSTOMER_PORTAL_PASSWORD \
      --docker-email=EMAIL_ADDRESS
    Note

    You need to create a docker-registry secret in every new namespace where the image streams reside and in every namespace that uses registry.redhat.io.

  4. To use the secret for pulling images for pods, add the secret to your service account. The name of the service account must match the name of the service account pod uses. Following example uses default which is the default service account.

    oc secrets link default <pull_secret_name> --for=pull
  5. To use the secret for pushing and pulling build images, the secret must be mountable inside of a pod. To mount the secret, use following command:

    oc secrets link builder <pull_secret_name>

If you do not want to use your Red Hat account username and password to create the secret, you should create an authentication token by using a registry service account.

For more information see:

2.2. Installing Fuse Imagestreams and Templates on the OpenShift 4.x Server

Openshift Container Platform 4.1 uses the Samples Operator, which operates in the OpenShift namespace, installs and updates the Red Hat Enterprise Linux (RHEL)-based OpenShift Container Platform imagestreams and templates. To install the Fuse on OpenShift imagestreams and templates:

  • Reconfigure the Samples Operator
  • Add Fuse imagestreams and templates to Skipped Imagestreams and Skipped Templates fields.

    • Skipped Imagestreams: Imagestreams that are in the Samples Operator’s inventory, but that the cluster administrator wants the Operator to ignore or not manage.
    • Skipped Templates: Templates that are in the Samples Operator’s inventory, but that the cluster administrator wants the Operator to ignore or not manage.

Prerequisites

Procedure

  1. Start the OpenShift 4 Server.
  2. Log in to the OpenShift Server as an administrator.

    oc login -u system:admin
  3. Verify that you are using the project for which you created a docker-registry secret.

    oc project openshift
  4. View the current configuration of Samples operator.

    oc get configs.samples.operator.openshift.io -n openshift-cluster-samples-operator -o yaml
  5. Configure Samples operator to ignore the fuse templates and image streams that are added.

    oc edit configs.samples.operator.openshift.io -n openshift-cluster-samples-operator
  6. Add the Fuse imagestreams and templates to Skipped Imagestreams and Skipped Templates section respectively.

    [...]
    spec:
      architectures:
      - x86_64
      managementState: Managed
      skippedImagestreams:
      - fis-java-openshift
      - fis-karaf-openshift
      - fuse7-console
      - fuse7-eap-openshift
      - fuse7-java-openshift
      - fuse7-karaf-openshift
      - jboss-fuse70-console
      - jboss-fuse70-eap-openshift
      - jboss-fuse70-java-openshift
      - jboss-fuse70-karaf-openshift
      - fuse-apicurito-generator
      - apicurito-ui
      skippedTemplates:
      - s2i-fuse74-eap-camel-amq
      - s2i-fuse74-eap-camel-cdi
      - s2i-fuse74-eap-camel-cxf-jaxrs
      - s2i-fuse74-eap-camel-cxf-jaxws
      - s2i-fuse74-eap-camel-jpa
      - s2i-fuse74-karaf-camel-amq
      - s2i-fuse74-karaf-camel-log
      - s2i-fuse74-karaf-camel-rest-sql
      - s2i-fuse74-karaf-cxf-rest
      - s2i-fuse74-spring-boot-camel
      - s2i-fuse74-spring-boot-camel-amq
      - s2i-fuse74-spring-boot-camel-config
      - s2i-fuse74-spring-boot-camel-drools
      - s2i-fuse74-spring-boot-camel-infinispan
      - s2i-fuse74-spring-boot-camel-rest-sql
      - s2i-fuse74-spring-boot-camel-xa
      - s2i-fuse74-spring-boot-camel-xml
      - s2i-fuse74-spring-boot-cxf-jaxrs
  7. Install Fuse on OpenShift image streams.

    BASEURL=https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003
    
    oc create -n openshift -f ${BASEURL}/fis-image-streams.json
  8. Install the quickstart templates:

    for template in eap-camel-amq-template.json \
     eap-camel-cdi-template.json \
     eap-camel-cxf-jaxrs-template.json \
     eap-camel-cxf-jaxws-template.json \
     eap-camel-jpa-template.json \
     karaf-camel-amq-template.json \
     karaf-camel-log-template.json \
     karaf-camel-rest-sql-template.json \
     karaf-cxf-rest-template.json \
     spring-boot-camel-amq-template.json \
     spring-boot-camel-config-template.json \
     spring-boot-camel-drools-template.json \
     spring-boot-camel-infinispan-template.json \
     spring-boot-camel-rest-sql-template.json \
     spring-boot-camel-template.json \
     spring-boot-camel-xa-template.json \
     spring-boot-camel-xml-template.json \
     spring-boot-cxf-jaxrs-template.json \
     spring-boot-cxf-jaxws-template.json ;
     do
     oc create -n openshift -f \
     https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/quickstarts/${template}
     done
  9. Install the templates for the Fuse Console.

    oc create -n openshift -f https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/fis-console-cluster-template.json
    oc create -n openshift -f https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/fis-console-namespace-template.json
    Note

    For information on deploying the Fuse Console, see Set up Fuse Console on OpenShift.

  10. (Optional) View the installed Fuse on OpenShift images and templates:

    oc get template -n openshift

2.3. Installing Apicurito Operator on the OpenShift 4.x Server

Red Hat Fuse on OpenShift provides Apicurito, a web-based API designer, that you can use to design REST APIs. The new Apicurito Operator simplifies the installing and upgrading on Openshift Container Platform 4.1. For Fuse 7.4, the Apicurito Operator is available in the OperatorHub. Follow the steps below to install the operator.

Prerequisites

  • You have access to OpenShift Server.
  • You have configured authentication to the Red Hat Container Registry.

Procedure

  1. Start the OpenShift 4.x Server.
  2. Navigate to the OpenShift console in your browser. Log in to the console with your credentials.
  3. Click Catalog and then Click OperatorHub.
  4. Enter Apicurito in the search field window and press Enter key. You can see the Apicurito Operator in the right hand side panel.
  5. Click Apicurito Operator. The Apicurito Operator install window is displayed.
  6. Click Install. The Create Operator Subscription form is displayed. The form has options for:

    • Installation mode
    • Update Channel
    • Approval Strategy.

      Select as per you preferences or you can keep the default values.

  7. Click Subscribe. The Apicurito Operator is now installed in the selected namespace.
  8. To verify, click Catalog and then click Installed Operator. You can see the Apicurito Operator in the list.
  9. Click Apicurito Operator in the Name column. Click Create New under Provided APIs. A new Custom Resource Definition (CRD) is created with the default values. Following fields are supported as part of the CR:

    • size: how many pods your the apicurito operator will have.
    • image: the apicurito image. Changing this image in an existing installation will trigger an upgrade of the operator.
  10. Click Create. This will create a new apicurito-service.

2.4. Installing Fuse Imagestreams and Templates on the OpenShift 3.x Server

After you configure authentication to the Red Hat container registry, import and use the Red Hat Fuse on OpenShift image streams and templates.

Procedure

  1. Start the OpenShift Server.
  2. Log in to the OpenShift Server as an administrator.

    oc login -u system:admin
  3. Verify that you are using the project for which you created a docker-registry secret.

    oc project openshift
  4. Install the Fuse on OpenShift image streams.

    BASEURL=https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003
    
    oc create -n openshift -f ${BASEURL}/fis-image-streams.json
  5. Install the quickstart templates:

    for template in eap-camel-amq-template.json \
     eap-camel-cdi-template.json \
     eap-camel-cxf-jaxrs-template.json \
     eap-camel-cxf-jaxws-template.json \
     eap-camel-jpa-template.json \
     karaf-camel-amq-template.json \
     karaf-camel-log-template.json \
     karaf-camel-rest-sql-template.json \
     karaf-cxf-rest-template.json \
     spring-boot-camel-amq-template.json \
     spring-boot-camel-config-template.json \
     spring-boot-camel-drools-template.json \
     spring-boot-camel-infinispan-template.json \
     spring-boot-camel-rest-sql-template.json \
     spring-boot-camel-template.json \
     spring-boot-camel-xa-template.json \
     spring-boot-camel-xml-template.json \
     spring-boot-cxf-jaxrs-template.json \
     spring-boot-cxf-jaxws-template.json ;
     do
     oc create -n openshift -f \
     https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/quickstarts/${template}
     done
  6. Install the templates for the Fuse Console.

    oc create -n openshift -f https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/fis-console-cluster-template.json
    oc create -n openshift -f https://raw.githubusercontent.com/jboss-fuse/application-templates/application-templates-2.1.fuse-740025-redhat-00003/fis-console-namespace-template.json
    Note

    For information on deploying the Fuse Console, see Set up Fuse Console on OpenShift.

  7. Install the Apicurito template:

    oc create -n openshift -f ${BASEURL}/fuse-apicurito.yml
  8. (Optional) View the installed Fuse on OpenShift images and templates:

    oc get template -n openshift
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.