Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ default: build-devserver test
.PHONY: all
all: build-devserver build-advancedserver

.PHONY: devserver
devserver: build-devserver test-devserver

# Build incubating components
.PHONY: incubating
incubating: build-explorer
Expand All @@ -37,6 +40,7 @@ clean:
rm -rf ./deps

downloads/mqadv_dev903_ubuntu_x86-64.tar.gz:
$(info $(SPACER)$(shell printf $(TITLE)"Downloading IBM MQ Advanced for Developers"$(END)))
mkdir -p downloads
cd downloads; curl -LO https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqadv/mqadv_dev903_ubuntu_x86-64.tar.gz

Expand All @@ -46,8 +50,8 @@ downloads: downloads/mqadv_dev903_ubuntu_x86-64.tar.gz
.PHONY: deps
deps:
glide install --strip-vendor
cd test/docker && dep ensure
cd test/kubernetes && dep ensure
cd test/docker && dep ensure -vendor-only
cd test/kubernetes && dep ensure -vendor-only

build/runmqserver:
mkdir -p build
Expand Down Expand Up @@ -76,6 +80,7 @@ test-advancedserver: build

.PHONY: test-devserver
test-devserver: build
$(info $(SPACER)$(shell printf $(TITLE)"Test $(DOCKER_IMAGE_DEVSERVER)"$(END)))
cd pkg/name && go test
cd test/docker && TEST_IMAGE=$(DOCKER_IMAGE_DEVSERVER) go test

Expand Down Expand Up @@ -109,11 +114,13 @@ endef

.PHONY: build-advancedserver
build-advancedserver: build downloads/CNJR7ML.tar.gz
$(info $(SPACER)$(shell printf $(TITLE)"Build $(DOCKER_IMAGE_ADVANCEDSERVER)"$(END)))
$(call docker-build-mq,$(DOCKER_IMAGE_ADVANCEDSERVER),Dockerfile-server,CNJR7ML.tar.gz,"4486e8c4cc9146fd9b3ce1f14a2dfc5b","IBM MQ Advanced","9.0.3")
docker tag $(DOCKER_IMAGE_ADVANCEDSERVER) mq-advancedserver:9.0.3-$(DOCKER_TAG_ARCH)

.PHONY: build-devserver
build-devserver: build downloads/mqadv_dev903_ubuntu_x86-64.tar.gz
$(info $(shell printf $(TITLE)"Build $(DOCKER_IMAGE_DEVSERVER)"$(END)))
$(call docker-build-mq,$(DOCKER_IMAGE_DEVSERVER),Dockerfile-server,mqadv_dev903_ubuntu_x86-64.tar.gz,"98102d16795c4263ad9ca075190a2d4d","IBM MQ Advanced for Developers (Non-Warranted)","9.0.3")
docker tag $(DOCKER_IMAGE_DEVSERVER) mq-devserver:9.0.3-$(DOCKER_TAG_ARCH)

Expand All @@ -130,6 +137,8 @@ build-advancedserver-cover: build-advanced-server build-cov
# build-web: build downloads/CNJR7ML.tar.gz
# $(call docker-build-mq,mq-web:latest-$(DOCKER_TAG_ARCH),Dockerfile-mq-web)

.PHONY: build-devserver
.PHONY: build-explorer
build-explorer: build downloads/mqadv_dev903_ubuntu_x86-64.tar.gz
$(call docker-build-mq,mq-explorer:latest-$(DOCKER_TAG_ARCH),incubating/mq-explorer/Dockerfile-mq-explorer,mqadv_dev903_ubuntu_x86-64.tar.gz,"98102d16795c4263ad9ca075190a2d4d","IBM MQ Advanced for Developers (Non-Warranted)","9.0.3")

