Skip to content

Commit

Permalink
Merge pull request #460 from EBISPOT/issue-449
Browse files Browse the repository at this point in the history
issue-449: create separate k8s config for dev cluster
  • Loading branch information
serjoshua authored Aug 8, 2023
2 parents f4c4c42 + 98b2b66 commit fdadedb
Show file tree
Hide file tree
Showing 31 changed files with 478 additions and 30 deletions.
5 changes: 5 additions & 0 deletions k8chart-dev/dataserver/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: ols4 dataserver deployment
name: ols4
version: 0.1.0
40 changes: 40 additions & 0 deletions k8chart-dev/dataserver/templates/ols4-dataserver-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
app: {{ .Release.Name }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- hh-rke-wp-webadmin-56-worker-1.caas.ebi.ac.uk
containers:
- name: dataserver
image: nginx:1.23.3
ports:
- containerPort: 80
volumeMounts:
- name: {{.Release.Name}}-data
mountPath: "/usr/share/nginx/html"
resources:
requests:
memory: 2Gi
volumes:
- name: {{.Release.Name}}-data
persistentVolumeClaim:
claimName: {{.Release.Name}}-pvc
13 changes: 13 additions & 0 deletions k8chart-dev/dataserver/templates/ols4-dataserver-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
name: {{ .Release.Name }}-pvc
spec:
storageClassName: standard-nfs-production
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 80Gi

14 changes: 14 additions & 0 deletions k8chart-dev/dataserver/templates/ols4-dataserver-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
labels:
app: {{ .Release.Name }}
spec:
ports:
- port: 80
targetPort: 80
name: http
protocol: TCP
selector:
app: {{ .Release.Name }}
Empty file.
22 changes: 22 additions & 0 deletions k8chart-dev/ols4/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
5 changes: 5 additions & 0 deletions k8chart-dev/ols4/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: ols4 deployment
name: ols4
version: 0.1.0
Empty file.
44 changes: 44 additions & 0 deletions k8chart-dev/ols4/templates/ols4-backend-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-backend
labels:
app: {{ .Release.Name }}-backend
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}-backend
template:
metadata:
labels:
app: {{ .Release.Name }}-backend
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- hh-rke-wp-webadmin-56-worker-3.caas.ebi.ac.uk
containers:
- name: web
image: ghcr.io/ebispot/ols4-backend:{{.Values.imageTag}}
imagePullPolicy: Always
ports:
- containerPort: 8080
resources:
requests:
memory: 14Gi
env:
- name: OLS_SOLR_HOST
value: http://{{ .Release.Name }}-solr:8983
- name: OLS_NEO4J_HOST
value: bolt://{{ .Release.Name }}-neo4j:7687
- name: SERVER_SERVLET_CONTEXT_PATH
value: /ols4
- name: JAVA_OPTIONS
value: -Xmx6G

13 changes: 13 additions & 0 deletions k8chart-dev/ols4/templates/ols4-backend-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-backend
labels:
app: {{ .Release.Name }}-backend
spec:
type: NodePort
ports:
- name: "application"
port: 8080
selector:
app: {{ .Release.Name }}-backend
6 changes: 6 additions & 0 deletions k8chart-dev/ols4/templates/ols4-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-configmap
data:
myvalue: "Hello World"
46 changes: 46 additions & 0 deletions k8chart-dev/ols4/templates/ols4-frontend-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-frontend
labels:
app: {{ .Release.Name }}-frontend
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}-frontend
template:
metadata:
labels:
app: {{ .Release.Name }}-frontend
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- hh-rke-wp-webadmin-56-worker-2.caas.ebi.ac.uk
containers:
- name: web
image: ghcr.io/ebispot/ols4-frontend:{{.Values.imageTag}}
imagePullPolicy: Always
resources:
requests:
cpu: 2
memory: 4G
ports:
- containerPort: 8080
env:
- name: REACT_APP_APIURL
value: https://www.ebi.ac.uk/ols4/
- name: PUBLIC_URL
value: /ols4
- name: OLS_MINIFY
value: 'true'
command: ["/bin/bash", "-c"]
args: ["/opt/ols4-frontend/entrypoint.dockersh"]


13 changes: 13 additions & 0 deletions k8chart-dev/ols4/templates/ols4-frontend-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-frontend
labels:
app: {{ .Release.Name }}-frontend
spec:
type: NodePort
ports:
- name: "application"
port: 8080
selector:
app: {{ .Release.Name }}-frontend
18 changes: 18 additions & 0 deletions k8chart-dev/ols4/templates/ols4-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Release.Name }}-frontend
port:
number: 8081

43 changes: 43 additions & 0 deletions k8chart-dev/ols4/templates/ols4-neo4j-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}-neo4j
labels:
app: {{ .Release.Name }}-neo4j
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}-neo4j
template:
metadata:
labels:
app: {{ .Release.Name }}-neo4j
spec:
volumes:
- name: {{ .Release.Name }}-neo4j-storage
persistentVolumeClaim:
claimName: {{ .Release.Name }}-neo4j-pvc
containers:
- name: neo4j
image: ghcr.io/ebispot/ols4-neo4j:4.4.9-community
volumeMounts:
- mountPath: "/data"
name: {{ .Release.Name }}-neo4j-storage
command: ["/bin/bash", "-c"]
args: ["rm -rf /data/* && wget -qO- $NEO4J_TARBALL_URL | tar -xz -C /data/ && tini -g -- /startup/docker-entrypoint.sh neo4j"]
resources:
requests:
memory: 20Gi
env:
- name: NEO4J_HEAP_MEMORY
value: 10g
- name: NEO4J_dbms_memory_heap_maxSize
value: 8g
- name: NEO4J_TARBALL_URL
value: {{.Values.neo4jTarballUrl}}
- name: NEO4J_AUTH
value: none
ports:
- containerPort: 7474
- containerPort: 7687
26 changes: 26 additions & 0 deletions k8chart-dev/ols4/templates/ols4-neo4j-pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
finalizers:
- kubernetes.io/pv-protection
name: ols4-neo4j-pv
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 250Gi
local:
path: /var/local-disk
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- hh-rke-wp-webadmin-56-worker-2.caas.ebi.ac.uk
persistentVolumeReclaimPolicy: Retain
storageClassName: local-storage
volumeMode: Filesystem

13 changes: 13 additions & 0 deletions k8chart-dev/ols4/templates/ols4-neo4j-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ols4-neo4j-pvc
spec:
storageClassName: local-storage
volumeName: ols4-neo4j-pv
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 250Gi

18 changes: 18 additions & 0 deletions k8chart-dev/ols4/templates/ols4-neo4j-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-neo4j
labels:
app: {{ .Release.Name }}-neo4j
spec:
ports:
- port: 7474
targetPort: 7474
name: http
protocol: TCP
- port: 7687
targetPort: 7687
name: bolt
protocol: TCP
selector:
app: {{ .Release.Name }}-neo4j
10 changes: 10 additions & 0 deletions k8chart-dev/ols4/templates/ols4-proxy-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-proxy-configmap
data:
HTTP_PROXY: http://hx-wwwcache.ebi.ac.uk:3128
HTTPS_PROXY: http://hx-wwwcache.ebi.ac.uk:3128
http_proxy: http://hx-wwwcache.ebi.ac.uk:3128
https_proxy: http://hx-wwwcache.ebi.ac.uk:3128
no_proxy: localhost,.cluster.local
Loading

0 comments on commit fdadedb

Please sign in to comment.