diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 593cea4..69e11cd 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -65,7 +65,7 @@ jobs: run: | shopt -s expand_aliases; alias remote_command=${REMOTE_COMMAND} remote_command "/opt/scripts/helmInstallBroker helmtest" - remote_command "/opt/scripts/testBroker helmtest my-release-pubsubplus-dev" | tee out.txt + remote_command "/opt/scripts/testBroker helmtest my-release-pubsubplus-openshift-dev" | tee out.txt grep "aurelia" out.txt # web portal access grep "Up" out.txt grep "Up" out.txt diff --git a/README.md b/README.md index 81faaac..b5e97da 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Solace [PubSub+ Platform](https://solace.com/products/platform/) is a complete e ## Overview -This project is a best practice template intended for development and demo purposes. It has been tested using OpenShift v4.6. The tested and recommended Solace PubSub+ Software Event Broker version is 9.10. +This project is a best practice template intended for development and demo purposes. It has been tested using OpenShift v4.9. The tested and recommended Solace PubSub+ Software Event Broker version is 9.12. This document provides a quick getting started guide to install a Solace PubSub+ Software Event Broker in various configurations onto an OpenShift 4 platform. For OpenShift 3.11, refer to the [archived version of this quick start](https://github.com/SolaceProducts/pubsubplus-openshift-quickstart/tree/v1.1.1). @@ -15,7 +15,15 @@ For detailed instructions, see [Deploying a Solace PubSub+ Software Event Broker The PubSub+ deployment does not require any special OpenShift Security Context; the default `restricted` SCC can be used. -We recommend using the Helm tool for convenience. An alternative method [using OpenShift templates](/docs/PubSubPlusOpenShiftDeployment.md#step-4-option-2-deploy-using-openshift-templates) is also available. +We recommend using the PubSub+ Helm chart for convenience. An alternative method [using OpenShift templates](/docs/PubSubPlusOpenShiftDeployment.md#step-4-option-2-deploy-using-openshift-templates) is also available. + +## Pre-requisite: Access to OpenShift Platform + +There are [multiple ways](https://www.openshift.com/try ) to get to an OpenShift 4 platform: +- The detailed [Event Broker on OpenShift](/docs/PubSubPlusOpenShiftDeployment.md#step-1-optional--aws-deploy-a-self-managed-openshift-container-platform-onto-aws) documentation describes how to set up production-ready Red Hat OpenShift Container Platform platform on AWS. +- An option for developers is to locally deploy an all-in-one environment using [CodeReady Containers](https://developers.redhat.com/products/codeready-containers/overview). +- An easy way to get an OpenShift cluster up and running is through the [Developer Sandbox](https://developers.redhat.com/developer-sandbox) program. You can sign up for a free 14-day trial. + ## Deploying PubSub+ Software Event Broker @@ -24,18 +32,30 @@ The event broker can be deployed in either a three-node High-Availability (HA) g In this quick start we go through the steps to set up an event broker using [Solace PubSub+ Helm charts](https://artifacthub.io/packages/search?page=1&repo=solace). There are three Helm chart variants available with default small-size configurations: -- `pubsubplus-dev`—deploys a minimum footprint software event broker for developers (standalone) -- `pubsubplus`—deploys a standalone software event broker that supports 100 connections -- `pubsubplus-ha`—deploys three software event brokers in an HA group that supports 100 connections +- `pubsubplus-openshift-dev` - deploys a minimum footprint software event broker for developers (standalone) +- `pubsubplus-openshift` - deploys a standalone software event broker that supports 100 connections +- `pubsubplus-openshift-ha` - deploys three software event brokers in an HA group that supports 100 connections For other event broker configurations or sizes, refer to the [PubSub+ Software Event Broker Helm Chart](https://github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/blob/master/pubsubplus/README.md) documentation. -### Step 1: Get an OpenShift Environment +You can install Helm charts on an OpenShift Container Platform cluster using the following methods: +* The Developer perspective of the OpenShift Web Console; or +* The CLI -There are [multiple ways](https://www.openshift.com/try ) to get to an OpenShift 4 platform: -- The detailed [Event Broker on OpenShift](/docs/PubSubPlusOpenShiftDeployment.md#step-1-optional--aws-deploy-a-self-managed-openshift-container-platform-onto-aws) documentation describes how to set up production-ready Red Hat OpenShift Container Platform platform on AWS. -- An option for developers is to locally deploy an all-in-one environment using [CodeReady Containers](https://developers.redhat.com/products/codeready-containers/overview). -- An easy way to get an OpenShift cluster up and running is through the [Developer Sandbox](https://developers.redhat.com/developer-sandbox) program. You can sign up for a free 14-day trial. +## Option 1: Installing from the OpenShift Web Console, Developer perspective + +This simple method uses the OpenShift Web Console graphical interface: + +* In a browser open the OpenShift Web Console, Developer perspective. +* Find and select the required PubSub+ Helm chart variant from the catalog, then click on "Install". +* Provide a unique Release Name. It is recommended to change the name that is offered by default. The maximum length of the Release Name should be 28 characters. +* If required, provide additional chart configurations. For options, consult the README link at the top of the page. Note that currently the "Form view" offers all the possible fields and the "YAML view" shows only those that have a current configuration value. It may be necessary to refresh the browser to display the latest in "YAML view". + +Additional information is available from the [OpenShift documentation](https://docs.openshift.com/container-platform/latest/applications/working_with_helm_charts/configuring-custom-helm-chart-repositories.html#odc-installing-helm-charts-using-Developer perspective_configuring-custom-helm-chart-repositories). + +## Option 2: Installing from CLI + +### Step 1: Ensure command-line console access to your OpenShift environment Assuming you have access to an OpenShift 4 platform, log in as `kubeadmin` using the `oc login -u kubeadmin` command. @@ -60,55 +80,56 @@ Helm is configured properly if the `helm version` command returns no error. 1. Add the Solace Helm charts to your local Helm repo: ```bash - helm repo add solacecharts https://solaceproducts.github.io/pubsubplus-kubernetes-quickstart/helm-charts + helm repo add openshift-helm-charts https://charts.openshift.io/ ``` 2. Create a new project or switch to your existing project (do not use the `default` project as its loose permissions don't reflect a typical OpenShift environment) ```bash - oc new-project solace-pubsub + oc new-project solace-pubsubplus ``` - By default the latest public [Docker image](https://hub.Docker.com/r/solace/solace-pubsub-standard/tags/) of PubSub+ Standard Edition available from the DockerHub registry is used. To use a different image, add the following values (comma-separated) to the `--set` commands in Step 3 below: + By default the latest [Red Hat certified image](https://catalog.redhat.com/software/container-stacks/search?q=solace) of PubSub+ Standard Edition available from `registry.connect.redhat.com` is used. To use a different image, add the following values (comma-separated) to the `--set` commands in Step 3 below: ```bash - image.repository=,image.tag= + helm install ... --set image.repository=,image.tag= ``` - If it is required by the image repository, you can also add optionally add the following: + If it is required by the image repository, you can also add the following: ```bash - image.pullSecretName= + --set image.pullSecretName= ``` 3. Use one of the following Helm chart variants to create a deployment (for configuration options and deletion instructions, refer to the [PubSub+ Software Event Broker Helm Chart](https://github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/tree/master/pubsubplus#configuration) documentation): - - Create a Solace PubSub+ minimum deployment for development purposes using `pubsubplus-dev`. This variant requires a minimum of 1 CPU and 3.4 GiB of memory to be available to the PubSub+ event broker pod. - ```bash - # Deploy PubSub+ Standard edition, minimum footprint developer version - helm install my-release solacecharts/pubsubplus-dev \ - --set securityContext.enabled=false - ``` + - Create a Solace PubSub+ minimum deployment for development purposes using `pubsubplus-openshift-dev`. This variant requires a minimum of 1 CPU and 3.4 GiB of memory to be available to the PubSub+ event broker pod. + ```bash + # Deploy PubSub+ Standard edition, minimum footprint developer version + helm install my-release openshift-helm-charts/pubsubplus-openshift-dev + ``` - - Create a Solace PubSub+ standalone deployment that supports 100 connections using `pubsubplus`. A minimum of 2 CPUs and 3.4 GiB of memory must be available to the PubSub+ pod. - ```bash - # Deploy PubSub+ Standard edition, standalone - helm install my-release solacecharts/pubsubplus \ - --set securityContext.enabled=false - ``` + - Create a Solace PubSub+ standalone deployment that supports 100 connections using `pubsubplus-openshift`. A minimum of 2 CPUs and 3.4 GiB of memory must be available to the PubSub+ pod. + ```bash + # Deploy PubSub+ Standard edition, standalone + helm install my-release openshift-helm-charts/pubsubplus-openshift + ``` - - Create a Solace PubSub+ HA deployment that supports 100 connections using `pubsubplus-ha`. This deployment requires that at least 2 CPUs and 3.4 GiB of memory are available to *each* of the three event broker pods. - ```bash - # Deploy PubSub+ Standard edition, HA - helm install my-release solacecharts/pubsubplus-ha \ - --set securityContext.enabled=false - ``` + - Create a Solace PubSub+ HA deployment that supports 100 connections using `pubsubplus-openshift-ha`. This deployment requires that at least 2 CPUs and 3.4 GiB of memory are available to *each* of the three event broker pods. + ```bash + # Deploy PubSub+ Standard edition, HA + helm install openshift-helm-charts/pubsubplus-openshift-ha + ``` All of the Helm options above start the deployment and write related information and notes to the console. Broker services are exposed by default through a Load Balancer that is specific to your OpenShift platform. For details, see the `Services access` section of the notes written to the console. + > Note: the `pubsubplus-openshift` Helm charts differ from the general `pubsubplus` charts in that the `securityContext.enabled` Helm parameter value is `false` by default, which is required for OpenShift. + 4. Wait for the deployment to complete, following any instructions that are written to the console. You can now [validate the deployment and try the management and messaging services](/docs/PubSubPlusOpenShiftDeployment.md#validating-the-deployment). -> **Note**: There is no external Load Balancer support with CodeReady Containers. Services are accessed through NodePorts instead. Check the results of the `oc get svc my-release-pubsubplus` command. This command returns the ephemeral NodePort port numbers for each message router service. Use these port numbers together with CodeReady Containers' public IP addresses, which can be obtained by running the `crc ip` command. + > Note: There is no external Load Balancer support with CodeReady Containers. Services are accessed through NodePorts instead. Check the results of the `oc get svc my-release-pubsubplus` command. This command returns the ephemeral NodePort port numbers for each message router service. Use these port numbers together with CodeReady Containers' public IP addresses, which can be obtained by running the `crc ip` command. + +## Troubleshooting If you have any problems, refer to the [Troubleshooting](https://github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/blob/master/docs/PubSubPlusK8SDeployment.md#troubleshooting) section of the general PubSub+ Kubernetes Documentation for help. Substitute any `kubectl` commands with `oc` commands. diff --git a/ci/README.md b/ci/README.md index f366b0a..5b30e57 100644 --- a/ci/README.md +++ b/ci/README.md @@ -1,3 +1,42 @@ The scripts in this folder are used for CI, based on [RedHat CRC](https://developers.redhat.com/products/codeready-containers/overview) -Assumptions: VM in GCP with "vagrant" user, CRC installed, /opt directory with `passw` and `pullsecret` contents. /opt/scripts and /opt/templates directory exist (no content needed). \ No newline at end of file +Assumptions: VM `openshift4x-test` in GCP with `vagrant` user, `crc` installed, `/opt` directory exists with file `pullsecret` that contains valid contents. `/opt/scripts` and `/opt/templates` directories exist (no content needed). Generally, `crc` works in this container. + +# How to verify the VM is in good standing + +Perform following: + +* Ensure the `openshift4x-test` VM in GCP is in running state. +* Login as `gcloud beta compute ssh --zone "us-east4-a" "vagrant@openshift4x-test" --project "capable-stream-180018"`. This will login as user `vagrant`. +* Run following scripts - none of then shall fail +``` +cd /opt +./scripts/shutdownCrc +./scripts/startCrc +./scripts/helmInstallBroker test1 +./scripts/templateDeleteBroker test1 +./scripts/shutdownCrc +``` +* If all is well the stop the VM. Automated tests will quit if the VM is already running, assuming it is used for other purposes. + +# How to upgrade the test container to latest CRC version + +If `crc` requires update for a later OpenShift version: + +* Login as user `vagrant` to the running VM as above +* Follow section 2.4. Upgrading CodeReady Containers from https://access.redhat.com/documentation/en-us/red_hat_codeready_containers, Getting Started Guide. Untar then overwrite the existing `crc` command at `/usr/local/bin/crc` +* Upgrade the `/usr/local/bin/oc` command similarly if required. +* Run +``` +crc version +crc stop +crc setup +``` +* Fix any issues +* Proceed to verify the VM as in the previous section + +# Restore from disaster + +A machine image has been saved at https://console.cloud.google.com/compute/machineImages/details/openshift4x-test-backup?authuser=0&project=capable-stream-180018. + +Note the machine type must support virtualization: `n1-standard-8` diff --git a/ci/helmInstallBroker b/ci/helmInstallBroker index ef103e3..ce48709 100644 --- a/ci/helmInstallBroker +++ b/ci/helmInstallBroker @@ -4,8 +4,9 @@ sudo sed -i 's/nameserver.*$/nameserver 1.1.1.1/g' /etc/resolv.conf while ! oc login -u kubeadmin -p `cat /opt/passw` https://api.crc.testing:6443 ; do sleep 1 ; done oc new-project $1 curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash -helm repo add solacecharts https://solaceproducts.github.io/pubsubplus-kubernetes-quickstart/helm-charts -helm install my-release solacecharts/pubsubplus-dev --set solace.redundancy=true,securityContext.enabled=false,solace.usernameAdminPassword=admin -while ! oc get pods --show-labels | grep my-release-pubsubplus-dev | grep "active=true" ; do sleep 1; done +helm repo add solacecharts-openshift-dev https://solaceproducts.github.io/pubsubplus-kubernetes-quickstart/helm-charts-openshift +helm repo update +helm install my-release solacecharts-openshift-dev/pubsubplus-openshift-dev --set solace.redundancy=true,solace.usernameAdminPassword=admin +while ! oc get pods --show-labels | grep my-release-pubsubplus-openshift-dev | grep "active=true" ; do sleep 1; done oc get pods --show-labels oc get svc diff --git a/ci/startCrc b/ci/startCrc index a522115..4ca9920 100644 --- a/ci/startCrc +++ b/ci/startCrc @@ -1,8 +1,11 @@ +loginctl enable-linger $USER +export XDG_RUNTIME_DIR=/run/user/$(id -u) cd /opt sudo systemctl stop systemd-networkd.socket systemd-networkd networkd-dispatcher systemd-networkd-wait-online sudo systemctl disable systemd-networkd.socket systemd-networkd networkd-dispatcher systemd-networkd-wait-online sudo /etc/init.d/network-manager start crc setup -crc start -p /opt/pullsecret -c 7 -m 26700 --nameserver 1.1.1.1 +crc start -p /opt/pullsecret -c 7 -m 26700 --nameserver 1.1.1.1 | tee out +cat out | grep kubeadmin -A 1 | grep Password | cut -d ":" -f 2 | xargs > /opt/passw eval $(crc oc-env) while ! oc login -u kubeadmin -p `cat /opt/passw` https://api.crc.testing:6443 ; do sleep 1 ; done diff --git a/ci/testBroker b/ci/testBroker index 5b51a00..b6151d3 100644 --- a/ci/testBroker +++ b/ci/testBroker @@ -3,7 +3,7 @@ eval $(crc oc-env) sudo sed -i 's/nameserver.*$/nameserver 1.1.1.1/g' /etc/resolv.conf while ! oc login -u kubeadmin -p `cat /opt/passw` https://api.crc.testing:6443 ; do sleep 1 ; done oc project $1 -export IP=`oc get svc $2 -o yaml | grep clusterIP | awk -F': ' '{print $NF}'` +export IP=`oc get svc $2 -o yaml | grep 'clusterIP:' | awk -F': ' '{print $NF}'` oc run nginx --image nginx while ! oc get po | grep nginx | grep Running ; do sleep 1; done oc exec -it nginx -- curl $IP:8080 | grep aurelia diff --git a/docs/PubSubPlusOpenShiftDeployment.md b/docs/PubSubPlusOpenShiftDeployment.md index 7fafddc..2bcad91 100644 --- a/docs/PubSubPlusOpenShiftDeployment.md +++ b/docs/PubSubPlusOpenShiftDeployment.md @@ -9,7 +9,7 @@ This repository provides an example of how to deploy the Solace PubSub+ Software ## Overview There are [multiple ways](https://www.openshift.com/try ) to get to an OpenShift platform. This example uses the Red Hat OpenShift Container Platform for deploying an HA group of software event brokers, but the concepts are transferable to other compatible platforms. We also provide tips for how to set up a simple single-node deployment using [CodeReady Containers](https://developers.redhat.com/products/codeready-containers/overview ) (the equivalent of MiniShift for OpenShift 4) for development, testing, or proof of concept purposes. -The supported Solace PubSub+ Software Event Broker version is 9.7 or later. +The supported Solace PubSub+ Software Event Broker version is 9.10 or later. For the Red Hat OpenShift Container Platform, we use a self-managed 60-day evaluation subscription of [RedHat OpenShift cluster in AWS](https://cloud.redhat.com/openshift/install#public-cloud ) in a highly redundant configuration, spanning three zones. @@ -95,8 +95,7 @@ This step requires the following: To deploy the container platform in AWS, do the following: 1. If you haven't already, log in to your RedHat account. -2. On the [**Create an OpenShift cluster**](https://cloud.redhat.com/openshift/create) page, under **Run it yourself**, select **AWS**. -3. On the [**Install OpenShift Container Platform 4**](https://cloud.redhat.com/openshift/install#public-cloud ) page, select **Installer-provisioned infrastructure**. A page is displayed that allows you to download the the required binaries and documentation. +2. On the [**Create an OpenShift cluster**](https://cloud.redhat.com/openshift/create) page, under **Run it yourself**, select **AWS** and then **Installer-provisioned infrastructure**. A page is displayed that allows you to download the the required binaries and documentation. 3. Select your OS, and then make a note of the URL of the "Download installer" button. 4. On your host, in the command console, run the following commands to download and expand the OpenShift installer: ``` @@ -139,7 +138,7 @@ To deploy the container platform in AWS, do the following: ### Step 2: (Optional / ECR) Use a Private Image Registry -By default, the deployment scripts pull the Solace PubSub+ image from [Docker Hub](https://hub.docker.com/r/solace/solace-pubsub-standard/tags?page=1&ordering=last_updated). If the OpenShift worker nodes have Internet access, no further configuration is required. +By default, the deployment scripts pull the Solace PubSub+ image from the [Red Hat containerized products catalog](https://catalog.redhat.com/software/container-stacks/search?q=solace). If the OpenShift worker nodes have Internet access, no further configuration is required. However, if you need to use a private image registry, such as AWS ECR, you must supply a pull secret to enable access to the registry. The steps that follow show how to use AWS ECR for the broker image. @@ -180,13 +179,13 @@ Additional information is provided in the following documents: - [Solace PubSub+ on Kubernetes Deployment Guide](//github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/blob/master/docs/PubSubPlusK8SDeployment.md) - [Kubernetes Deployment Quick Start Guide](//github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/blob/master/README.md) -This deployment uses PubSub+ Software Event Broker Helm charts. You can customize it by overriding the [default chart parameters](//github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/tree/master/pubsubplus#configuration). +This deployment uses PubSub+ Software Event Broker Helm charts for OpenShift. You can customize it by overriding the [default chart parameters](//github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/tree/master/pubsubplus#configuration). Consult the [Deployment Considerations](https://github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/blob/master/docs/PubSubPlusK8SDeployment.md#pubsub-software-event-broker-deployment-considerations) section of the general Event Broker in Kubernetes Documentation when planning your deployment. -In particular, the `securityContext.enabled` parameter must be set to `false`, indicating not to use the provided pod security context but to let OpenShift set it using SecurityContextConstraints (SCC). By default OpenShift will use the "restricted" SCC. - -By default the latest publicly available [Docker image](https://hub.Docker.com/r/solace/solace-pubsub-standard/tags/) of PubSub+ Standard Edition is used. Use a different image tag if required or [use an image from a different registry](#step-2-optional--ecr-use-a-private-image-registry). If you're using a different image, add the `image.repository=,image.tag=` values (comma-separated) to the `--set` commands below. Also specify a pull secret if required: `image.pullSecretName=` +PubSub+ Software Event Broker Helm charts for OpenShift differ from the general PubSub+ Helm charts: +* The `securityContext.enabled` parameter is set to `false` by default, indicating not to use the provided pod security context but to let OpenShift set it using SecurityContextConstraints (SCC). By default OpenShift will use the "restricted" SCC. +* By default the latest [Red Hat certified image](https://catalog.redhat.com/software/container-stacks/search?q=solace) of PubSub+ Standard Edition is used from `registry.connect.redhat.com`. Use a different image tag if required or [use an image from a different registry](#step-2-optional--ecr-use-a-private-image-registry). If you're using a different image, add the `image.repository=,image.tag=` values (comma-separated) to the `--set` commands below. Also specify a pull secret if required: `image.pullSecretName=` The broker can be [vertically scaled](https://github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/blob/master/docs/PubSubPlusK8SDeployment.md#deployment-scaling ) using the `solace.size` chart parameter. @@ -198,18 +197,18 @@ The broker can be [vertically scaled](https://github.com/SolaceProducts/pubsubpl Helm is configured properly if the command `helm version` returns no error. 2. Create a new project or switch to your existing project (do not use the `default` project as its loose permissions don't reflect a typical OpenShift environment): ``` - oc new-project solace-pubsub # adjust your project name as needed here and in subsequent commands + oc new-project solace-pubsubplus # adjust your project name as needed here and in subsequent commands ``` 3. Follow one of the examples below to deploy your cluster. ##### For an _HA_ Deployment: ```bash # One-time action: Add the PubSub+ charts to local Helm - helm repo add solacecharts https://solaceproducts.github.io/pubsubplus-kubernetes-quickstart/helm-charts + helm repo add openshift-helm-charts https://charts.openshift.io/ # Initiate the HA deployment - specify an admin password helm install my-ha-release \ - --set securityContext.enabled=false,solace.redundancy=true,solace.usernameAdminPassword= \ - solacecharts/pubsubplus + --set solace.redundancy=true,solace.usernameAdminPassword= \ + openshift-helm-charts/pubsubplus-openshift # Check the notes printed on screen # Wait until all pods are running, ready, and the active event broker pod label is "active=true" oc get pods --show-labels -w @@ -218,12 +217,12 @@ The broker can be [vertically scaled](https://github.com/SolaceProducts/pubsubpl ##### For a Single-Node, _Non-HA_ Deployment (Using a _Pull_ _Secret_): ```bash # One-time action: Add the PubSub+ charts to local Helm - helm repo add solacecharts https://solaceproducts.github.io/pubsubplus-kubernetes-quickstart/helm-charts + helm repo add openshift-helm-charts https://charts.openshift.io/ # Initiate the non-HA deployment - specify an admin password helm install my-nonha-release \ - --set securityContext.enabled=false,solace.redundancy=false,solace.usernameAdminPassword= \ + --set solace.redundancy=false,solace.usernameAdminPassword= \ --set image.pullSecretName= \ - solacecharts/pubsubplus + openshift-helm-charts/pubsubplus-openshift # Check the notes printed on screen # Wait until the event broker pod is running, ready, and the pod label is "active=true" oc get pods --show-labels -w @@ -233,15 +232,13 @@ The broker can be [vertically scaled](https://github.com/SolaceProducts/pubsubpl ```yaml # Create example values file - specify an admin password echo " - securityContext - enabled: false solace redundancy: false, usernameAdminPassword: " > deployment-values.yaml # Use values file helm install my-release \ -v deployment-values.yaml \ - solacecharts/pubsubplus + openshift-helm-charts/pubsubplus-openshift ``` ### Step 3, Option 2: Deploy Using OpenShift Templates @@ -264,7 +261,7 @@ This option use an OpenShift template and doesn't require Helm. This option assu You will use this value as a parameter when you process the event broker OpenShift template. 2. Create a new project or switch to your existing project (do not use the `default` project as its loose permissions don't reflect a typical OpenShift environment): ``` - oc new-project solace-pubsub # adjust your project name as needed here and in subsequent commands + oc new-project solace-pubsubplus # adjust your project name as needed here and in subsequent commands ``` 3. Follow one of the examples below to deploy your cluster. @@ -283,7 +280,7 @@ This option use an OpenShift template and doesn't require Helm. This option assu ##### For an _HA_ Deployment: In this example, we specify values for all parameters. - The `BROKER_IMAGE_REGISTRY_URL` and `BROKER_IMAGE_TAG` parameters default to **solace/solace-pubsub-standard** and **latest**, respectively. + The `BROKER_IMAGE_REGISTRY_URL` and `BROKER_IMAGE_TAG` parameters default to **registry.connect.redhat.com/solace/pubsubplus-standard** and **latest**, respectively. ``` oc process -f https://raw.githubusercontent.com/SolaceProducts/pubsubplus-openshift-quickstart/master/templates/eventbroker_ha_template.yaml \ @@ -327,21 +324,21 @@ persistentvolumeclaim/data-my-release-pubsubplus-1 Bound pvc-ab428fa6-4786- persistentvolumeclaim/data-my-release-pubsubplus-2 Bound pvc-3d77864d-3f90-42fe-939d-8a9324a62e20 10Gi RWO gp2 23h app.kubernetes.io/instance=my-release,app.kubernetes.io/name=pubsubplus NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE LABELS -persistentvolume/pvc-3d77864d-3f90-42fe-939d-8a9324a62e20 10Gi RWO Delete Bound solace-pubsub/data-my-release-pubsubplus-2 gp2 23h failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1a -persistentvolume/pvc-ab428fa6-4786-4419-a814-a801a0860861 10Gi RWO Delete Bound solace-pubsub/data-my-release-pubsubplus-1 gp2 23h failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1c -persistentvolume/pvc-eb2c8a52-85d4-4bc2-a73d-884559a4e463 10Gi RWO Delete Bound solace-pubsub/data-my-release-pubsubplus-0 gp2 23h failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1b +persistentvolume/pvc-3d77864d-3f90-42fe-939d-8a9324a62e20 10Gi RWO Delete Bound solace-pubsubplus/data-my-release-pubsubplus-2 gp2 23h failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1a +persistentvolume/pvc-ab428fa6-4786-4419-a814-a801a0860861 10Gi RWO Delete Bound solace-pubsubplus/data-my-release-pubsubplus-1 gp2 23h failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1c +persistentvolume/pvc-eb2c8a52-85d4-4bc2-a73d-884559a4e463 10Gi RWO Delete Bound solace-pubsubplus/data-my-release-pubsubplus-0 gp2 23h failure-domain.beta.kubernetes.io/region=eu-central-1,failure-domain.beta.kubernetes.io/zone=eu-central-1b [ec2-user@ip-10-0-23-198 ~]$ [ec2-user@ip-10-0-23-198 ~]$ [ec2-user@ip-10-0-23-198 ~]$ oc describe svc my-release-pubsubplus Name: my-release-pubsubplus -Namespace: solace-pubsub +Namespace: solace-pubsubplus Labels: app.kubernetes.io/instance=my-release app.kubernetes.io/managed-by=Helm app.kubernetes.io/name=pubsubplus helm.sh/chart=pubsubplus-2.4.0 Annotations: meta.helm.sh/release-name: my-release - meta.helm.sh/release-namespace: solace-pubsub + meta.helm.sh/release-namespace: solace-pubsubplus Selector: active=true,app.kubernetes.io/instance=my-release,app.kubernetes.io/name=pubsubplus Type: LoadBalancer IP: 172.30.129.136 @@ -511,7 +508,7 @@ oc delete pvc To remove the project or to start over in a clean state, delete the project using the OpenShift console or the command line: ``` -oc delete project solace-pubsub # adjust your project name as needed +oc delete project solace-pubsubplus # adjust your project name as needed ``` For more details, refer to the [OpenShift Projects](https://docs.openshift.com/container-platform/latest/welcome/index.html) documentation. diff --git a/templates/eventbroker_ha_template.yaml b/templates/eventbroker_ha_template.yaml index 3a3399c..b59caf9 100644 --- a/templates/eventbroker_ha_template.yaml +++ b/templates/eventbroker_ha_template.yaml @@ -224,7 +224,7 @@ objects: /mnt/disks/solace/semp_query.sh -n admin -p ${password} -u http://localhost:8080 \ -q "<${resync_step}>" /mnt/disks/solace/semp_query.sh -n admin -p ${password} -u http://localhost:8080 \ - -q "<${resync_step}>default" + -q "<${resync_step}>*" # Wait for config-sync results count=0 echo "`date` INFO: ${APP}-Waiting for config-sync connected" @@ -443,7 +443,7 @@ objects: echo 'missing parameter' exit 1 fi - if [ "`curl --write-out '%{http_code}' --silent --output /dev/null -u ${username}:${password} ${url}`" != "200" ] ; then + if [ "`curl --write-out '%{http_code}' --silent --output /dev/null -u ${username}:${password} ${url}/SEMP`" != "200" ] ; then echo "management host is not responding" exit 1 fi @@ -827,7 +827,7 @@ parameters: - name: BROKER_IMAGE_REGISTRY_URL displayName: Image Registry URL description: The image registry URL for the registry containing the PubSub+ Event Broker docker image - value: solace/solace-pubsub-standard + value: registry.connect.redhat.com/solace/pubsubplus-standard required: true - name: BROKER_IMAGE_REGISTRY_PULLSECRET displayName: Image Registry Pull Secret diff --git a/templates/eventbroker_singlenode_template.yaml b/templates/eventbroker_singlenode_template.yaml index 58dad1b..9f0a357 100644 --- a/templates/eventbroker_singlenode_template.yaml +++ b/templates/eventbroker_singlenode_template.yaml @@ -185,7 +185,7 @@ objects: echo 'missing parameter' exit 1 fi - if [ "`curl --write-out '%{http_code}' --silent --output /dev/null -u ${username}:${password} ${url}`" != "200" ] ; then + if [ "`curl --write-out '%{http_code}' --silent --output /dev/null -u ${username}:${password} ${url}/SEMP`" != "200" ] ; then echo "management host is not responding" exit 1 fi @@ -542,7 +542,7 @@ parameters: - name: BROKER_IMAGE_REGISTRY_URL displayName: Image Registry URL description: The image registry URL for the registry containing the PubSub+ Event Broker docker image - value: solace/solace-pubsub-standard + value: registry.connect.redhat.com/solace/pubsubplus-standard required: true - name: BROKER_IMAGE_REGISTRY_PULLSECRET displayName: Image Registry Pull Secret