include formatting.mk
2 changes: 1 addition & 1 deletion charts/ibm-mqadvanced-server-dev/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
apiVersion: v1
description: IBM MQ queue manager
name: ibm-mqadvanced-server-dev
version: 0.1.0
version: 1.0.0-beta
icon: https://developer.ibm.com/messaging/wp-content/uploads/sites/18/2017/07/IBM-MQ-Square-200.png
17 changes: 12 additions & 5 deletions charts/ibm-mqadvanced-server-dev/templates/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
{{- if .Values.persistence.enabled }}
volumeMounts:
- mountPath: "/mnt/mqm"
name: {{ template "fullname" . }}-{{ .Values.persistence.name }}
name: "{{ template "fullname" . }}-{{ .Values.dataPVC.name }}"
{{- end }}
resources:
limits:
Expand All @@ -76,18 +76,25 @@ spec:
volumeClaimTemplates:
{{- if .Values.persistence.enabled }}
- metadata:
name: {{ template "fullname" . }}-{{ .Values.persistence.name }}
name: "{{ template "fullname" . }}-{{ .Values.dataPVC.name }}"
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
{{- if .Values.persistence.storageClassName }}
storageClassName: {{ .Values.persistence.storageClassName | quote }}
{{- if .Values.persistence.useDynamicProvisioning }}
# If present, use the storageClassName from the values.yaml, else use the
# default storageClass setup by Kubernetes Administrator
#
# Setting storageClassName to nil means use the default storage class
storageClassName: {{ default nil .Values.dataPVC.storageClassName | quote }}
{{- else }}
# Disable dynamic provisioning
storageClassName: ""
{{- end }}
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
storage: {{ .Values.dataPVC.size | quote }}
{{- end }}
22 changes: 17 additions & 5 deletions charts/ibm-mqadvanced-server-dev/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,45 @@

# license must be set to "accept" to accept the terms of the IBM license
license: "not accepted"

image:
# repository is the container repository to use, which must contain IBM MQ Advanced
# repository is the container repository to use, which must contain IBM MQ Advanced for Developers
repository: ibmcom/mq
# tag is the tag to use for the container repository
tag: 9
# pullSecret is the secret to use when pulling the image from a private registry
pullSecret:
# pullPolicy is either IfNotPresent or Always (https://kubernetes.io/docs/concepts/containers/images/)
pullPolicy: IfNotPresent
# data section specifies settings for the main persistent volume claim, which is used for data in /var/mqm

# persistence section specifies persistence settings which apply to the whole chart
persistence:
# enabled is whether to use Persistent Volumes or not
enabled: true
# name sets part of the name for this persistent volume claim
# useDynamicProvisioning is whether or not to use Storage Classes to dynamically create Persistent Volumes
useDynamicProvisioning: true

# dataPVC section specifies settings for the main Persistent Volume Claim, which is used for data in /var/mqm
dataPVC:
# name sets part of the name for this Persistent Volume Claim
name: "data"
## storageClassName is the name of the storage class to use, or an empty string for no storage class
## storageClassName is the name of the Storage Class to use, or an empty string for no Storage Class
storageClassName: ""
## size is the minimum size of the persistent volume
## size is the minimum size of the Persistent Volume
size: 2Gi

service:
name: qmgr
type: ClusterIP

resources:
limits:
cpu: 500m
memory: 512Mi
requests:
cpu: 500m
memory: 512Mi

# queueManager section specifies settings for the MQ Queue Manager
queueManager:
# name allows you to specify the name to use for the queue manager. Defaults to the Helm release name.
Expand All @@ -52,5 +63,6 @@ queueManager:
adminPassword:
# appPassword sets the password of the app user
appPassword:

