Chapter 2. Installing and deploying AMQ Broker on OpenShift Container Platform
2.1. Installing AMQ Broker on OpenShift Container Platform image streams and application templates
The AMQ Broker on OpenShift Container Platform images are not available in the service catalog. You must manually install them by using the procedures in this section.
Procedure
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
At the command line, run the following commands to update the AMQ Broker on OpenShift Container Platform image stream in the
openshiftproject:$ oc replace --force -f \ https://raw.githubusercontent.com/jboss-container-images/jboss-amq-7-broker-openshift-image/72-1.0.GA/amq-broker-7-image-streams.yaml $ oc replace --force -f \ https://raw.githubusercontent.com/jboss-container-images/jboss-amq-7-broker-openshift-image/72-1.0.GA/amq-broker-7-scaledown-controller-image-streams.yaml $ oc import-image amq-broker-72-openshift:1.0 $ oc import-image amq-broker-72-scaledown-controller-openshift:1.0
NoteAMQ Broker on OpenShift Container Platform leverages StatefulSets and Deployments resources for use with the
*-persistencetemplates. These are Kubernetes-native resources that can consume image streams only from a local namespace, not the sharedopenshiftnamespace. This is because the image streams must be created in the same namespace where the template will be instantiated. Also,-n openshiftis an optional parameter to use if you need to create a template in the shared namespace.Run the following command to update the AMQ Broker templates. Using the
--forceoption with theoc replacecommand creates or updates the resources$ for template in amq-broker-72-basic.yaml \ amq-broker-72-ssl.yaml \ amq-broker-72-custom.yaml \ amq-broker-72-persistence.yaml \ amq-broker-72-persistence-ssl.yaml \ amq-broker-72-persistence-clustered.yaml \ amq-broker-72-persistence-clustered-ssl.yaml; do oc replace --force -f \ https://raw.githubusercontent.com/jboss-container-images/jboss-amq-7-broker-openshift-image/72-1.0.GA/templates/${template} done
2.2. Deploying AMQ Broker on OpenShift Container Platform image
The AMQ Broker on OpenShift Container Platform image requires a service account for deployments. Service accounts are API objects that exist within each project. Three service accounts are created automatically in every project:
-
builder: This service account is used by build pods. It contains thesystem:image-builderrole from which you can push images to any image stream in the project using the internal Docker registry. -
deployer: This service account is used by deployment pods. It contains thesystem:deployerrole from which you can view and modify replication controllers and pods in the project. -
default: This service account is used to run all other pods unless you specify a different service account.
Service accounts can be created or deleted like any other API object. For multiple-node deployments, the service account must have the view role enabled so the various pods in the cluster can be discovered and managed.
In addition, you must configure SSL to enable connections to AMQ Broker from outside of the OpenShift Container Platform instance. The type of discovery protocol that is used for discovering AMQ Broker mesh endpoints is JGroups with OpenShift.dns ping protocol.
Procedure
-
Add the
viewrole to the service account:
$ oc policy add-role-to-user view -z default
Additional resources
- For more information on how to configure SSL, see Configuring SSL.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.