diff --git a/k8chart-dev/dataserver/Chart.yaml b/k8chart-dev/dataserver/Chart.yaml new file mode 100644 index 000000000..029057c67 --- /dev/null +++ b/k8chart-dev/dataserver/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: ols4 dataserver deployment +name: ols4 +version: 0.1.0 diff --git a/k8chart-dev/dataserver/templates/ols4-dataserver-deployment.yaml b/k8chart-dev/dataserver/templates/ols4-dataserver-deployment.yaml new file mode 100644 index 000000000..a407c19d4 --- /dev/null +++ b/k8chart-dev/dataserver/templates/ols4-dataserver-deployment.yaml @@ -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 diff --git a/k8chart-dev/dataserver/templates/ols4-dataserver-pvc.yaml b/k8chart-dev/dataserver/templates/ols4-dataserver-pvc.yaml new file mode 100644 index 000000000..049488bfe --- /dev/null +++ b/k8chart-dev/dataserver/templates/ols4-dataserver-pvc.yaml @@ -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 + diff --git a/k8chart-dev/dataserver/templates/ols4-dataserver-service.yaml b/k8chart-dev/dataserver/templates/ols4-dataserver-service.yaml new file mode 100644 index 000000000..c779e375f --- /dev/null +++ b/k8chart-dev/dataserver/templates/ols4-dataserver-service.yaml @@ -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 }} diff --git a/k8chart-dev/dataserver/values.yaml b/k8chart-dev/dataserver/values.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/k8chart-dev/ols4/.helmignore b/k8chart-dev/ols4/.helmignore new file mode 100644 index 000000000..50af03172 --- /dev/null +++ b/k8chart-dev/ols4/.helmignore @@ -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/ diff --git a/k8chart-dev/ols4/Chart.yaml b/k8chart-dev/ols4/Chart.yaml new file mode 100644 index 000000000..70f7ae5f9 --- /dev/null +++ b/k8chart-dev/ols4/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: ols4 deployment +name: ols4 +version: 0.1.0 diff --git a/k8chart-dev/ols4/templates/_helpers.tpl b/k8chart-dev/ols4/templates/_helpers.tpl new file mode 100644 index 000000000..e69de29bb diff --git a/k8chart-dev/ols4/templates/ols4-backend-deployment.yaml b/k8chart-dev/ols4/templates/ols4-backend-deployment.yaml new file mode 100644 index 000000000..ed63c2655 --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-backend-deployment.yaml @@ -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 + diff --git a/k8chart-dev/ols4/templates/ols4-backend-service.yaml b/k8chart-dev/ols4/templates/ols4-backend-service.yaml new file mode 100644 index 000000000..46dfd03d0 --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-backend-service.yaml @@ -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 diff --git a/k8chart-dev/ols4/templates/ols4-configmap.yaml b/k8chart-dev/ols4/templates/ols4-configmap.yaml new file mode 100644 index 000000000..4220e3718 --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-configmap.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-configmap +data: + myvalue: "Hello World" \ No newline at end of file diff --git a/k8chart-dev/ols4/templates/ols4-frontend-deployment.yaml b/k8chart-dev/ols4/templates/ols4-frontend-deployment.yaml new file mode 100644 index 000000000..4fe1aa6a0 --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-frontend-deployment.yaml @@ -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"] + + diff --git a/k8chart-dev/ols4/templates/ols4-frontend-service.yaml b/k8chart-dev/ols4/templates/ols4-frontend-service.yaml new file mode 100644 index 000000000..3720c250d --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-frontend-service.yaml @@ -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 diff --git a/k8chart-dev/ols4/templates/ols4-ingress.yaml b/k8chart-dev/ols4/templates/ols4-ingress.yaml new file mode 100644 index 000000000..576146d2d --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-ingress.yaml @@ -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 + diff --git a/k8chart-dev/ols4/templates/ols4-neo4j-deployment.yaml b/k8chart-dev/ols4/templates/ols4-neo4j-deployment.yaml new file mode 100644 index 000000000..2a2c79d0f --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-neo4j-deployment.yaml @@ -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 diff --git a/k8chart-dev/ols4/templates/ols4-neo4j-pv.yaml b/k8chart-dev/ols4/templates/ols4-neo4j-pv.yaml new file mode 100644 index 000000000..2a3a9abb8 --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-neo4j-pv.yaml @@ -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 + diff --git a/k8chart-dev/ols4/templates/ols4-neo4j-pvc.yaml b/k8chart-dev/ols4/templates/ols4-neo4j-pvc.yaml new file mode 100644 index 000000000..467534422 --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-neo4j-pvc.yaml @@ -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 + diff --git a/k8chart-dev/ols4/templates/ols4-neo4j-service.yaml b/k8chart-dev/ols4/templates/ols4-neo4j-service.yaml new file mode 100644 index 000000000..55f6916b3 --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-neo4j-service.yaml @@ -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 \ No newline at end of file diff --git a/k8chart-dev/ols4/templates/ols4-proxy-configmap.yaml b/k8chart-dev/ols4/templates/ols4-proxy-configmap.yaml new file mode 100644 index 000000000..89fb0f52c --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-proxy-configmap.yaml @@ -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 diff --git a/k8chart-dev/ols4/templates/ols4-solr-deployment.yaml b/k8chart-dev/ols4/templates/ols4-solr-deployment.yaml new file mode 100644 index 000000000..60e3ecc5b --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-solr-deployment.yaml @@ -0,0 +1,41 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-solr + labels: + app: {{ .Release.Name }}-solr +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Release.Name }}-solr + template: + metadata: + labels: + app: {{ .Release.Name }}-solr + spec: + volumes: + - name: {{ .Release.Name }}-solr-storage + persistentVolumeClaim: + claimName: {{ .Release.Name }}-solr-pvc + securityContext: + fsGroup: 8983 + containers: + - name: solr + image: ghcr.io/ebispot/ols4-solr:9.0.0 + volumeMounts: + - mountPath: "/data" + name: {{ .Release.Name }}-solr-storage + command: ["/bin/bash", "-c"] + args: ["echo Downloading data && rm -rf /data/solr && mkdir /data/solr && wget -qO- $SOLR_TARBALL_URL | tar -xz -C /data/ && echo Starting solr && solr-foreground -a -XX:CompileCommand=exclude,com.github.benmanes.caffeine.cache.BoundedLocalCache::put"] + resources: + requests: + memory: 11Gi + env: + - name: SOLR_TARBALL_URL + value: {{.Values.solrTarballUrl}} + - name: SOLR_HOME + value: /data + ports: + - containerPort: 8983 + diff --git a/k8chart-dev/ols4/templates/ols4-solr-pv.yaml b/k8chart-dev/ols4/templates/ols4-solr-pv.yaml new file mode 100644 index 000000000..7a9f4083d --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-solr-pv.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + annotations: + finalizers: + - kubernetes.io/pv-protection + name: ols4-solr-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-1.caas.ebi.ac.uk + persistentVolumeReclaimPolicy: Retain + storageClassName: local-storage + volumeMode: Filesystem + diff --git a/k8chart-dev/ols4/templates/ols4-solr-pvc.yaml b/k8chart-dev/ols4/templates/ols4-solr-pvc.yaml new file mode 100644 index 000000000..954ee1601 --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-solr-pvc.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: ols4-solr-pvc +spec: + storageClassName: local-storage + volumeName: ols4-solr-pv + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 250Gi + diff --git a/k8chart-dev/ols4/templates/ols4-solr-service.yaml b/k8chart-dev/ols4/templates/ols4-solr-service.yaml new file mode 100644 index 000000000..1f18b61c1 --- /dev/null +++ b/k8chart-dev/ols4/templates/ols4-solr-service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-solr + labels: + app: {{ .Release.Name }}-solr +spec: + ports: + - port: 8983 + targetPort: 8983 + name: http + protocol: TCP + selector: + app: {{ .Release.Name }}-solr \ No newline at end of file diff --git a/k8chart-dev/ols4/values.yaml b/k8chart-dev/ols4/values.yaml new file mode 100644 index 000000000..3a0851e2f --- /dev/null +++ b/k8chart-dev/ols4/values.yaml @@ -0,0 +1,6 @@ + +imageTag: dev + +neo4jTarballUrl: http://ols4-dataserver/neo4j.tgz +solrTarballUrl: http://ols4-dataserver/solr.tgz + diff --git a/k8chart-dev/pvcs/Chart.yaml b/k8chart-dev/pvcs/Chart.yaml new file mode 100644 index 000000000..aac8bddd1 --- /dev/null +++ b/k8chart-dev/pvcs/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: ols4 dataserver PVCs +name: ols4 +version: 0.1.0 \ No newline at end of file diff --git a/k8chart-dev/pvcs/values.yaml b/k8chart-dev/pvcs/values.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/k8chart/dataserver/templates/ols4-dataserver-deployment.yaml b/k8chart/dataserver/templates/ols4-dataserver-deployment.yaml index 53b49613d..a80eb47d4 100644 --- a/k8chart/dataserver/templates/ols4-dataserver-deployment.yaml +++ b/k8chart/dataserver/templates/ols4-dataserver-deployment.yaml @@ -16,15 +16,14 @@ spec: spec: affinity: nodeAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 50 - preference: - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - hh-rke-wp-webadmin-47-worker-4.caas.ebi.ac.uk - - hx-rke-wp-webadmin-40-worker-4.caas.ebi.ac.uk + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hh-rke-wp-webadmin-47-worker-4.caas.ebi.ac.uk + - hx-rke-wp-webadmin-40-worker-4.caas.ebi.ac.uk containers: - name: dataserver image: nginx:1.23.3 diff --git a/k8chart/ols4/templates/ols4-backend-deployment.yaml b/k8chart/ols4/templates/ols4-backend-deployment.yaml index 6e476ef00..4b6ebc060 100644 --- a/k8chart/ols4/templates/ols4-backend-deployment.yaml +++ b/k8chart/ols4/templates/ols4-backend-deployment.yaml @@ -16,16 +16,14 @@ spec: spec: affinity: nodeAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 50 - preference: - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - hh-rke-wp-webadmin-47-worker-3.caas.ebi.ac.uk - - hx-rke-wp-webadmin-40-worker-3.caas.ebi.ac.uk - - hh-rke-wp-webadmin-56-worker-3.caas.ebi.ac.uk + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hh-rke-wp-webadmin-47-worker-3.caas.ebi.ac.uk + - hx-rke-wp-webadmin-40-worker-3.caas.ebi.ac.uk containers: - name: web image: ghcr.io/ebispot/ols4-backend:{{.Values.imageTag}} diff --git a/k8chart/ols4/templates/ols4-frontend-deployment.yaml b/k8chart/ols4/templates/ols4-frontend-deployment.yaml index f04c6cf81..8f96057dd 100644 --- a/k8chart/ols4/templates/ols4-frontend-deployment.yaml +++ b/k8chart/ols4/templates/ols4-frontend-deployment.yaml @@ -16,15 +16,14 @@ spec: spec: affinity: nodeAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 50 - preference: - matchExpressions: - - key: kubernetes.io/hostname - operator: In - values: - - hh-rke-wp-webadmin-47-worker-4.caas.ebi.ac.uk - - hx-rke-wp-webadmin-40-worker-4.caas.ebi.ac.uk + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - hh-rke-wp-webadmin-47-worker-4.caas.ebi.ac.uk + - hx-rke-wp-webadmin-40-worker-4.caas.ebi.ac.uk containers: - name: web image: ghcr.io/ebispot/ols4-frontend:{{.Values.imageTag}} diff --git a/k8chart/ols4/templates/ols4-neo4j-pv.yaml b/k8chart/ols4/templates/ols4-neo4j-pv.yaml index 6eb6b1fc3..07056cd12 100644 --- a/k8chart/ols4/templates/ols4-neo4j-pv.yaml +++ b/k8chart/ols4/templates/ols4-neo4j-pv.yaml @@ -21,7 +21,6 @@ spec: values: - hh-rke-wp-webadmin-47-worker-2.caas.ebi.ac.uk - hx-rke-wp-webadmin-40-worker-2.caas.ebi.ac.uk - - hh-rke-wp-webadmin-56-worker-2.caas.ebi.ac.uk persistentVolumeReclaimPolicy: Retain storageClassName: local-storage volumeMode: Filesystem diff --git a/k8chart/ols4/templates/ols4-solr-pv.yaml b/k8chart/ols4/templates/ols4-solr-pv.yaml index 62c32be8a..ff0082343 100644 --- a/k8chart/ols4/templates/ols4-solr-pv.yaml +++ b/k8chart/ols4/templates/ols4-solr-pv.yaml @@ -21,7 +21,6 @@ spec: values: - hh-rke-wp-webadmin-47-worker-1.caas.ebi.ac.uk - hx-rke-wp-webadmin-40-worker-1.caas.ebi.ac.uk - - hh-rke-wp-webadmin-56-worker-1.caas.ebi.ac.uk persistentVolumeReclaimPolicy: Retain storageClassName: local-storage volumeMode: Filesystem