Skip to content

Commit

Permalink
Template fix for minishift (#32)
Browse files Browse the repository at this point in the history
* Update Helm version to 2.14, in sync with the solace kubernetes quickstart

* Updated templates to match latest solace kubernetes quickstart and to work with MiniShift

* Doc enhancements for Minishift
  • Loading branch information
bczoma authored and PhilippeKhalife committed Oct 4, 2019
1 parent c47d400 commit 5393577
Show file tree
Hide file tree
Showing 5 changed files with 286 additions and 177 deletions.
34 changes: 25 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,13 @@ cd ~/workspace/solace-openshift-quickstart/scripts
* Use the ‘prepareProject.sh’ script the Solace OpenShift QuickStart to create and configure an OpenShift project that meets requirements of the message broker deployment:

```
# If using Minishift start with this command: oc login -u system:admin
cd ~/workspace/solace-openshift-quickstart/scripts
sudo ./prepareProject.sh solace-pubsub # adjust your project name as needed here and in subsequent commands
# In Minishift return to admin user: oc login -u admin
```

> Note: If using MiniShift on Windows use the command without `sudo`. If necessary, as a workaround, run just this command with logging in as "system:admin" before using `oc login -u system:admin`, then login afterward to the normal "admin" user. Running as the normal "admin" user provides the closest experience of other OpenShift deployments.
> Note: The purpose of using `sudo` is to elevate `admin` user to `system:admin`. This is not available when using MiniShift and apply above workaround for just this step.
### Step 5: Optional: Load the message broker (Docker image) to your Docker Registry

Expand All @@ -158,17 +160,18 @@ Deployment scripts will pull the Solace message broker image from a [Docker regi

Options include:

* You can choose to use [OpenShift's Docker registry.](https://docs.openshift.com/container-platform/3.10/install_config/registry/deploy_registry_existing_clusters.html )
* You can choose to use [OpenShift's Docker registry.](https://docs.openshift.com/container-platform/3.10/install_config/registry/deploy_registry_existing_clusters.html ). For MiniShift a simple option is to use the [Minishift Docker daemon](//docs.okd.io/latest/minishift/using/docker-daemon.html).

* **(Optional / ECR)** You can utilize the AWS Elastic Container Registry (ECR) to host the message broker Docker image. For more information, refer to [Amazon Elastic Container Registry](https://aws.amazon.com/ecr/ ). If you are using ECR as your Docker registry then you must add the ECR login credentials (as an OpenShift secret) to your message broker HA deployment. This project contains a helper script to execute this step:

```shell
# Required if using ECR for Docker registry
cd ~/workspace/solace-openshift-quickstart/scripts
sudo su
aws configure # provide AWS config for root; provide your key ID and key, leave the rest to None.
./addECRsecret.sh solace-pubsub # adjust your project name as needed
```
# Required if using ECR for Docker registry
sudo su
aws configure # provide AWS config for root
cd ~/workspace/solace-openshift-quickstart/scripts
./addECRsecret.sh solace-pubsub # adjust your project name as needed
```

Here is an outline of the additional steps required if loading an image to ECR:

* Copy the Solace Docker image location and download the image archive locally using the `wget <url>` command.
Expand Down Expand Up @@ -232,10 +235,23 @@ watch oc get pods --show-labels
```
echo -n 'strong@dminPw!' | base64
```
3. Switch to the templates directory:
```
oc project solace-pubsub # adjust your project name as needed
cd ~/workspace/solace-openshift-quickstart/templates
```

**Deploy the message broker:**

You can deploy the message broker in either a single-node or high-availability configuration:
You can deploy the message broker in either a single-node or high-availability configuration.

Note: DOCKER_REGISTRY_URL and MESSAGEBROKER_IMAGE_TAG default to `solace/solace-pubsub-standard` and `latest`, MESSAGEBROKER_STORAGE_SIZE defaults to 30Gi.

The template by default provides for a small-footprint Solace message broker deployment deployable in MiniShift. Adjust `export system_scaling_maxconnectioncount` in the template for higher scaling but ensure adequate resources are available to the pod(s). Refer to the [System Requirements in the Solace documentation](//docs.solace.com/Configuring-and-Managing/SW-Broker-Specific-Config/Scaling-Tier-Resources.htm).

Also note that if a deployment failed and then deleted using `oc delete -f`, ensure to delete any remaining PVCs. Failing to do so and retrying using the same deployment name will result in an already used PV volume mounted and the pod(s) may not come up.

The template by default provides for a small-footprint Solace message broker deployment deployable in MiniShift. Adjust `export system_scaling_maxconnectioncount` in the template for higher scaling but ensure adequate resources are available to the pod(s). Refer to the [System Requirements in the Solace documentation](//docs.solace.com/Configuring-and-Managing/SW-Broker-Specific-Config/Scaling-Tier-Resources.htm).

* For a **Single-Node** configuration:
* Process the Solace 'Single Node' OpenShift template to deploy the message broker in a single-node configuration. Specify values for the DOCKER_REGISTRY_URL, MESSAGEBROKER_IMAGE_TAG, MESSAGEBROKER_STORAGE_SIZE, and MESSAGEBROKER_ADMIN_PASSWORD parameters:
Expand Down
2 changes: 1 addition & 1 deletion scripts/deployHelm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# . ./deployHelm.sh server
#
TILLER_PROJECT=tiller
HELM_VERSION=2.9.1
HELM_VERSION=2.14.0

function helmVersion() {
which helm &> /dev/null
Expand Down
2 changes: 1 addition & 1 deletion scripts/templates/deployHelmServer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ objects:
spec:
containers:
- name: tiller
image: gcr.io/kubernetes-helm/tiller:v2.9.1
image: gcr.io/kubernetes-helm/tiller:v2.14.0
env:
- name: TILLER_NAMESPACE
valueFrom:
Expand Down
Loading

0 comments on commit 5393577

Please sign in to comment.