Skip to content

Commit

Permalink
Merge pull request #10 from SolaceProducts/SOL-1244
Browse files Browse the repository at this point in the history
Sol 1244
  • Loading branch information
PhilippeKhalife authored Dec 22, 2017
2 parents 8529bed + dd456ae commit adfdcb2
Show file tree
Hide file tree
Showing 19 changed files with 769 additions and 164 deletions.
291 changes: 239 additions & 52 deletions README.md

Large diffs are not rendered by default.

Binary file added images/template_relationship.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 12 additions & 6 deletions scripts/start_vmr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,25 @@ OPTIND=1 # Reset in case getopts has been used previously in the shell.
# Initialize our own variables:
solace_password=""
solace_image=""
values_file="values-examples/small-direct-noha.yaml"
verbose=0

while getopts "i:p:" opt; do
while getopts "i:p:v:" opt; do
case "$opt" in
i) solace_image=$OPTARG
;;
p) solace_password=$OPTARG
;;
v) values_file=$OPTARG
;;
esac
done

shift $((OPTIND-1))
[ "$1" = "--" ] && shift

verbose=1
echo "`date` INFO: solace_image=$solace_image ,Leftovers: $@"
echo "`date` INFO: solace_image=${solace_image}, values_file=${values_file} Leftovers: $@"

# [TODO] Need proper way to set service account for tiller
#kubectl create serviceaccount --namespace kube-system tiller
Expand Down Expand Up @@ -78,16 +81,19 @@ git clone https://github.com/SolaceProducts/solace-kubernetes-quickstart
cd solace-kubernetes-quickstart
cd solace

cp ${values_file} ./values.yaml

IFS=':' read -ra container_array <<< "$solace_image"
sed ${sed_options} "s:SOLOS_IMAGE_REPO:${container_array[0]}:g" values.yaml
sed ${sed_options} "s:SOLOS_IMAGE_TAG:${container_array[1]}:g" values.yaml
sed ${sed_options} "s/SOLOS_ADMIN_PASSWORD/${solace_password}/g" templates/solaceStatefullSet.yaml
sed ${sed_options} "s/SOLOS_ADMIN_PASSWORD/${solace_password}/g" templates/pre-install-secret.yaml

echo "`date` INFO: DEPLOY VMR TO CLUSTER"
echo "#############################################################"
# [TODO] Need to figure out how to tell helm tiller is up and ready to accept a release
sleep 60
helm install . -f values.yaml
# Ensure helm tiller is up and ready to accept a release then proceed
# workaround until https://github.com/kubernetes/helm/issues/2114 resolved
kubectl rollout status -w deployment/tiller-deploy --namespace=kube-system
helm install . -f values.yaml

echo "`date` INFO: DEPLOY VMR COMPLETE"
echo "#############################################################"
Expand Down
9 changes: 5 additions & 4 deletions solace/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
apiVersion: v1
description: A Helm chart for Kubernetes
description: Deploy Solace VMR Singleton or HA Cluster onto a Kubernetes Cluster
name: solace
version: 0.1.0
version: 0.2.0
icon: https://dev.solace.com/wp-content/uploads/2016/10/solace-logo-white.png
maintainers:
- name: kenbarr
email: [email protected]
home: http://dev.solace.com
sources:
- http://dev.solace.com
- https://github.com/SolaceProducts/solace-kubernetes-quickstart
keywords:
- solace
- vmr
- vmr
18 changes: 18 additions & 0 deletions solace/files/logging_config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[loggers]
keys=root
[handlers]
keys=console
[formatters]
keys=formatter
[logger_root]
level=INFO
#level=DEBUG
handlers=console
[handler_console]
class=StreamHandler
level=INFO
#level=DEBUG
formatter=formatter
args=(sys.stdout,)
[formatter_formatter]
format=%(message)s
18 changes: 0 additions & 18 deletions solace/templates/configMap.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions solace/templates/pre-install-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: v1
kind: Secret
metadata:
name: {{ template "solace.fullname" . }}-secrets
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ template "solace.name" . }}
annotations:
"helm.sh/hook": pre-install
"helm.sh/hook-weight": "5"
type: Opaque
data:
username_admin_password: {{ b64enc "SOLOS_ADMIN_PASSWORD" }}
19 changes: 19 additions & 0 deletions solace/templates/service-discovery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "solace.fullname" . }}-discovery
labels:
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
app: {{ template "solace.name" . }}
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec:
ports:
- port: 8080
name: semp
clusterIP: None
selector:
app: {{ template "solace.name" . }}
release: {{ .Release.Name }}
Loading

0 comments on commit adfdcb2

Please sign in to comment.