Rudi Schlatte 72b2007bc4 Refine deployment process
- Build, upload solver docker image.

- Remove deployment job: the solver is not deployed on the Nebulous
  cluster, but is deployed by SAL on each app cluster.

- Adapt helm chart; SAL might use it to deploy the solver.

- Add AMPL license file contents to nebulous secrets store, pass it in
  via helm charts.  Note that it's ok to run without a license file.

- For testing purposes, add a docker-compose.yaml file

- Pacify hadolint: when installing packages in Dockerfile, specify
  package versions.

- Pacify shellcheck: fix warnings in start-solver.sh

- Pacify podman: do not use heredocs for RUN.

- Remove Spring Boot demo application.

Change-Id: I757a440d09082b5824f36a81cb82d6e5c169a699
2024-03-11 10:23:48 +01:00

69 lines
2.3 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "nebulous-optimiser-solver.fullname" . }}
labels:
{{- include "nebulous-optimiser-solver.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "nebulous-optimiser-solver.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "nebulous-optimiser-solver.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "nebulous-optimiser-solver.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: APPLICATION_ID
- name: ACTIVEMQ_HOST
value: {{ .Values.activemq.ACTIVEMQ_HOST }}
- name: ACTIVEMQ_PORT
value: {{ .Values.activemq.ACTIVEMQ_PORT }}
- name: ACTIVEMQ_USER
value: {{ .Values.activemq.ACTIVEMQ_USER }}
- name: ACTIVEMQ_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.activemqSecret.secretName }}
key: {{ .Values.activemqSecret.secretKey }}
- name: AMPL_LICENSE
valueFrom:
secretKeyRef:
name: {{ .Values.amplLicense.secretName }}
key: {{ .Values.amplLicense.secretKey }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}