Skip to content

Commit 78d40b6

Browse files
authored
Red Hat certification updates (#109)
* Setting version to 3.0 (major changes) * Removed support for Helm v2, now supporting only Helm v3 * Added support to define extra env variables for the PubSub+ container * Fixed request to /SEMP path when testing management host (was an issue when TLS enabled) * Fixed setup config-sync to apply to all VPNs * Added Helm test to chart * Added schema to chart * Added kubeVersion to chart * Added license to chart root
1 parent 2f1b861 commit 78d40b6

15 files changed

+602
-166
lines changed

.github/workflows/build-test.yml

+44-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
deploy:
1111
name: K8s QuickStart CI test
1212
runs-on: ubuntu-latest
13-
timeout-minutes: 20
13+
timeout-minutes: 30
1414

1515
steps:
1616
- name: Set env and tools
@@ -51,11 +51,10 @@ jobs:
5151
5252
- name: Deploy HA broker and test
5353
run: |
54-
REPO=$(echo ${{ secrets.BROKER_DOCKER_IMAGE_REF }} | cut -d ":" -f 1)
55-
TAG=$(echo ${{ secrets.BROKER_DOCKER_IMAGE_REF }} | cut -d ":" -f 2)
54+
REPO=solace/solace-pubsub-standard
55+
TAG=latest
5656
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=*"
5757
kubectl create secret tls test-tls --key="tls.key" --cert="tls.crt"
58-
5958
helm install my-release pubsubplus --set solace.size=dev,solace.redundancy=true,tls.enabled=true,tls.serverCertificatesSecret=test-tls,solace.usernameAdminPassword=admin,image.repository=$REPO,image.tag=$TAG
6059
kubectl get statefulset,svc,pods,pvc,pv --show-labels
6160
echo "Waiting for broker to become active"
@@ -64,6 +63,7 @@ jobs:
6463
until kubectl get pods --show-labels | grep pubsubplus-1 | grep -m 1 -E '1/1'; do sleep 10; done
6564
until kubectl get pods --show-labels | grep pubsubplus-2 | grep -m 1 -E '1/1'; do sleep 10; done
6665
until kubectl get pods --show-labels | grep pubsubplus- | grep -m 1 -E 'active=true'; do sleep 10; done
66+
helm test my-release | grep Phase | grep Succeeded
6767
kubectl get statefulset,svc,pods,pvc,pv --show-labels
6868
bash -c 'if [[ `kubectl get po --show-labels | grep -c "1/1"` -ne 3 ]]; then echo "Some pods are not ready!"; kubectl get po --show-labels; exit 1; fi'
6969
export url="$(kubectl get statefulset,svc,pods,pvc,pv --show-labels | grep LoadBalancer | awk '{print $4}')"; echo $url
@@ -76,6 +76,31 @@ jobs:
7676
curl -k -sS -u admin:admin https://$url:1943/SEMP -d "<rpc><show><config-sync></config-sync></show></rpc>"
7777
if [[ -z `curl -sS -u admin:admin http://$url:8080/SEMP -d "<rpc><show><config-sync></config-sync></show></rpc>" | grep "<oper-status>Up</oper-status>"` ]] ; then echo "config-sync not up!"; exit 1; fi
7878
helm list
79+
80+
- name: Upgrade HA broker and test
81+
run: |
82+
REPO=solace/solace-pubsub-standard
83+
UPGRADETAG=$(wget -q https://registry.hub.docker.com/v1/repositories/solace/solace-pubsub-standard/tags -O - | sed -e 's/[][]//g' -e 's/"//g' -e 's/ //g' | tr '}' '\n' | awk -F: '{print $3}' | sort -t "." -k1,1n -k2,2n -k3,3n | tail -1)
84+
helm upgrade my-release pubsubplus --set solace.size=dev,solace.redundancy=true,tls.enabled=true,tls.serverCertificatesSecret=test-tls,solace.usernameAdminPassword=admin,image.repository=$REPO,image.tag=$UPGRADETAG
85+
kubectl get statefulset,svc,pods,pvc,pv --show-labels
86+
echo "Waiting for broker to become active after upgrade"
87+
statefulset_name=$(kubectl get statefulset | grep pubsubplus | awk '{print $1}')
88+
until kubectl rollout status statefulset $statefulset_name -w | grep "rolling update complete"; do sleep 10; done
89+
until kubectl get pods --show-labels | grep pubsubplus-0 | grep -m 1 -E '1/1'; do sleep 10; done
90+
until kubectl get pods --show-labels | grep pubsubplus-1 | grep -m 1 -E '1/1'; do sleep 10; done
91+
until kubectl get pods --show-labels | grep pubsubplus-2 | grep -m 1 -E '1/1'; do sleep 10; done
92+
until kubectl get pods --show-labels | grep pubsubplus- | grep -m 1 -E 'active=true'; do sleep 10; done
93+
helm test my-release | grep Phase | grep Succeeded
94+
kubectl get statefulset,svc,pods,pvc,pv --show-labels
95+
bash -c 'if [[ `kubectl get po --show-labels | grep -c "1/1"` -ne 3 ]]; then echo "Some pods are not ready!"; kubectl get po --show-labels; exit 1; fi'
96+
export url="$(kubectl get statefulset,svc,pods,pvc,pv --show-labels | grep LoadBalancer | awk '{print $4}')"; echo $url
97+
pubSubTools/sdkperf_c -cip=tcp://$url:55555 -mn=10000 -mr=0 -ptl=t1 -stl=t1 | grep "Total Messages"
98+
pubSubTools/sdkperf_c -cip=tcps://$url:55443 -mn=10000 -mr=0 -ptl=t1 -stl=t1 | grep "Total Messages"
99+
sleep 10
100+
curl -k -sS -u admin:admin https://$url:1943/SEMP -d "<rpc><show><redundancy></redundancy></show></rpc>"
101+
curl -k -sS -u admin:admin https://$url:1943/SEMP -d "<rpc><show><config-sync></config-sync></show></rpc>"
102+
if [[ -z `curl -sS -u admin:admin http://$url:8080/SEMP -d "<rpc><show><config-sync></config-sync></show></rpc>" | grep "<oper-status>Up</oper-status>"` ]] ; then echo "config-sync not up!"; exit 1; fi
103+
helm list
79104
helm delete $(helm list | grep deployed | awk '{print $1}')
80105
kubectl delete pvc --all
81106
@@ -88,15 +113,27 @@ jobs:
88113
helm install --generate-name pubsubplus-ha --dry-run
89114
helm lint pubsubplus-dev
90115
helm install --generate-name pubsubplus-dev --dry-run
116+
helm lint pubsubplus-openshift
117+
helm install --generate-name pubsubplus-openshift --dry-run
118+
helm lint pubsubplus-openshift-ha
119+
helm install --generate-name pubsubplus-openshift-ha --dry-run
120+
helm lint pubsubplus-openshift-dev
121+
helm install --generate-name pubsubplus-openshift-dev --dry-run
91122
92123
- name: Publish artifacts
93124
run: |
125+
# Two groups of Helm repos are created:
126+
# 1 - for general Helm charts that are hosted by Solace from gh-pages
127+
# 2 - for OpenShift variants that will be further submitted to OpenShift repo
94128
git config --global user.name "GitHub Actions Automation"
95129
git config --global user.email "<>"
96130
mkdir gh-pages; # Now update gh-pages
97131
if [ ${{ github.ref }} == 'refs/heads/master' ] && [ ${{ github.repository_owner }} == 'SolaceProducts' ] ; then
98132
echo "Using master on SolaceProducts"
99133
git clone --quiet --branch=gh-pages https://${{ secrets.GH_TOKEN }}@github.com/SolaceProducts/pubsubplus-kubernetes-quickstart gh-pages > /dev/null 2>&1
134+
rm -rf gh-pages/helm-charts-openshift; mkdir -p gh-pages/helm-charts-openshift
135+
mv pubsubplus-openshift-*.tgz gh-pages/helm-charts-openshift/
136+
helm repo index gh-pages/helm-charts-openshift/ --url https://solaceproducts.github.io/pubsubplus-kubernetes-quickstart/helm-charts-openshift
100137
mv pubsubplus-*.tgz gh-pages/helm-charts/
101138
helm repo index gh-pages/helm-charts/ --url https://solaceproducts.github.io/pubsubplus-kubernetes-quickstart/helm-charts
102139
pushd gh-pages
@@ -109,6 +146,9 @@ jobs:
109146
elif [ ${{ github.ref }} != 'refs/heads/gh-pages' ] && [ ${{ github.repository_owner }} != 'SolaceProducts' ] ; then
110147
echo "Using $TESTRUNBRANCH on ${{ github.repository_owner }}"
111148
git clone --quiet --branch=gh-pages https://${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} gh-pages > /dev/null 2>&1
149+
rm -rf gh-pages/helm-charts-openshift; mkdir -p gh-pages/helm-charts-openshift
150+
mv pubsubplus-openshift-*.tgz gh-pages/helm-charts-openshift/
151+
helm repo index gh-pages/helm-charts-openshift/ --url https://solacedev.github.io/pubsubplus-kubernetes-quickstart/helm-charts-openshift
112152
mv pubsubplus-*.tgz gh-pages/helm-charts/
113153
helm repo index gh-pages/helm-charts/ --url https://solacedev.github.io/pubsubplus-kubernetes-quickstart/helm-charts
114154
pushd gh-pages

README.md

+2-58
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Detailed documentation is provided in the [Solace PubSub+ Software Event Broker
1515
This document is applicable to any platform supporting Kubernetes, with specific hints on how to set up a simple MiniKube deployment on a Linux-based machine. To view examples of other Kubernetes platforms see:
1616

1717
- [Deploying a Solace PubSub+ Software Event Broker HA group onto a Google Kubernetes Engine](//github.com/SolaceProducts/solace-gke-quickstart )
18-
- [Deploying a Solace PubSub+ Software Event Broker HA Group onto an OpenShift 3.11 platform](//github.com/SolaceProducts/solace-openshift-quickstart )
18+
- [Deploying a Solace PubSub+ Software Event Broker HA Group onto an OpenShift 4 platform](//github.com/SolaceProducts/solace-openshift-quickstart )
1919
- Deploying a Solace PubSub+ Software Event Broker HA Group onto Amazon EKS (Amazon Elastic Container Service for Kubernetes): follow the [AWS documentation](//docs.aws.amazon.com/eks/latest/userguide/getting-started.html ) to set up EKS then this guide to deploy.
2020
- [Install a Solace PubSub+ Software Event Broker onto a Pivotal Container Service (PKS) cluster](//github.com/SolaceProducts/solace-pks )
2121
- Deploying a Solace PubSub+ Software Event Broker HA Group onto Azure Kubernetes Service (AKS): follow the [Azure documentation](//docs.microsoft.com/en-us/azure/aks/ ) to deploy an AKS cluster then this guide to deploy.
@@ -51,39 +51,13 @@ kubectl get nodes
5151
### 2. Install and configure Helm
5252

5353
Follow the [Helm Installation notes of your target release](https://github.com/helm/helm/releases) for your platform.
54-
Note that Helm is transitioning from v2 to v3. Some deployments still use v2. The event broker can be deployed using either version, however concurrent use of v2 and v3 from the same command-line environment is not supported.
54+
Note: Helm v2 is no longer supported. For Helm v2 support refer to [earlier versions of the chart](https://github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/releases).
5555

5656
On Linux a simple option to set up the latest stable release is to run:
5757

58-
(Click on the arrow to open instructions for Helm v2 or v3)
59-
60-
<details><summary><b>Instructions for Helm v2 setup</b></summary>
61-
<p>
62-
63-
```bash
64-
curl -sSL https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash
65-
```
66-
67-
Deploy Tiller, Helm's in-cluster operator:
68-
```bash
69-
# This enables getting started on most platforms by granting Tiller cluster-admin privileges
70-
kubectl -n kube-system create serviceaccount tiller
71-
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
72-
helm init --wait --service-account=tiller --upgrade # this may take some time
73-
```
74-
Warning: [more restricted Tiller privileges](/docs/PubSubPlusK8SDeployment.md#install-and-setup-the-helm-package-manager) are recommended in a production environment.
75-
</p>
76-
</details>
77-
78-
<details><summary><b>Instructions for Helm v3 setup</b></summary>
79-
<p>
80-
8158
```bash
8259
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
8360
```
84-
</p>
85-
</details>
86-
8761

8862
Helm is configured properly if the command `helm version` returns no error.
8963

@@ -98,34 +72,6 @@ Helm is configured properly if the command `helm version` returns no error.
9872
- Generally, for configuration options and ways to override default configuration values (using `--set` is one the options), consult the [PubSub+ Software Event Broker Helm Chart Reference](/pubsubplus/README.md#configuration).
9973
- Use one of the following chart variants to create a deployment:
10074

101-
(Click on the arrow to open instructions for Helm v2 or v3)
102-
103-
<details><summary><b>Install using Helm v2</b></summary>
104-
<p>
105-
106-
a) Create a Solace PubSub+ Software Event Broker deployment for development purposes using `pubsubplus-dev`. It requires a minimum of 1 CPU and 3.6 GB of memory be available to the event broker pod.
107-
```bash
108-
# Deploy PubSub+ Software Event Broker Standard edition for developers
109-
helm install --name my-release solacecharts/pubsubplus-dev
110-
```
111-
112-
b) Create a Solace PubSub+ standalone deployment, supporting 100 connections scaling using `pubsubplus`. A minimum of 2 CPUs and 3.6 GB of memory must be available to the event broker pod.
113-
```bash
114-
# Deploy PubSub+ Software Event Broker Standard edition, standalone
115-
helm install --name my-release solacecharts/pubsubplus
116-
```
117-
118-
c) Create a Solace PubSub+ HA deployment, supporting 100 connections scaling using `pubsubplus-ha`. The minimum resource requirements are 2 CPU and 3.6 GB of memory available to each of the three event broker pods.
119-
```bash
120-
# Deploy PubSub+ Software Event Broker Standard edition, HA
121-
helm install --name my-release solacecharts/pubsubplus-ha
122-
```
123-
</p>
124-
</details>
125-
126-
<details><summary><b>Install using Helm v3</b></summary>
127-
<p>
128-
12975
a) Create a Solace PubSub+ Software Event Broker deployment for development purposes using `pubsubplus-dev`. It requires a minimum of 1 CPU and 2 GB of memory available to the event broker pod.
13076
```bash
13177
# Deploy PubSub+ Software Event Broker Standard edition for developers
@@ -143,8 +89,6 @@ c) Create a Solace PubSub+ HA deployment, supporting 100 connections scaling usi
14389
# Deploy PubSub+ Software Event Broker Standard edition, HA
14490
helm install my-release solacecharts/pubsubplus-ha
14591
```
146-
</p>
147-
</details>
14892

14993
The above options will start the deployment and write related information and notes to the screen.
15094

0 commit comments

Comments
 (0)