# nameOverride can be set to partially override the name of the resources created by this chart
nameOverride:
2 changes: 1 addition & 1 deletion charts/ibm-mqadvanced-server-prod/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
apiVersion: v1
description: IBM MQ queue manager
name: ibm-mqadvanced-server-prod
version: 0.1.0
version: 1.0.0-beta
icon: https://developer.ibm.com/messaging/wp-content/uploads/sites/18/2017/07/IBM-MQ-Square-200.png
19 changes: 13 additions & 6 deletions charts/ibm-mqadvanced-server-prod/templates/stateful-set.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
{{- if .Values.persistence.enabled }}
volumeMounts:
- mountPath: "/mnt/mqm"
name: {{ template "fullname" . }}-{{ .Values.persistence.name }}
name: "{{ template "fullname" . }}-{{ .Values.dataPVC.name }}"
{{- end }}
# Set liveness probe to determine if the queue manager is running
livenessProbe:
Expand All @@ -67,7 +67,7 @@ spec:
exec:
command:
- chkmqready
initialDelaySeconds: 5
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 1
Expand All @@ -79,18 +79,25 @@ spec:
volumeClaimTemplates:
{{- if .Values.persistence.enabled }}
- metadata:
name: {{ template "fullname" . }}-{{ .Values.persistence.name }}
name: "{{ template "fullname" . }}-{{ .Values.dataPVC.name }}"
labels:
app: {{ template "fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
{{- if .Values.persistence.storageClassName }}
storageClassName: {{ .Values.persistence.storageClassName | quote }}
{{- if .Values.persistence.useDynamicProvisioning }}
## If present, use the storageClassName from the values.yaml, else use the
## default storageClass setup by Kubernetes Administrator
##
## Setting storageClassName to nil means use the default storage class
storageClassName: {{ default nil .Values.dataPVC.storageClassName | quote }}
{{- else }}
## Disable dynamic provisioning
storageClassName: ""
{{- end }}
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
storage: {{ .Values.dataPVC.size | quote }}
{{- end }}
21 changes: 17 additions & 4 deletions charts/ibm-mqadvanced-server-prod/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# license must be set to "accept" to accept the terms of the IBM license
license: "not accepted"

image:
# repository is the container repository to use, which must contain IBM MQ Advanced
repository:
Expand All @@ -23,30 +24,42 @@ image:
pullSecret:
# pullPolicy is either IfNotPresent or Always (https://kubernetes.io/docs/concepts/containers/images/)
pullPolicy: IfNotPresent
# persistence section specifies settings for the main persistent volume claim, which is used for data in /var/mqm

# persistence section specifies persistence settings which apply to the whole chart
persistence:
# enabled is whether to use Persistent Volumes or not
enabled: true
# name sets part of the name for this persistent volume claim
# useDynamicProvisioning is whether or not to use Storage Classes to dynamically create Persistent Volumes
useDynamicProvisioning: true

# dataPVC section specifies settings for the main Persistent Volume Claim, which is used for data in /var/mqm
dataPVC:
# name sets part of the name for this Persistent Volume Claim
name: "data"
## storageClassName is the name of the storage class to use, or an empty string for no storage class
# storageClassName is the name of the Storage Class to use, or an empty string for no Storage Class
storageClassName: ""
## size is the minimum size of the persistent volume
# size is the minimum size of the Persistent Volume
size: 2Gi

service:
name: qmgr
type: ClusterIP

resources:
limits:
cpu: 1
memory: 1Gi
requests:
cpu: 1
memory: 1Gi

# queueManager section specifies settings for the MQ Queue Manager
queueManager:
# name allows you to specify the name to use for the queue manager. Defaults to the Helm release name.
name:

# nameOverride can be set to partially override the name of the resources created by this chart
nameOverride:

# livenessDelay should be raised if your system cannot start the Queue Manager in 60 seconds
livenessDelay: 60
17 changes: 17 additions & 0 deletions formatting.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
GREEN="\033[32m"
RED="\033[31m"
BLUE="\033[34m"
PURPLE="\033[35m"
AQUA="\033[36m"

END="\033[0m"

UNDERLINE="\033[4m"
BOLD="\033[1m"

TITLE=$(BLUE)$(BOLD)$(UNDERLINE)

define SPACER


endef
14 changes: 4 additions & 10 deletions test/kubernetes/Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions test/kubernetes/Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
branch = "master"
name = "golang.org/x/sys"

[[constraint]]
branch = "master"
name = "k8s.io/apimachinery"

# The version of client-go corresponds to a specific Kubernetes version
# (e.g. client-go 4.0.0 is for kubernetes 1.7)
# If you change this version, you also need to update the corresponding
# branch for k8s.io/apimachinery (below)
[[constraint]]
name = "k8s.io/client-go"
version = "4.0.0"

[[constraint]]
name = "k8s.io/apimachinery"
branch = "release-1.7"
Loading