Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes Artifacts for OB Deployment Pattern 1 with MySQL support for UK specification #13

Merged
merged 7 commits into from
Nov 4, 2019
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion databases/mysql-ob/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
dependencies:
- name: mysql
version: "1.3.0"
version: "1.4.0"
repository: "https://kubernetes-charts.storage.googleapis.com"
19 changes: 19 additions & 0 deletions ob-pattern-1/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
appVersion: "1.4.0"
description: A Helm chart for the deployment of WSO2 Open Banking Pattern 1 Deployment
name: ob-pattern-1
version: 1.4.0-1
10 changes: 10 additions & 0 deletions ob-pattern-1/auth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"auths": {
"reg.id": {
"username": "reg.username",
"password": "reg.password",
"email": "reg.email",
"auth": "reg.auth"
}
}
}
24 changes: 24 additions & 0 deletions ob-pattern-1/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- $obam_hostname := .Values.wso2.deployment.wso2obam.hostname }}
{{- $obkm_hostname := .Values.wso2.deployment.wso2obkm.hostname }}

Thank you for installing WSO2 Open Banking Solution.

Please follow these steps to access the Management Console in the environment.

1. Obtain the external IP (`EXTERNAL-IP`) of the Ingress resources by listing down the Kubernetes Ingresses.

kubectl get ing -n {{ .Release.Namespace }}

NAME HOSTS ADDRESS PORTS AGE
wso2-obam-ingress {{ $obam_hostname }} <EXTERNAL-IP> 80, 443 3m
wso2-obkm-ingress {{ $obkm_hostname }} <EXTERNAL-IP> 80, 443 3m

2. Add the above hosts as an entries in /etc/hosts file as follows:

<EXTERNAL-IP> {{ $obam_hostname }}
<EXTERNAL-IP> {{ $obkm_hostname }}

3. Navigate to https://{{ $obam_hostname }}/carbon, https://{{ $obkm_hostname }}/carbon in your browser of choice.


Please refer the official documentation at https://docs.wso2.com/display/OB140 for additional information on WSO2 Open Banking.
45 changes: 45 additions & 0 deletions ob-pattern-1/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "ob-pattern-1.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "ob-pattern-1.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "ob-pattern-1.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Common labels
*/}}
{{- define "ob-pattern-1.labels" -}}
app.kubernetes.io/name: {{ include "ob-pattern-1.name" . }}
helm.sh/chart: {{ include "ob-pattern-1.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}
38 changes: 38 additions & 0 deletions ob-pattern-1/templates/obam-server-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: wso2-obam-ingress
namespace: wso2
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/affinity: "cookie"
nginx.ingress.kubernetes.io/session-cookie-name: "route"
nginx.ingress.kubernetes.io/session-cookie-hash: "sha1"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
tls:
- hosts:
- wso2-obam
rules:
- host: {{ .Values.wso2.deployment.wso2obam.hostname }}
http:
paths:
- path: /
backend:
serviceName: wso2-obam-service
servicePort: 9443
93 changes: 93 additions & 0 deletions ob-pattern-1/templates/obam/obam-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: apps/v1
kind: Deployment
metadata:
name: wso2-obam-deployment
namespace: wso2
spec:
replicas: 1
minReadySeconds: 30
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
deployment: wso2-obam
template:
metadata:
labels:
deployment: wso2-obam
spec:
containers:
- name: wso2-obam
image: docker.wso2.com/wso2-obam:1.4.0
KalanaDananjaya marked this conversation as resolved.
Show resolved Hide resolved
livenessProbe:
exec:
command:
- /bin/sh
- -c
- nc -z localhost 9443
initialDelaySeconds: 250
periodSeconds: 10
readinessProbe:
exec:
command:
- /bin/sh
- -c
- nc -z localhost 9443
initialDelaySeconds: 250
periodSeconds: 10
lifecycle:
preStop:
exec:
command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/wso2server.sh stop']
imagePullPolicy: Always
securityContext:
runAsUser: 802
ports:
- containerPort: 9763
protocol: TCP
- containerPort: 9443
protocol: TCP
- containerPort: 9999
protocol: TCP
- containerPort: 11111
protocol: TCP
- containerPort: 8280
protocol: TCP
- containerPort: 8243
protocol: TCP
- containerPort: 5672
protocol: TCP
- containerPort: 9711
protocol: TCP
- containerPort: 9611
protocol: TCP
- containerPort: 7711
protocol: TCP
- containerPort: 7611
protocol: TCP
- containerPort: 10397
protocol: TCP
- containerPort: 9099
protocol: TCP
serviceAccountName: "wso2svc-account"
imagePullSecrets:
- name: wso2ob-deployment-creds


31 changes: 31 additions & 0 deletions ob-pattern-1/templates/obam/obam-server-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
KalanaDananjaya marked this conversation as resolved.
Show resolved Hide resolved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: Service
metadata:
name: wso2-obam-service
namespace: wso2
spec:
selector:
deployment: wso2-obam
ports:
- name: servlet-http
port: 9763
targetPort: 9763
protocol: TCP
- name: servlet-https
port: 9443
targetPort: 9443
protocol: TCP
38 changes: 38 additions & 0 deletions ob-pattern-1/templates/obkm-server-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: wso2-obkm-ingress
namespace: wso2
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/affinity: "cookie"
nginx.ingress.kubernetes.io/session-cookie-name: "route"
nginx.ingress.kubernetes.io/session-cookie-hash: "sha1"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
tls:
- hosts:
- wso2-obkm
rules:
- host: {{ .Values.wso2.deployment.wso2obkm.hostname }}
http:
paths:
- path: /
backend:
serviceName: wso2-obkm-service
servicePort: 9446
71 changes: 71 additions & 0 deletions ob-pattern-1/templates/obkm/obkm-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: apps/v1
kind: Deployment
metadata:
name: wso2-obkm-deployment
namespace: wso2
spec:
replicas: 1
minReadySeconds: 30
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
deployment: wso2-obkm
template:
metadata:
labels:
deployment: wso2-obkm
spec:
containers:
- name: wso2-obkm
image: docker.wso2.com/wso2-obkm:1.4.0
livenessProbe:
exec:
command:
- /bin/sh
- -c
- nc -z localhost 9446
initialDelaySeconds: 250
periodSeconds: 10
readinessProbe:
exec:
command:
- /bin/sh
- -c
- nc -z localhost 9446
initialDelaySeconds: 250
periodSeconds: 10
lifecycle:
preStop:
exec:
command: ['sh', '-c', '${WSO2_SERVER_HOME}/bin/wso2server.sh stop']
imagePullPolicy: Always
securityContext:
runAsUser: 802
ports:
- containerPort: 9763
protocol: TCP
- containerPort: 9446
protocol: TCP
serviceAccountName: "wso2svc-account"
imagePullSecrets:
- name: wso2ob-deployment-creds


KalanaDananjaya marked this conversation as resolved.
Show resolved Hide resolved
Loading