You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

  • JS7 can be set up for use with a Helm Chart. Using the Linux-based JS7 images for Docker® containers which ship with a current Alpine base image and OpenJDK.
  • Users deploy JS7 components by creating a Kubernetes deployment object from a deployment YAML file.
    • To this purpose, users have to first install and set up the Kubernetes Cluster see JS7 - How to install a Kubernetes Cluster.
    • With the Helm Chart being up and running users can use values YAML files to deploy JS7 components.

Deployment Files

The YAML sample files for deployment to Kubernetes using Helm are attached to the article.

Download the archive file: buildachart_js7_working.zip

The archive includes the following files.

Deployment of JS7 Components: js7-deployment.yaml with 


js7-deplotment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "buildachart.fullname" . }}
  labels:
    {{- include "buildachart.labels" . | nindent 4 }}
spec:
  {{- if not .Values.autoscaling.enabled }}
  replicas: {{ .Values.replicaCount }}
  {{- end }}
  selector:
    matchLabels:
      {{- include "buildachart.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      {{- with .Values.podAnnotations }}
      annotations:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      labels:
        {{- include "buildachart.selectorLabels" . | nindent 8 }}
    spec:
      {{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      serviceAccountName: {{ include "buildachart.serviceAccountName" . }}
      securityContext:
        {{- toYaml .Values.podSecurityContext | nindent 8 }}
      volumes:
        - name: hibernate-config
          configMap:
            name: hibernate-config
      containers:
        - name: {{ .Chart.Name }}
          securityContext:
            {{- toYaml .Values.securityContext | nindent 12 }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - name: http
              containerPort: {{ .Values.service.port }}
              protocol: TCP
          volumeMounts:
            - name: hibernate-config
              mountPath: /var/sos-berlin.com/js7/joc/resources/joc/
        - name: js7con
          image: "{{ .Values.imageController.repository }}:{{ .Values.imageController.tag | default .Chart.AppVersion }}"
          ports:
            - name: http
              containerPort: {{ .Values.serviceController.port }}
              protocol: TCP
        - name: js7ag
          image: "{{ .Values.imageAgent.repository }}:{{ .Values.imageAgent.tag | default .Chart.AppVersion }}"
          ports:
            - name: http
              containerPort: {{ .Values.serviceAgent.port }}
              protocol: TCP
          resources:
            {{- toYaml .Values.resources | nindent 12 }}
      {{- with .Values.nodeSelector }}
      nodeSelector:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.affinity }}
      affinity:
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- with .Values.tolerations }}
      tolerations:
        {{- toYaml . | nindent 8 }}
      {{- end }}



Deployment of JS7 Components: js7-deployment.yaml


Example for js7-deployment.yaml



  • No labels