Chapter 2. Installing AMQ Broker on OpenShift Container Platform
2.1. Installing the AMQ Broker image streams and application templates Copy linkLink copied to clipboard!
The AMQ Broker on OpenShift Container Platform image streams and application templates are not available in the OpenShift Container Platform service catalog by default. You must manually install them using the procedure in this section. When you have completed the manual installation, you can then use the OpenShift Container Platform web console to instantiate a template that automatically deploys the image for a chosen broker configuration on your OpenShift cluster. For examples of creating various broker configurations in this way, see Deploying AMQ Broker on OpenShift Container Platform and Tutorials.
Prerequisites
Starting in AMQ Broker 7.3, you use a new version of the Red Hat Container Registry to access container images. This new version of the registry requires you to become an authenticated user before you can access images. Before you can follow the procedure in this section, you must first complete the steps described in Red Hat Container Registry Authentication.
Procedure
At the command line, log in to OpenShift as a cluster administrator (or as a user that has project administrator access to the global
openshiftproject), for example:oc login -u system:admin
$ oc login -u system:adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteUsing the
openshiftproject makes the image stream and application templates that you install later in this procedure globally available to all projects in your OpenShift cluster.As an alternative to using the
openshiftproject (e.g., if a cluster administrator is unavailable), you can log in to a specific OpenShift project to which you have administrator access and in which you want to create a broker deployment, for example:oc login -u <USERNAME> oc project <PROJECT_NAME>
$ oc login -u <USERNAME> $ oc project <PROJECT_NAME>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Logging into a specific project means that the image stream and templates that you install later in this procedure are available only in that project’s namespace.
- In your web browser, navigate to the Red Hat Container Catalog.
-
In the search box, enter
AMQ Broker. Click Search. -
In the search results, click Red Hat AMQ Broker 7.3. The
amq-broker-7/amq-broker-73-openshiftrepository opens with the most recent image version automatically selected. If you want to change to an earlier image version, click the Tags tab and choose another version tag. - Click the Get This Image tab.
Under Authentication with registry tokens, follow the on-page instructions in the Using OpenShift secrets section. This section describes how to add references to your OpenShift secret name and the AMQ Broker 7.3 image repository to your pod configuration file.
NoteIf Podman or Docker is installed in your OpenShift cluster, you can also follow the instructions in the Using Podaman Login or Using Docker Login sections, with equivalent results.
At the command line, run the following commands to import the AMQ Broker on OpenShift Container Platform image streams and latest image version to your project namespace. Using the
--forceoption with theoc replacecommand updates the resources or creates them if they don’t already exist.oc replace --force -f \ https://raw.githubusercontent.com/jboss-container-images/jboss-amq-7-broker-openshift-image/73-7.3.0.GA/amq-broker-7-image-streams.yaml oc import-image amq-broker-7/amq-broker-73-openshift --from=registry.redhat.io/amq-broker-7/amq-broker-73-openshift --confirm
$ oc replace --force -f \ https://raw.githubusercontent.com/jboss-container-images/jboss-amq-7-broker-openshift-image/73-7.3.0.GA/amq-broker-7-image-streams.yaml $ oc import-image amq-broker-7/amq-broker-73-openshift --from=registry.redhat.io/amq-broker-7/amq-broker-73-openshift --confirmCopy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command to update the AMQ Broker application templates.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
AMQ Broker on OpenShift Container Platform leverages StatefulSet resources for use with all *-persistence*.yaml templates. For templates that are not *-persistence*.yaml, AMQ Broker uses Deployments resources. Both types of resources are Kubernetes-native resources that can consume image streams only from a local namespace, not the shared openshift namespace. This is because the image streams must be created in the same namespace where the template will be instantiated. Also, -n openshift is an optional parameter to use if you need to create a template in the shared namespace.