From b20f2de6c30ff7b1e0d51308aa7ce5b727bda415 Mon Sep 17 00:00:00 2001 From: vjvsblty <78815203+vjvsblty@users.noreply.github.com> Date: Thu, 2 Dec 2021 21:08:02 +0530 Subject: [PATCH 1/6] Add files via upload --- vc-app/Chart.yaml | 15 +++ vc-app/Readme.md | 29 +++++ vc-app/charts/ai-pipeline/Chart.yaml | 6 + .../charts/ai-pipeline/templates/_helpers.tpl | 62 ++++++++++ .../ai-pipeline/templates/configmap.yaml | 72 ++++++++++++ .../ai-pipeline/templates/deployment.yaml | 107 +++++++++++++++++ vc-app/charts/ai-pipeline/templates/hpa.yaml | 28 +++++ .../ai-pipeline/templates/serviceaccount.yaml | 12 ++ vc-app/charts/ai-pipeline/values.yaml | 51 ++++++++ vc-app/charts/vclite/Chart.yaml | 6 + vc-app/charts/vclite/templates/_helpers.tpl | 62 ++++++++++ .../charts/vclite/templates/deployment.yaml | 109 ++++++++++++++++++ vc-app/charts/vclite/templates/hpa.yaml | 28 +++++ .../vclite/templates/serviceaccount.yaml | 12 ++ vc-app/charts/vclite/values.yaml | 46 ++++++++ vc-app/templates/_helpers.tpl | 62 ++++++++++ vc-app/values.yaml | 27 +++++ 17 files changed, 734 insertions(+) create mode 100644 vc-app/Chart.yaml create mode 100644 vc-app/Readme.md create mode 100644 vc-app/charts/ai-pipeline/Chart.yaml create mode 100644 vc-app/charts/ai-pipeline/templates/_helpers.tpl create mode 100644 vc-app/charts/ai-pipeline/templates/configmap.yaml create mode 100644 vc-app/charts/ai-pipeline/templates/deployment.yaml create mode 100644 vc-app/charts/ai-pipeline/templates/hpa.yaml create mode 100644 vc-app/charts/ai-pipeline/templates/serviceaccount.yaml create mode 100644 vc-app/charts/ai-pipeline/values.yaml create mode 100644 vc-app/charts/vclite/Chart.yaml create mode 100644 vc-app/charts/vclite/templates/_helpers.tpl create mode 100644 vc-app/charts/vclite/templates/deployment.yaml create mode 100644 vc-app/charts/vclite/templates/hpa.yaml create mode 100644 vc-app/charts/vclite/templates/serviceaccount.yaml create mode 100644 vc-app/charts/vclite/values.yaml create mode 100644 vc-app/templates/_helpers.tpl create mode 100644 vc-app/values.yaml diff --git a/vc-app/Chart.yaml b/vc-app/Chart.yaml new file mode 100644 index 00000000..db3e0418 --- /dev/null +++ b/vc-app/Chart.yaml @@ -0,0 +1,15 @@ +apiVersion: v2 +name: vc-app +description: A Helm chart for Vsblty Vision Captor application + +type: application + +version: 0.1.0 + +appVersion: "1.16.0" + +dependencies: + - name: ai-pipeline + condition: ai-pipeline.enabled + - name: vclite + condition: vclite.enabled \ No newline at end of file diff --git a/vc-app/Readme.md b/vc-app/Readme.md new file mode 100644 index 00000000..5f62c1b3 --- /dev/null +++ b/vc-app/Readme.md @@ -0,0 +1,29 @@ +#vc-app is the vision captor helm chart with 2 services as below: + 1. ai pipeline. + 2. vclite. + +#Before deploying the application we require k3s to be installed on the machine where we want to deploy charts. + +#On the host machine we need to create 3 folders as below and need to place data into it(VSBLTY need to provide data for models & gallery while other folders can be kept empty) + + 1.mkdir -p /home/vedge/models + 2.mkdir -p /home/vedge/gallery + 3.mkdir -p /home/vedge/videos + 4.mkdir -p /root/.Xauthority + 5.mkdir -p /home/vclite/Usage + 6.mkdir -p /home/vclite/KioskServicesMedia + +#In root values.yaml file of vc-app chart we have couple of things to be filled before deployment. + 1.ai-pipeline.device.accessToken : It'll be generated when the camera will be registered to vsblty portal (manually) and that need to copy in values.yaml file.(VSBLTY can give before deployment). + + 2. ai-pipeline.camera.rtsp : It's the camera rtsp stream url. + + 3. vclite.display.EndpointId: It's endpoint created in vsblty cms portal application (VSBLTY can give before deployment). + + 4. vclite.display.BaseCmsUrl: It's vsblty cms portal url where we have playlist to be played on device.(VSBLTY can give before deployment). + + +#Once we have all the above things set up we can deploy by following command. + + helm install vc-app vc-app/ -n vsblty + (where vsblty is namespace in k3s) diff --git a/vc-app/charts/ai-pipeline/Chart.yaml b/vc-app/charts/ai-pipeline/Chart.yaml new file mode 100644 index 00000000..402c1b89 --- /dev/null +++ b/vc-app/charts/ai-pipeline/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: ai-pipeline +description: A Helm chart for vsblty ai pipeline +type: application +version: 0.1.0 +appVersion: 1.16.0 diff --git a/vc-app/charts/ai-pipeline/templates/_helpers.tpl b/vc-app/charts/ai-pipeline/templates/_helpers.tpl new file mode 100644 index 00000000..2ae86102 --- /dev/null +++ b/vc-app/charts/ai-pipeline/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "ai-pipeline.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 "ai-pipeline.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 "ai-pipeline.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "ai-pipeline.labels" -}} +helm.sh/chart: {{ include "ai-pipeline.chart" . }} +{{ include "ai-pipeline.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "ai-pipeline.selectorLabels" -}} +app.kubernetes.io/name: {{ include "ai-pipeline.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ai-pipeline.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "ai-pipeline.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/vc-app/charts/ai-pipeline/templates/configmap.yaml b/vc-app/charts/ai-pipeline/templates/configmap.yaml new file mode 100644 index 00000000..27ac79fc --- /dev/null +++ b/vc-app/charts/ai-pipeline/templates/configmap.yaml @@ -0,0 +1,72 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-json-volume +data: + config.json: |- + { + "default": { + "vclite": { + "hostUrl": "{{ .Values.vcapp.dns }}", + "hostPort": "{{ .Values.vcapp.port }}" + }, + "logLevel": "DEBUG", + "pipeline": { + "template": [ + "rtspsrc location={input} ! rtph264depay ! decodebin ! videoconvert ! video/x-raw,format=BGRx !", + "gvadetect model={faceDetection[model]} model-proc={faceDetection[proc]} device={faceDetection[device]} ! gvatrack ! queue !", + "gvaclassify reclassify-interval=5 model={headPose[model]} device={headPose[device]} batch-size=1 pre-process-backend=opencv object-class=face ! queue !", + "gvaclassify reclassify-interval=5 model={ageGender[model]} device={ageGender[device]} batch-size=1 pre-process-backend=opencv object-class=face ! queue name=frame-process !", + "videoconvert name=videoconvert ! video/x-raw,format=NV12 ! autovideosink name=autovideosink" + ], + "params": { + "faceDetection": { + "model": "/home/vedge/models/face-detection-adas-0001/FP32/face-detection-adas-0001.xml", + "proc": "/home/vedge/models/face-detection-adas-0001/PROC/face-detection-adas-0001.json", + "device": "CPU" + }, + "ageGender": { + "model": "/home/vedge/models/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml", + "device": "CPU" + }, + "headPose": { + "model": "/home/vedge/models/head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml", + "device": "CPU" + }, + "reidThreshold": 0.6 + } + } + }, + "cameras": { + "camerap-1": { + "logLevel": "DEBUG", + "cloudCredential": "{{ .Values.device.accessToken }}", + "cloudEnv": "DEV", + "pipeline": { + "params": { + "input": "{{ .Values.camera.rtsp }}" + } + }, + "services": [ + { + "type": "age-gender-counting", + "pipelineElement": "frame-process", + "objectType": [ + "face" + ], + "layerType": [ + [ + "prob", + "age_conv3" + ] + ], + "alwaysCount": true, + "data_interval": 10, + "yaw_threshold": 30, + "pitch_threshold": 30, + "roll_threshold": 30 + } + ] + } + } + } \ No newline at end of file diff --git a/vc-app/charts/ai-pipeline/templates/deployment.yaml b/vc-app/charts/ai-pipeline/templates/deployment.yaml new file mode 100644 index 00000000..df631cba --- /dev/null +++ b/vc-app/charts/ai-pipeline/templates/deployment.yaml @@ -0,0 +1,107 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "ai-pipeline.fullname" . }} + labels: + {{- include "ai-pipeline.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + strategy: + type: Recreate + selector: + matchLabels: + {{- include "ai-pipeline.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "ai-pipeline.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "ai-pipeline.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + - name: config-map-volume + configMap: + name: config-json-volume + - name: gallery-map-volume + hostPath: + path: /home/vedge/gallery + type: Directory + - name: media-map-volume + hostPath: + path: /home/vedge/videos + type: Directory + - name: models-volume + hostPath: + path: /home/vedge/models + type: Directory + - name: x11-vol + hostPath: + path: /tmp + type: Directory + - name: var-temp + hostPath: + path: /var/tmp + type: Directory + - name: var-dev + hostPath: + path: /dev + type: Directory + hostNetwork: true + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + command: + - python3 + - /home/vedge/ai-pipeline/main.py + - -c + - /home/vedge/config/config.json + - -id + - camerap-1 + env: + - name: DISPLAY + value: "{{ .Values.display.displayName }}" + - name: PYTHONUNBUFFERED + value: "{{ .Values.display.pythonVar }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - mountPath: /home/vedge/config + name: config-map-volume + - mountPath: /home/vedge/gallery + name: gallery-map-volume + - mountPath: /home/vedge/videos + name: media-map-volume + - mountPath: /home/vedge/models + name: models-volume + - mountPath: /tmp + name: x11-vol + - mountPath: /var/tmp + name: var-temp + - mountPath: /dev + name: var-dev + 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 }} diff --git a/vc-app/charts/ai-pipeline/templates/hpa.yaml b/vc-app/charts/ai-pipeline/templates/hpa.yaml new file mode 100644 index 00000000..ad2ae609 --- /dev/null +++ b/vc-app/charts/ai-pipeline/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "ai-pipeline.fullname" . }} + labels: + {{- include "ai-pipeline.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "ai-pipeline.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/vc-app/charts/ai-pipeline/templates/serviceaccount.yaml b/vc-app/charts/ai-pipeline/templates/serviceaccount.yaml new file mode 100644 index 00000000..8b9c3111 --- /dev/null +++ b/vc-app/charts/ai-pipeline/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "ai-pipeline.serviceAccountName" . }} + labels: + {{- include "ai-pipeline.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/vc-app/charts/ai-pipeline/values.yaml b/vc-app/charts/ai-pipeline/values.yaml new file mode 100644 index 00000000..8c748e39 --- /dev/null +++ b/vc-app/charts/ai-pipeline/values.yaml @@ -0,0 +1,51 @@ +replicaCount: 1 + +image: + repository: vsblty.azurecr.io/vedge/ai-pipeline + pullPolicy: Always + tag: "1.1.18" + +device: + accessToken: "" + +camera: + rtsp: "" + +vcapp: + dns: "localhost" + port: 5051 + +imagePullSecrets: [name: regcred] +nameOverride: "" +fullnameOverride: "" + +display: + displayName: unix:0 + pythonVar: 1 + +serviceAccount: + create: true + annotations: {} + name: "" + +podAnnotations: {} + +podSecurityContext: {} + +securityContext: + privileged: true + +resources: {} + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/vc-app/charts/vclite/Chart.yaml b/vc-app/charts/vclite/Chart.yaml new file mode 100644 index 00000000..5a667174 --- /dev/null +++ b/vc-app/charts/vclite/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: vclite +description: A Helm chart for vsblty vclite app +type: application +version: 0.1.0 +appVersion: 1.16.0 diff --git a/vc-app/charts/vclite/templates/_helpers.tpl b/vc-app/charts/vclite/templates/_helpers.tpl new file mode 100644 index 00000000..9fa71261 --- /dev/null +++ b/vc-app/charts/vclite/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "vclite.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 "vclite.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 "vclite.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "vclite.labels" -}} +helm.sh/chart: {{ include "vclite.chart" . }} +{{ include "vclite.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "vclite.selectorLabels" -}} +app.kubernetes.io/name: {{ include "vclite.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "vclite.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "vclite.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/vc-app/charts/vclite/templates/deployment.yaml b/vc-app/charts/vclite/templates/deployment.yaml new file mode 100644 index 00000000..f3d0d47d --- /dev/null +++ b/vc-app/charts/vclite/templates/deployment.yaml @@ -0,0 +1,109 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "vclite.fullname" . }} + labels: + {{- include "vclite.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + strategy: + type: Recreate + selector: + matchLabels: + {{- include "vclite.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "vclite.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "vclite.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + - name: dshm + emptyDir: + medium: Memory + - name: x-authority-volume + hostPath: + path: /root/.Xauthority + type: Directory + - name: tmp-x11-volume + hostPath: + path: /tmp/.X11-unix/ + type: Directory + - name: etc-timezone-volume + hostPath: + path: /etc/timezone + type: File + - name: etc-localtime-volume + hostPath: + path: /etc/localtime + type: File + - name: usage + hostPath: + path: /home/vclite/Usage + type: Directory + - name: kiosk-services-media + hostPath: + path: /home/vclite/KioskServicesMedia + type: Directory + hostNetwork: true + 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: + - containerPort: 8001 + name: port-8001 + protocol: TCP + - containerPort: 5051 + name: port-5051 + protocol: TCP + env: + - name: DISPLAY + value: "{{ .Values.display.displayName }}" + - name: WorkerServiceSetup__EndpointId + value: "{{ .Values.display.EndpointId }}" + - name: WorkerServiceSetup__BaseCmsUrl + value: "{{ .Values.display.BaseCmsUrl }}" + volumeMounts: + - mountPath: /dev/shm + name: dshm + - mountPath: /root/.Xauthority + name: x-authority-volume + - mountPath: /tmp/.X11-unix/ + name: tmp-x11-volume + - mountPath: /etc/timezone + name: etc-timezone-volume + - mountPath: /etc/localtime + name: etc-localtime-volume + - mountPath: /opt/Vsblty/KioskFramework/Usage + name: usage + - mountPath: /opt/Vsblty/KioskServicesMedia/ + name: kiosk-services-media + 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 }} diff --git a/vc-app/charts/vclite/templates/hpa.yaml b/vc-app/charts/vclite/templates/hpa.yaml new file mode 100644 index 00000000..6078ca90 --- /dev/null +++ b/vc-app/charts/vclite/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "vclite.fullname" . }} + labels: + {{- include "vclite.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "vclite.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/vc-app/charts/vclite/templates/serviceaccount.yaml b/vc-app/charts/vclite/templates/serviceaccount.yaml new file mode 100644 index 00000000..8a4d8485 --- /dev/null +++ b/vc-app/charts/vclite/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "vclite.serviceAccountName" . }} + labels: + {{- include "vclite.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/vc-app/charts/vclite/values.yaml b/vc-app/charts/vclite/values.yaml new file mode 100644 index 00000000..4d395c6e --- /dev/null +++ b/vc-app/charts/vclite/values.yaml @@ -0,0 +1,46 @@ +replicaCount: 1 + +image: + repository: vsblty.azurecr.io/vsblty/vclight + pullPolicy: IfNotPresent + tag: "1.7.17" + +display: + displayName: unix:0 + EndpointId: + BaseCmsUrl: "" + +imagePullSecrets: [name: regcred] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + create: true + annotations: {} + name: "" + +podAnnotations: {} + +podSecurityContext: {} + +securityContext: + privileged: true + +resources: + limits: + memory: "3072Mi" + requests: + memory: "3072Mi" + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/vc-app/templates/_helpers.tpl b/vc-app/templates/_helpers.tpl new file mode 100644 index 00000000..8ba0de8f --- /dev/null +++ b/vc-app/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "vc-app.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 "vc-app.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 "vc-app.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "vc-app.labels" -}} +helm.sh/chart: {{ include "vc-app.chart" . }} +{{ include "vc-app.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "vc-app.selectorLabels" -}} +app.kubernetes.io/name: {{ include "vc-app.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "vc-app.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "vc-app.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/vc-app/values.yaml b/vc-app/values.yaml new file mode 100644 index 00000000..ef3dc9fc --- /dev/null +++ b/vc-app/values.yaml @@ -0,0 +1,27 @@ +ai-pipeline: + enabled: true + image: + repository: vsblty.azurecr.io/vedge/ai-pipeline + pullPolicy: IfNotPresent + tag: "1.2.75" + display: + displayName: unix:0 + pythonVar: 1 + device: + accessToken: "" + camera: + rtsp: "" + vcapp: + dns: "localhost" + port: 5051 + +vclite: + enabled: true + image: + repository: vsblty.azurecr.io/vsblty/vclight + pullPolicy: IfNotPresent + tag: "1.7.26" + display: + displayName: unix:0 + EndpointId: + BaseCmsUrl: "" \ No newline at end of file From df123278f511872192fae8e84685dd02c9c2da75 Mon Sep 17 00:00:00 2001 From: Vijay Jejurkar Date: Tue, 7 Dec 2021 19:34:30 +0530 Subject: [PATCH 2/6] updated data-captor chart --- data-captor/Chart.yaml | 6 ++ data-captor/templates/_helpers.tpl | 62 +++++++++++++ data-captor/templates/configmap.yaml | 69 ++++++++++++++ data-captor/templates/deployment.yaml | 107 ++++++++++++++++++++++ data-captor/templates/hpa.yaml | 28 ++++++ data-captor/templates/serviceaccount.yaml | 12 +++ data-captor/values.yaml | 47 ++++++++++ vc-app/charts/ai-pipeline/values.yaml | 2 +- 8 files changed, 332 insertions(+), 1 deletion(-) create mode 100644 data-captor/Chart.yaml create mode 100644 data-captor/templates/_helpers.tpl create mode 100644 data-captor/templates/configmap.yaml create mode 100644 data-captor/templates/deployment.yaml create mode 100644 data-captor/templates/hpa.yaml create mode 100644 data-captor/templates/serviceaccount.yaml create mode 100644 data-captor/values.yaml diff --git a/data-captor/Chart.yaml b/data-captor/Chart.yaml new file mode 100644 index 00000000..fda0639c --- /dev/null +++ b/data-captor/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: ai-pipeline +description: A Helm chart for vsblty ai pipeline(data captor application) +type: application +version: 0.1.0 +appVersion: 1.16.0 diff --git a/data-captor/templates/_helpers.tpl b/data-captor/templates/_helpers.tpl new file mode 100644 index 00000000..1958b1dd --- /dev/null +++ b/data-captor/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "ai-pipeline.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 "ai-pipeline.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 "ai-pipeline.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "ai-pipeline.labels" -}} +helm.sh/chart: {{ include "ai-pipeline.chart" . }} +{{ include "ai-pipeline.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "ai-pipeline.selectorLabels" -}} +app.kubernetes.io/name: {{ include "ai-pipeline.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ai-pipeline.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "ai-pipeline.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/data-captor/templates/configmap.yaml b/data-captor/templates/configmap.yaml new file mode 100644 index 00000000..bc0f4ff9 --- /dev/null +++ b/data-captor/templates/configmap.yaml @@ -0,0 +1,69 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-json-volume +data: + config.json: |- + { + "default": { + "logLevel": "INFO", + "pipeline": { + "template": [ + "rtspsrc location={input} ! rtph264depay ! queue ! avdec_h264 ! videoconvert ! video/x-raw,format=BGRx !", + "gvadetect model={personDetection[model]} threshold=0.8 model_proc={personDetection[proc]} device={personDetection[device]} ! queue !", + "gvadetect model={faceDetection[model]} threshold=0.8 reshape=true reshape-width=600 reshape-height=600 model-proc={faceDetection[proc]} device={faceDetection[device]} ! gvatrack ! queue !", + "gvaclassify reclassify-interval=5 model={landmark[model]} model-proc={landmark[proc]} device={landmark[device]} batch-size=1 pre-process-backend=opencv object-class=face ! queue !", + "gvaclassify reclassify-interval=5 model={faceReidentification[model]} model-proc={faceReidentification[proc]} device={faceReidentification[device]} batch-size=1 pre-process-backend=opencv object-class=face ! queue !", + "gvaidentify cosine-distance-threshold={reidThreshold} gallery=/home/vedge/gallery/gallery.json ! queue name=frame-process !", + "videoconvert ! video/x-raw,format=NV12 ! fpsdisplaysink" + ], + "params": { + "reidThreshold": 0.6, + "faceDetection": { + "model": "/home/vedge/models/face-detection-adas-0001/FP32/face-detection-adas-0001.xml", + "proc": "/home/vedge/models/face-detection-adas-0001/PROC/face-detection-adas-0001.json", + "device": "CPU" + }, + "personDetection": { + "model": "/home/vedge/models/person-detection-0201/FP32/person-detection-0201.xml", + "proc": "/home/vedge/models/person-detection-0201/PROC/person-detection-0201.json", + "device": "CPU" + }, + "landmark": { + "model": "/home/vedge/models/landmarks-regression-retail-0009/FP32/landmarks-regression-retail-0009.xml", + "proc": "/home/vedge/models/landmarks-regression-retail-0009/PROC/landmarks-regression-retail-0009.json", + "device": "CPU" + }, + "faceReidentification": { + "model": "/home/vedge/models/face-reidentification-retail-0095/FP32/face-reidentification-retail-0095.xml", + "proc": "/home/vedge/models/face-reidentification-retail-0095/PROC/face-reidentification-retail-0095.json", + "device": "CPU" + } + } + } + }, + "cameras": { + "camerap-1": { + "logLevel": "DEBUG", + "cloudCredential": "{{ .Values.device.accessToken }}", + "cloudEnv": "DEV", + "pipeline": { + "params": { + "input": "{{ .Values.camera.rtsp }}" + } + }, + "services": [ + { + "type": "face-recognition", + "pipelineElement": "frame-process", + "objectType": "face", + "outputImageSize": [ + 240, + 180 + ], + "trackedFaceDuration": 10 + } + ] + } + } + } \ No newline at end of file diff --git a/data-captor/templates/deployment.yaml b/data-captor/templates/deployment.yaml new file mode 100644 index 00000000..447fd83e --- /dev/null +++ b/data-captor/templates/deployment.yaml @@ -0,0 +1,107 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "ai-pipeline.fullname" . }} + labels: + {{- include "ai-pipeline.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + strategy: + type: Recreate + selector: + matchLabels: + {{- include "ai-pipeline.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "ai-pipeline.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "ai-pipeline.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + - name: config-map-volume + configMap: + name: config-json-volume + - name: gallery-map-volume + hostPath: + path: /home/vedge/gallery + type: Directory + - name: media-map-volume + hostPath: + path: /home/vedge/videos + type: Directory + - name: models-volume + hostPath: + path: /home/vedge/models + type: Directory + - name: x11-vol + hostPath: + path: /tmp + type: Directory + - name: var-temp + hostPath: + path: /var/tmp + type: Directory + - name: var-dev + hostPath: + path: /dev + type: Directory + hostNetwork: true + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + command: + - python3 + - /home/vedge/ai-pipeline/main.py + - -c + - /home/vedge/config/config.json + - -id + - camerap-1 + env: + - name: DISPLAY + value: "{{ .Values.display.displayName }}" + - name: PYTHONUNBUFFERED + value: "{{ .Values.display.pythonVar }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - mountPath: /home/vedge/config + name: config-map-volume + - mountPath: /home/vedge/gallery + name: gallery-map-volume + - mountPath: /home/vedge/videos + name: media-map-volume + - mountPath: /home/vedge/models + name: models-volume + - mountPath: /tmp + name: x11-vol + - mountPath: /var/tmp + name: var-temp + - mountPath: /dev + name: var-dev + 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 }} diff --git a/data-captor/templates/hpa.yaml b/data-captor/templates/hpa.yaml new file mode 100644 index 00000000..6dc406f6 --- /dev/null +++ b/data-captor/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "ai-pipeline.fullname" . }} + labels: + {{- include "ai-pipeline.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "ai-pipeline.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/data-captor/templates/serviceaccount.yaml b/data-captor/templates/serviceaccount.yaml new file mode 100644 index 00000000..5772f523 --- /dev/null +++ b/data-captor/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "ai-pipeline.serviceAccountName" . }} + labels: + {{- include "ai-pipeline.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/data-captor/values.yaml b/data-captor/values.yaml new file mode 100644 index 00000000..49ae2ae8 --- /dev/null +++ b/data-captor/values.yaml @@ -0,0 +1,47 @@ +replicaCount: 1 + +image: + repository: vsblty.azurecr.io/vedge/ai-pipeline + pullPolicy: IfNotPresent + tag: "1.2.75" + +device: + accessToken: "" + +camera: + rtsp: "" + +imagePullSecrets: [name: regcred] +nameOverride: "" +fullnameOverride: "" + +display: + displayName: unix:0 + pythonVar: 1 + +serviceAccount: + create: true + annotations: {} + name: "" + +podAnnotations: {} + +podSecurityContext: {} + +securityContext: + privileged: true + +resources: {} + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/vc-app/charts/ai-pipeline/values.yaml b/vc-app/charts/ai-pipeline/values.yaml index 8c748e39..a7a85b8c 100644 --- a/vc-app/charts/ai-pipeline/values.yaml +++ b/vc-app/charts/ai-pipeline/values.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: vsblty.azurecr.io/vedge/ai-pipeline - pullPolicy: Always + pullPolicy: IfNotPresent tag: "1.1.18" device: From e1a8faa4701968ab4a1930288a994db3d063fbbd Mon Sep 17 00:00:00 2001 From: Vijay Jejurkar Date: Tue, 7 Dec 2021 19:38:25 +0530 Subject: [PATCH 3/6] added readme --- data-captor/Readme.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 data-captor/Readme.md diff --git a/data-captor/Readme.md b/data-captor/Readme.md new file mode 100644 index 00000000..f2a2a55c --- /dev/null +++ b/data-captor/Readme.md @@ -0,0 +1,21 @@ +#data-captor is the vision captor helm chart with data-captor + +#Before deploying the application we require k3s to be installed on the machine where we want to deploy charts. + +#On the host machine we need to create 3 folders as below and need to place data into it(VSBLTY need to provide data for models & gallery while other folders can be kept empty) + + 1.mkdir -p /home/vedge/models + 2.mkdir -p /home/vedge/gallery + 3.mkdir -p /home/vedge/videos + + +#In values.yaml file of data-captor chart we have couple of things to be filled before deployment. + 1.device.accessToken : It'll be generated when the camera will be registered to vsblty portal (manually) and that need to copy in values.yaml file.(VSBLTY can give before deployment). + + 2. camera.rtsp : It's the camera rtsp stream url. + + + +#Once we have all the above things set up we can deploy by following command. + + helm install data-captor data-captor/ From 00abf6c218a923858af017e04e7067f47bcfce92 Mon Sep 17 00:00:00 2001 From: Vijay Jejurkar Date: Tue, 7 Dec 2021 19:41:10 +0530 Subject: [PATCH 4/6] updated the path --- .../data-captor}/Chart.yaml | 0 .../data-captor}/Readme.md | 0 .../data-captor}/templates/_helpers.tpl | 0 .../data-captor}/templates/configmap.yaml | 0 .../data-captor}/templates/deployment.yaml | 0 .../data-captor}/templates/hpa.yaml | 0 .../templates/serviceaccount.yaml | 0 .../data-captor}/values.yaml | 0 {vc-app => applications/vc-app}/Chart.yaml | 0 {vc-app => applications/vc-app}/Readme.md | 58 ++--- .../vc-app}/charts/ai-pipeline/Chart.yaml | 12 +- .../charts/ai-pipeline/templates/_helpers.tpl | 124 +++++----- .../ai-pipeline/templates/configmap.yaml | 142 ++++++------ .../ai-pipeline/templates/deployment.yaml | 214 ++++++++--------- .../charts/ai-pipeline/templates/hpa.yaml | 56 ++--- .../ai-pipeline/templates/serviceaccount.yaml | 24 +- .../vc-app}/charts/ai-pipeline/values.yaml | 102 ++++---- .../vc-app}/charts/vclite/Chart.yaml | 12 +- .../charts/vclite/templates/_helpers.tpl | 124 +++++----- .../charts/vclite/templates/deployment.yaml | 218 +++++++++--------- .../vc-app}/charts/vclite/templates/hpa.yaml | 56 ++--- .../vclite/templates/serviceaccount.yaml | 24 +- .../vc-app}/charts/vclite/values.yaml | 92 ++++---- .../vc-app}/templates/_helpers.tpl | 0 {vc-app => applications/vc-app}/values.yaml | 0 25 files changed, 629 insertions(+), 629 deletions(-) rename {data-captor => applications/data-captor}/Chart.yaml (100%) rename {data-captor => applications/data-captor}/Readme.md (100%) rename {data-captor => applications/data-captor}/templates/_helpers.tpl (100%) rename {data-captor => applications/data-captor}/templates/configmap.yaml (100%) rename {data-captor => applications/data-captor}/templates/deployment.yaml (100%) rename {data-captor => applications/data-captor}/templates/hpa.yaml (100%) rename {data-captor => applications/data-captor}/templates/serviceaccount.yaml (100%) rename {data-captor => applications/data-captor}/values.yaml (100%) rename {vc-app => applications/vc-app}/Chart.yaml (100%) rename {vc-app => applications/vc-app}/Readme.md (97%) rename {vc-app => applications/vc-app}/charts/ai-pipeline/Chart.yaml (95%) rename {vc-app => applications/vc-app}/charts/ai-pipeline/templates/_helpers.tpl (96%) rename {vc-app => applications/vc-app}/charts/ai-pipeline/templates/configmap.yaml (97%) rename {vc-app => applications/vc-app}/charts/ai-pipeline/templates/deployment.yaml (96%) rename {vc-app => applications/vc-app}/charts/ai-pipeline/templates/hpa.yaml (97%) rename {vc-app => applications/vc-app}/charts/ai-pipeline/templates/serviceaccount.yaml (96%) rename {vc-app => applications/vc-app}/charts/ai-pipeline/values.yaml (92%) rename {vc-app => applications/vc-app}/charts/vclite/Chart.yaml (95%) rename {vc-app => applications/vc-app}/charts/vclite/templates/_helpers.tpl (96%) rename {vc-app => applications/vc-app}/charts/vclite/templates/deployment.yaml (96%) rename {vc-app => applications/vc-app}/charts/vclite/templates/hpa.yaml (97%) rename {vc-app => applications/vc-app}/charts/vclite/templates/serviceaccount.yaml (96%) rename {vc-app => applications/vc-app}/charts/vclite/values.yaml (93%) rename {vc-app => applications/vc-app}/templates/_helpers.tpl (100%) rename {vc-app => applications/vc-app}/values.yaml (100%) diff --git a/data-captor/Chart.yaml b/applications/data-captor/Chart.yaml similarity index 100% rename from data-captor/Chart.yaml rename to applications/data-captor/Chart.yaml diff --git a/data-captor/Readme.md b/applications/data-captor/Readme.md similarity index 100% rename from data-captor/Readme.md rename to applications/data-captor/Readme.md diff --git a/data-captor/templates/_helpers.tpl b/applications/data-captor/templates/_helpers.tpl similarity index 100% rename from data-captor/templates/_helpers.tpl rename to applications/data-captor/templates/_helpers.tpl diff --git a/data-captor/templates/configmap.yaml b/applications/data-captor/templates/configmap.yaml similarity index 100% rename from data-captor/templates/configmap.yaml rename to applications/data-captor/templates/configmap.yaml diff --git a/data-captor/templates/deployment.yaml b/applications/data-captor/templates/deployment.yaml similarity index 100% rename from data-captor/templates/deployment.yaml rename to applications/data-captor/templates/deployment.yaml diff --git a/data-captor/templates/hpa.yaml b/applications/data-captor/templates/hpa.yaml similarity index 100% rename from data-captor/templates/hpa.yaml rename to applications/data-captor/templates/hpa.yaml diff --git a/data-captor/templates/serviceaccount.yaml b/applications/data-captor/templates/serviceaccount.yaml similarity index 100% rename from data-captor/templates/serviceaccount.yaml rename to applications/data-captor/templates/serviceaccount.yaml diff --git a/data-captor/values.yaml b/applications/data-captor/values.yaml similarity index 100% rename from data-captor/values.yaml rename to applications/data-captor/values.yaml diff --git a/vc-app/Chart.yaml b/applications/vc-app/Chart.yaml similarity index 100% rename from vc-app/Chart.yaml rename to applications/vc-app/Chart.yaml diff --git a/vc-app/Readme.md b/applications/vc-app/Readme.md similarity index 97% rename from vc-app/Readme.md rename to applications/vc-app/Readme.md index 5f62c1b3..a732c393 100644 --- a/vc-app/Readme.md +++ b/applications/vc-app/Readme.md @@ -1,29 +1,29 @@ -#vc-app is the vision captor helm chart with 2 services as below: - 1. ai pipeline. - 2. vclite. - -#Before deploying the application we require k3s to be installed on the machine where we want to deploy charts. - -#On the host machine we need to create 3 folders as below and need to place data into it(VSBLTY need to provide data for models & gallery while other folders can be kept empty) - - 1.mkdir -p /home/vedge/models - 2.mkdir -p /home/vedge/gallery - 3.mkdir -p /home/vedge/videos - 4.mkdir -p /root/.Xauthority - 5.mkdir -p /home/vclite/Usage - 6.mkdir -p /home/vclite/KioskServicesMedia - -#In root values.yaml file of vc-app chart we have couple of things to be filled before deployment. - 1.ai-pipeline.device.accessToken : It'll be generated when the camera will be registered to vsblty portal (manually) and that need to copy in values.yaml file.(VSBLTY can give before deployment). - - 2. ai-pipeline.camera.rtsp : It's the camera rtsp stream url. - - 3. vclite.display.EndpointId: It's endpoint created in vsblty cms portal application (VSBLTY can give before deployment). - - 4. vclite.display.BaseCmsUrl: It's vsblty cms portal url where we have playlist to be played on device.(VSBLTY can give before deployment). - - -#Once we have all the above things set up we can deploy by following command. - - helm install vc-app vc-app/ -n vsblty - (where vsblty is namespace in k3s) +#vc-app is the vision captor helm chart with 2 services as below: + 1. ai pipeline. + 2. vclite. + +#Before deploying the application we require k3s to be installed on the machine where we want to deploy charts. + +#On the host machine we need to create 3 folders as below and need to place data into it(VSBLTY need to provide data for models & gallery while other folders can be kept empty) + + 1.mkdir -p /home/vedge/models + 2.mkdir -p /home/vedge/gallery + 3.mkdir -p /home/vedge/videos + 4.mkdir -p /root/.Xauthority + 5.mkdir -p /home/vclite/Usage + 6.mkdir -p /home/vclite/KioskServicesMedia + +#In root values.yaml file of vc-app chart we have couple of things to be filled before deployment. + 1.ai-pipeline.device.accessToken : It'll be generated when the camera will be registered to vsblty portal (manually) and that need to copy in values.yaml file.(VSBLTY can give before deployment). + + 2. ai-pipeline.camera.rtsp : It's the camera rtsp stream url. + + 3. vclite.display.EndpointId: It's endpoint created in vsblty cms portal application (VSBLTY can give before deployment). + + 4. vclite.display.BaseCmsUrl: It's vsblty cms portal url where we have playlist to be played on device.(VSBLTY can give before deployment). + + +#Once we have all the above things set up we can deploy by following command. + + helm install vc-app vc-app/ -n vsblty + (where vsblty is namespace in k3s) diff --git a/vc-app/charts/ai-pipeline/Chart.yaml b/applications/vc-app/charts/ai-pipeline/Chart.yaml similarity index 95% rename from vc-app/charts/ai-pipeline/Chart.yaml rename to applications/vc-app/charts/ai-pipeline/Chart.yaml index 402c1b89..258419f7 100644 --- a/vc-app/charts/ai-pipeline/Chart.yaml +++ b/applications/vc-app/charts/ai-pipeline/Chart.yaml @@ -1,6 +1,6 @@ -apiVersion: v2 -name: ai-pipeline -description: A Helm chart for vsblty ai pipeline -type: application -version: 0.1.0 -appVersion: 1.16.0 +apiVersion: v2 +name: ai-pipeline +description: A Helm chart for vsblty ai pipeline +type: application +version: 0.1.0 +appVersion: 1.16.0 diff --git a/vc-app/charts/ai-pipeline/templates/_helpers.tpl b/applications/vc-app/charts/ai-pipeline/templates/_helpers.tpl similarity index 96% rename from vc-app/charts/ai-pipeline/templates/_helpers.tpl rename to applications/vc-app/charts/ai-pipeline/templates/_helpers.tpl index 2ae86102..1958b1dd 100644 --- a/vc-app/charts/ai-pipeline/templates/_helpers.tpl +++ b/applications/vc-app/charts/ai-pipeline/templates/_helpers.tpl @@ -1,62 +1,62 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "ai-pipeline.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 "ai-pipeline.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 "ai-pipeline.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "ai-pipeline.labels" -}} -helm.sh/chart: {{ include "ai-pipeline.chart" . }} -{{ include "ai-pipeline.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "ai-pipeline.selectorLabels" -}} -app.kubernetes.io/name: {{ include "ai-pipeline.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "ai-pipeline.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "ai-pipeline.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} +{{/* +Expand the name of the chart. +*/}} +{{- define "ai-pipeline.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 "ai-pipeline.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 "ai-pipeline.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "ai-pipeline.labels" -}} +helm.sh/chart: {{ include "ai-pipeline.chart" . }} +{{ include "ai-pipeline.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "ai-pipeline.selectorLabels" -}} +app.kubernetes.io/name: {{ include "ai-pipeline.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ai-pipeline.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "ai-pipeline.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/vc-app/charts/ai-pipeline/templates/configmap.yaml b/applications/vc-app/charts/ai-pipeline/templates/configmap.yaml similarity index 97% rename from vc-app/charts/ai-pipeline/templates/configmap.yaml rename to applications/vc-app/charts/ai-pipeline/templates/configmap.yaml index 27ac79fc..7436f6a5 100644 --- a/vc-app/charts/ai-pipeline/templates/configmap.yaml +++ b/applications/vc-app/charts/ai-pipeline/templates/configmap.yaml @@ -1,72 +1,72 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: config-json-volume -data: - config.json: |- - { - "default": { - "vclite": { - "hostUrl": "{{ .Values.vcapp.dns }}", - "hostPort": "{{ .Values.vcapp.port }}" - }, - "logLevel": "DEBUG", - "pipeline": { - "template": [ - "rtspsrc location={input} ! rtph264depay ! decodebin ! videoconvert ! video/x-raw,format=BGRx !", - "gvadetect model={faceDetection[model]} model-proc={faceDetection[proc]} device={faceDetection[device]} ! gvatrack ! queue !", - "gvaclassify reclassify-interval=5 model={headPose[model]} device={headPose[device]} batch-size=1 pre-process-backend=opencv object-class=face ! queue !", - "gvaclassify reclassify-interval=5 model={ageGender[model]} device={ageGender[device]} batch-size=1 pre-process-backend=opencv object-class=face ! queue name=frame-process !", - "videoconvert name=videoconvert ! video/x-raw,format=NV12 ! autovideosink name=autovideosink" - ], - "params": { - "faceDetection": { - "model": "/home/vedge/models/face-detection-adas-0001/FP32/face-detection-adas-0001.xml", - "proc": "/home/vedge/models/face-detection-adas-0001/PROC/face-detection-adas-0001.json", - "device": "CPU" - }, - "ageGender": { - "model": "/home/vedge/models/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml", - "device": "CPU" - }, - "headPose": { - "model": "/home/vedge/models/head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml", - "device": "CPU" - }, - "reidThreshold": 0.6 - } - } - }, - "cameras": { - "camerap-1": { - "logLevel": "DEBUG", - "cloudCredential": "{{ .Values.device.accessToken }}", - "cloudEnv": "DEV", - "pipeline": { - "params": { - "input": "{{ .Values.camera.rtsp }}" - } - }, - "services": [ - { - "type": "age-gender-counting", - "pipelineElement": "frame-process", - "objectType": [ - "face" - ], - "layerType": [ - [ - "prob", - "age_conv3" - ] - ], - "alwaysCount": true, - "data_interval": 10, - "yaw_threshold": 30, - "pitch_threshold": 30, - "roll_threshold": 30 - } - ] - } - } +apiVersion: v1 +kind: ConfigMap +metadata: + name: config-json-volume +data: + config.json: |- + { + "default": { + "vclite": { + "hostUrl": "{{ .Values.vcapp.dns }}", + "hostPort": "{{ .Values.vcapp.port }}" + }, + "logLevel": "DEBUG", + "pipeline": { + "template": [ + "rtspsrc location={input} ! rtph264depay ! decodebin ! videoconvert ! video/x-raw,format=BGRx !", + "gvadetect model={faceDetection[model]} model-proc={faceDetection[proc]} device={faceDetection[device]} ! gvatrack ! queue !", + "gvaclassify reclassify-interval=5 model={headPose[model]} device={headPose[device]} batch-size=1 pre-process-backend=opencv object-class=face ! queue !", + "gvaclassify reclassify-interval=5 model={ageGender[model]} device={ageGender[device]} batch-size=1 pre-process-backend=opencv object-class=face ! queue name=frame-process !", + "videoconvert name=videoconvert ! video/x-raw,format=NV12 ! autovideosink name=autovideosink" + ], + "params": { + "faceDetection": { + "model": "/home/vedge/models/face-detection-adas-0001/FP32/face-detection-adas-0001.xml", + "proc": "/home/vedge/models/face-detection-adas-0001/PROC/face-detection-adas-0001.json", + "device": "CPU" + }, + "ageGender": { + "model": "/home/vedge/models/age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml", + "device": "CPU" + }, + "headPose": { + "model": "/home/vedge/models/head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml", + "device": "CPU" + }, + "reidThreshold": 0.6 + } + } + }, + "cameras": { + "camerap-1": { + "logLevel": "DEBUG", + "cloudCredential": "{{ .Values.device.accessToken }}", + "cloudEnv": "DEV", + "pipeline": { + "params": { + "input": "{{ .Values.camera.rtsp }}" + } + }, + "services": [ + { + "type": "age-gender-counting", + "pipelineElement": "frame-process", + "objectType": [ + "face" + ], + "layerType": [ + [ + "prob", + "age_conv3" + ] + ], + "alwaysCount": true, + "data_interval": 10, + "yaw_threshold": 30, + "pitch_threshold": 30, + "roll_threshold": 30 + } + ] + } + } } \ No newline at end of file diff --git a/vc-app/charts/ai-pipeline/templates/deployment.yaml b/applications/vc-app/charts/ai-pipeline/templates/deployment.yaml similarity index 96% rename from vc-app/charts/ai-pipeline/templates/deployment.yaml rename to applications/vc-app/charts/ai-pipeline/templates/deployment.yaml index df631cba..447fd83e 100644 --- a/vc-app/charts/ai-pipeline/templates/deployment.yaml +++ b/applications/vc-app/charts/ai-pipeline/templates/deployment.yaml @@ -1,107 +1,107 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "ai-pipeline.fullname" . }} - labels: - {{- include "ai-pipeline.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - strategy: - type: Recreate - selector: - matchLabels: - {{- include "ai-pipeline.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "ai-pipeline.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "ai-pipeline.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - volumes: - - name: config-map-volume - configMap: - name: config-json-volume - - name: gallery-map-volume - hostPath: - path: /home/vedge/gallery - type: Directory - - name: media-map-volume - hostPath: - path: /home/vedge/videos - type: Directory - - name: models-volume - hostPath: - path: /home/vedge/models - type: Directory - - name: x11-vol - hostPath: - path: /tmp - type: Directory - - name: var-temp - hostPath: - path: /var/tmp - type: Directory - - name: var-dev - hostPath: - path: /dev - type: Directory - hostNetwork: true - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - command: - - python3 - - /home/vedge/ai-pipeline/main.py - - -c - - /home/vedge/config/config.json - - -id - - camerap-1 - env: - - name: DISPLAY - value: "{{ .Values.display.displayName }}" - - name: PYTHONUNBUFFERED - value: "{{ .Values.display.pythonVar }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - volumeMounts: - - mountPath: /home/vedge/config - name: config-map-volume - - mountPath: /home/vedge/gallery - name: gallery-map-volume - - mountPath: /home/vedge/videos - name: media-map-volume - - mountPath: /home/vedge/models - name: models-volume - - mountPath: /tmp - name: x11-vol - - mountPath: /var/tmp - name: var-temp - - mountPath: /dev - name: var-dev - 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 }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "ai-pipeline.fullname" . }} + labels: + {{- include "ai-pipeline.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + strategy: + type: Recreate + selector: + matchLabels: + {{- include "ai-pipeline.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "ai-pipeline.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "ai-pipeline.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + - name: config-map-volume + configMap: + name: config-json-volume + - name: gallery-map-volume + hostPath: + path: /home/vedge/gallery + type: Directory + - name: media-map-volume + hostPath: + path: /home/vedge/videos + type: Directory + - name: models-volume + hostPath: + path: /home/vedge/models + type: Directory + - name: x11-vol + hostPath: + path: /tmp + type: Directory + - name: var-temp + hostPath: + path: /var/tmp + type: Directory + - name: var-dev + hostPath: + path: /dev + type: Directory + hostNetwork: true + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + command: + - python3 + - /home/vedge/ai-pipeline/main.py + - -c + - /home/vedge/config/config.json + - -id + - camerap-1 + env: + - name: DISPLAY + value: "{{ .Values.display.displayName }}" + - name: PYTHONUNBUFFERED + value: "{{ .Values.display.pythonVar }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - mountPath: /home/vedge/config + name: config-map-volume + - mountPath: /home/vedge/gallery + name: gallery-map-volume + - mountPath: /home/vedge/videos + name: media-map-volume + - mountPath: /home/vedge/models + name: models-volume + - mountPath: /tmp + name: x11-vol + - mountPath: /var/tmp + name: var-temp + - mountPath: /dev + name: var-dev + 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 }} diff --git a/vc-app/charts/ai-pipeline/templates/hpa.yaml b/applications/vc-app/charts/ai-pipeline/templates/hpa.yaml similarity index 97% rename from vc-app/charts/ai-pipeline/templates/hpa.yaml rename to applications/vc-app/charts/ai-pipeline/templates/hpa.yaml index ad2ae609..6dc406f6 100644 --- a/vc-app/charts/ai-pipeline/templates/hpa.yaml +++ b/applications/vc-app/charts/ai-pipeline/templates/hpa.yaml @@ -1,28 +1,28 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "ai-pipeline.fullname" . }} - labels: - {{- include "ai-pipeline.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "ai-pipeline.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "ai-pipeline.fullname" . }} + labels: + {{- include "ai-pipeline.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "ai-pipeline.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/vc-app/charts/ai-pipeline/templates/serviceaccount.yaml b/applications/vc-app/charts/ai-pipeline/templates/serviceaccount.yaml similarity index 96% rename from vc-app/charts/ai-pipeline/templates/serviceaccount.yaml rename to applications/vc-app/charts/ai-pipeline/templates/serviceaccount.yaml index 8b9c3111..5772f523 100644 --- a/vc-app/charts/ai-pipeline/templates/serviceaccount.yaml +++ b/applications/vc-app/charts/ai-pipeline/templates/serviceaccount.yaml @@ -1,12 +1,12 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "ai-pipeline.serviceAccountName" . }} - labels: - {{- include "ai-pipeline.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "ai-pipeline.serviceAccountName" . }} + labels: + {{- include "ai-pipeline.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/vc-app/charts/ai-pipeline/values.yaml b/applications/vc-app/charts/ai-pipeline/values.yaml similarity index 92% rename from vc-app/charts/ai-pipeline/values.yaml rename to applications/vc-app/charts/ai-pipeline/values.yaml index a7a85b8c..775ea9de 100644 --- a/vc-app/charts/ai-pipeline/values.yaml +++ b/applications/vc-app/charts/ai-pipeline/values.yaml @@ -1,51 +1,51 @@ -replicaCount: 1 - -image: - repository: vsblty.azurecr.io/vedge/ai-pipeline - pullPolicy: IfNotPresent - tag: "1.1.18" - -device: - accessToken: "" - -camera: - rtsp: "" - -vcapp: - dns: "localhost" - port: 5051 - -imagePullSecrets: [name: regcred] -nameOverride: "" -fullnameOverride: "" - -display: - displayName: unix:0 - pythonVar: 1 - -serviceAccount: - create: true - annotations: {} - name: "" - -podAnnotations: {} - -podSecurityContext: {} - -securityContext: - privileged: true - -resources: {} - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} +replicaCount: 1 + +image: + repository: vsblty.azurecr.io/vedge/ai-pipeline + pullPolicy: IfNotPresent + tag: "1.1.18" + +device: + accessToken: "" + +camera: + rtsp: "" + +vcapp: + dns: "localhost" + port: 5051 + +imagePullSecrets: [name: regcred] +nameOverride: "" +fullnameOverride: "" + +display: + displayName: unix:0 + pythonVar: 1 + +serviceAccount: + create: true + annotations: {} + name: "" + +podAnnotations: {} + +podSecurityContext: {} + +securityContext: + privileged: true + +resources: {} + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/vc-app/charts/vclite/Chart.yaml b/applications/vc-app/charts/vclite/Chart.yaml similarity index 95% rename from vc-app/charts/vclite/Chart.yaml rename to applications/vc-app/charts/vclite/Chart.yaml index 5a667174..465451be 100644 --- a/vc-app/charts/vclite/Chart.yaml +++ b/applications/vc-app/charts/vclite/Chart.yaml @@ -1,6 +1,6 @@ -apiVersion: v2 -name: vclite -description: A Helm chart for vsblty vclite app -type: application -version: 0.1.0 -appVersion: 1.16.0 +apiVersion: v2 +name: vclite +description: A Helm chart for vsblty vclite app +type: application +version: 0.1.0 +appVersion: 1.16.0 diff --git a/vc-app/charts/vclite/templates/_helpers.tpl b/applications/vc-app/charts/vclite/templates/_helpers.tpl similarity index 96% rename from vc-app/charts/vclite/templates/_helpers.tpl rename to applications/vc-app/charts/vclite/templates/_helpers.tpl index 9fa71261..8e296436 100644 --- a/vc-app/charts/vclite/templates/_helpers.tpl +++ b/applications/vc-app/charts/vclite/templates/_helpers.tpl @@ -1,62 +1,62 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "vclite.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 "vclite.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 "vclite.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "vclite.labels" -}} -helm.sh/chart: {{ include "vclite.chart" . }} -{{ include "vclite.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "vclite.selectorLabels" -}} -app.kubernetes.io/name: {{ include "vclite.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "vclite.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "vclite.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} +{{/* +Expand the name of the chart. +*/}} +{{- define "vclite.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 "vclite.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 "vclite.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "vclite.labels" -}} +helm.sh/chart: {{ include "vclite.chart" . }} +{{ include "vclite.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "vclite.selectorLabels" -}} +app.kubernetes.io/name: {{ include "vclite.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "vclite.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "vclite.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/vc-app/charts/vclite/templates/deployment.yaml b/applications/vc-app/charts/vclite/templates/deployment.yaml similarity index 96% rename from vc-app/charts/vclite/templates/deployment.yaml rename to applications/vc-app/charts/vclite/templates/deployment.yaml index f3d0d47d..cb9544e0 100644 --- a/vc-app/charts/vclite/templates/deployment.yaml +++ b/applications/vc-app/charts/vclite/templates/deployment.yaml @@ -1,109 +1,109 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "vclite.fullname" . }} - labels: - {{- include "vclite.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - strategy: - type: Recreate - selector: - matchLabels: - {{- include "vclite.selectorLabels" . | nindent 6 }} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "vclite.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "vclite.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - volumes: - - name: dshm - emptyDir: - medium: Memory - - name: x-authority-volume - hostPath: - path: /root/.Xauthority - type: Directory - - name: tmp-x11-volume - hostPath: - path: /tmp/.X11-unix/ - type: Directory - - name: etc-timezone-volume - hostPath: - path: /etc/timezone - type: File - - name: etc-localtime-volume - hostPath: - path: /etc/localtime - type: File - - name: usage - hostPath: - path: /home/vclite/Usage - type: Directory - - name: kiosk-services-media - hostPath: - path: /home/vclite/KioskServicesMedia - type: Directory - hostNetwork: true - 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: - - containerPort: 8001 - name: port-8001 - protocol: TCP - - containerPort: 5051 - name: port-5051 - protocol: TCP - env: - - name: DISPLAY - value: "{{ .Values.display.displayName }}" - - name: WorkerServiceSetup__EndpointId - value: "{{ .Values.display.EndpointId }}" - - name: WorkerServiceSetup__BaseCmsUrl - value: "{{ .Values.display.BaseCmsUrl }}" - volumeMounts: - - mountPath: /dev/shm - name: dshm - - mountPath: /root/.Xauthority - name: x-authority-volume - - mountPath: /tmp/.X11-unix/ - name: tmp-x11-volume - - mountPath: /etc/timezone - name: etc-timezone-volume - - mountPath: /etc/localtime - name: etc-localtime-volume - - mountPath: /opt/Vsblty/KioskFramework/Usage - name: usage - - mountPath: /opt/Vsblty/KioskServicesMedia/ - name: kiosk-services-media - 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 }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "vclite.fullname" . }} + labels: + {{- include "vclite.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + strategy: + type: Recreate + selector: + matchLabels: + {{- include "vclite.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "vclite.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "vclite.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + volumes: + - name: dshm + emptyDir: + medium: Memory + - name: x-authority-volume + hostPath: + path: /root/.Xauthority + type: Directory + - name: tmp-x11-volume + hostPath: + path: /tmp/.X11-unix/ + type: Directory + - name: etc-timezone-volume + hostPath: + path: /etc/timezone + type: File + - name: etc-localtime-volume + hostPath: + path: /etc/localtime + type: File + - name: usage + hostPath: + path: /home/vclite/Usage + type: Directory + - name: kiosk-services-media + hostPath: + path: /home/vclite/KioskServicesMedia + type: Directory + hostNetwork: true + 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: + - containerPort: 8001 + name: port-8001 + protocol: TCP + - containerPort: 5051 + name: port-5051 + protocol: TCP + env: + - name: DISPLAY + value: "{{ .Values.display.displayName }}" + - name: WorkerServiceSetup__EndpointId + value: "{{ .Values.display.EndpointId }}" + - name: WorkerServiceSetup__BaseCmsUrl + value: "{{ .Values.display.BaseCmsUrl }}" + volumeMounts: + - mountPath: /dev/shm + name: dshm + - mountPath: /root/.Xauthority + name: x-authority-volume + - mountPath: /tmp/.X11-unix/ + name: tmp-x11-volume + - mountPath: /etc/timezone + name: etc-timezone-volume + - mountPath: /etc/localtime + name: etc-localtime-volume + - mountPath: /opt/Vsblty/KioskFramework/Usage + name: usage + - mountPath: /opt/Vsblty/KioskServicesMedia/ + name: kiosk-services-media + 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 }} diff --git a/vc-app/charts/vclite/templates/hpa.yaml b/applications/vc-app/charts/vclite/templates/hpa.yaml similarity index 97% rename from vc-app/charts/vclite/templates/hpa.yaml rename to applications/vc-app/charts/vclite/templates/hpa.yaml index 6078ca90..114a20ab 100644 --- a/vc-app/charts/vclite/templates/hpa.yaml +++ b/applications/vc-app/charts/vclite/templates/hpa.yaml @@ -1,28 +1,28 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "vclite.fullname" . }} - labels: - {{- include "vclite.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "vclite.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "vclite.fullname" . }} + labels: + {{- include "vclite.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "vclite.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/vc-app/charts/vclite/templates/serviceaccount.yaml b/applications/vc-app/charts/vclite/templates/serviceaccount.yaml similarity index 96% rename from vc-app/charts/vclite/templates/serviceaccount.yaml rename to applications/vc-app/charts/vclite/templates/serviceaccount.yaml index 8a4d8485..2eaa95b6 100644 --- a/vc-app/charts/vclite/templates/serviceaccount.yaml +++ b/applications/vc-app/charts/vclite/templates/serviceaccount.yaml @@ -1,12 +1,12 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "vclite.serviceAccountName" . }} - labels: - {{- include "vclite.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "vclite.serviceAccountName" . }} + labels: + {{- include "vclite.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/vc-app/charts/vclite/values.yaml b/applications/vc-app/charts/vclite/values.yaml similarity index 93% rename from vc-app/charts/vclite/values.yaml rename to applications/vc-app/charts/vclite/values.yaml index 4d395c6e..94d80a3a 100644 --- a/vc-app/charts/vclite/values.yaml +++ b/applications/vc-app/charts/vclite/values.yaml @@ -1,46 +1,46 @@ -replicaCount: 1 - -image: - repository: vsblty.azurecr.io/vsblty/vclight - pullPolicy: IfNotPresent - tag: "1.7.17" - -display: - displayName: unix:0 - EndpointId: - BaseCmsUrl: "" - -imagePullSecrets: [name: regcred] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - create: true - annotations: {} - name: "" - -podAnnotations: {} - -podSecurityContext: {} - -securityContext: - privileged: true - -resources: - limits: - memory: "3072Mi" - requests: - memory: "3072Mi" - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} +replicaCount: 1 + +image: + repository: vsblty.azurecr.io/vsblty/vclight + pullPolicy: IfNotPresent + tag: "1.7.17" + +display: + displayName: unix:0 + EndpointId: + BaseCmsUrl: "" + +imagePullSecrets: [name: regcred] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + create: true + annotations: {} + name: "" + +podAnnotations: {} + +podSecurityContext: {} + +securityContext: + privileged: true + +resources: + limits: + memory: "3072Mi" + requests: + memory: "3072Mi" + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/vc-app/templates/_helpers.tpl b/applications/vc-app/templates/_helpers.tpl similarity index 100% rename from vc-app/templates/_helpers.tpl rename to applications/vc-app/templates/_helpers.tpl diff --git a/vc-app/values.yaml b/applications/vc-app/values.yaml similarity index 100% rename from vc-app/values.yaml rename to applications/vc-app/values.yaml From d8e9d77fb0c677b52c2637da529b5b75929cbacb Mon Sep 17 00:00:00 2001 From: Vijay Jejurkar Date: Thu, 9 Dec 2021 18:54:02 +0530 Subject: [PATCH 5/6] updated Readme file --- applications/data-captor/Readme.md | 70 +++++++++++++++++++++----- applications/vc-app/Readme.md | 79 +++++++++++++++++++++++------- 2 files changed, 118 insertions(+), 31 deletions(-) diff --git a/applications/data-captor/Readme.md b/applications/data-captor/Readme.md index f2a2a55c..ed0749c1 100644 --- a/applications/data-captor/Readme.md +++ b/applications/data-captor/Readme.md @@ -1,21 +1,67 @@ -#data-captor is the vision captor helm chart with data-captor -#Before deploying the application we require k3s to be installed on the machine where we want to deploy charts. +# **Data Captor Application Overview** +DataCaptor leverages camera and sensor technology through AI tools (machine learning and computer vision), enabling real-time analytics and anonymous audience data based on who and what the camera sees -#On the host machine we need to create 3 folders as below and need to place data into it(VSBLTY need to provide data for models & gallery while other folders can be kept empty) +## **Pre Requisites – Resources Required** - 1.mkdir -p /home/vedge/models - 2.mkdir -p /home/vedge/gallery - 3.mkdir -p /home/vedge/videos - +| **Resource Information** | | +|------------------------------------|----------------------| +| Application Type | Data Captor | +| Compute (vCores) | 8 | +| Memory (RAM) | 8 GB | +| Storage | 128 GB | +| Host OS | Ubuntu 20 or higher | +| Physical Display | | +| Connected cameras(USB/IP/Network) | With RTSP URL | + -#In values.yaml file of data-captor chart we have couple of things to be filled before deployment. - 1.device.accessToken : It'll be generated when the camera will be registered to vsblty portal (manually) and that need to copy in values.yaml file.(VSBLTY can give before deployment). - 2. camera.rtsp : It's the camera rtsp stream url. +## **Where to Purchase** +Contact info@vsblty.net +## Pre Requisites - Installing Data Captor +|**Configuration** | | +| ----------------------------------|------------------------------------| +| Ubuntu | 20 or later | +| Folder to create on system | /home/vedge/models | +| Folder to create on system | /home/vedge/gallery | +| Folder to create on system | /home/vedge/videos | -#Once we have all the above things set up we can deploy by following command. - helm install data-captor data-captor/ + +## Loading Docker Images +docker image load -i data-captor.tar.gz + +## Installing Data Captor Application using helm + +Run the following commands to deploy through helm: + +`helm install data-captor ./data-captor` + + Sample Output would look like: + +> `NAME: data-captor` +> +> `LAST DEPLOYED:` +> +> `NAMESPACE: default` +> +> `STATUS: deployed` +> +> `REVISION: 1` +> +> `TEST SUITE: None` + + + +## Uninstall Data captor application +To uninstall application run below command: + +`helm uninstall data-captor` + +## Testing Steps +For further instructions about steps for testing, contact VSBLTY Team (info@vsblty.net) + +## **Related material** +* https://vsblty.net/ \ No newline at end of file diff --git a/applications/vc-app/Readme.md b/applications/vc-app/Readme.md index a732c393..041d8166 100644 --- a/applications/vc-app/Readme.md +++ b/applications/vc-app/Readme.md @@ -1,29 +1,70 @@ -#vc-app is the vision captor helm chart with 2 services as below: - 1. ai pipeline. - 2. vclite. -#Before deploying the application we require k3s to be installed on the machine where we want to deploy charts. +# **Vision Captor Application Overview** +Using artificial intelligence and machine learning, VisionCaptor delivers targeted display content at the point of purchase. -#On the host machine we need to create 3 folders as below and need to place data into it(VSBLTY need to provide data for models & gallery while other folders can be kept empty) +## **Pre Requisites – Resources Required** - 1.mkdir -p /home/vedge/models - 2.mkdir -p /home/vedge/gallery - 3.mkdir -p /home/vedge/videos - 4.mkdir -p /root/.Xauthority - 5.mkdir -p /home/vclite/Usage - 6.mkdir -p /home/vclite/KioskServicesMedia +| **Resource Information** | | +|------------------------------------|----------------------| +| Application Type | Vision Captor | +| Compute (vCores) | 8 | +| Memory (RAM) | 8 GB | +| Storage | 128 GB | +| Host OS | Ubuntu 20 or higher | +| Physical Display | | +| Connected cameras(USB/IP/Network) | With RTSP URL | + -#In root values.yaml file of vc-app chart we have couple of things to be filled before deployment. - 1.ai-pipeline.device.accessToken : It'll be generated when the camera will be registered to vsblty portal (manually) and that need to copy in values.yaml file.(VSBLTY can give before deployment). - 2. ai-pipeline.camera.rtsp : It's the camera rtsp stream url. +## **Where to Purchase** +Contact info@vsblty.net - 3. vclite.display.EndpointId: It's endpoint created in vsblty cms portal application (VSBLTY can give before deployment). - 4. vclite.display.BaseCmsUrl: It's vsblty cms portal url where we have playlist to be played on device.(VSBLTY can give before deployment). +## Pre Requisites - Installing Vision Captor +|**Configuration** | | +| ----------------------------------|------------------------------------| +| Ubuntu | 20 or later | +| Folder to create on system | /home/vedge/models | +| Folder to create on system | /home/vedge/gallery | +| Folder to create on system | /home/vedge/videos | +| Folder to create on system | /root/.Xauthority | +| Folder to create on system | /home/vclite/Usage | +| Folder to create on system | /home/vclite/KioskServicesMedia | -#Once we have all the above things set up we can deploy by following command. - helm install vc-app vc-app/ -n vsblty - (where vsblty is namespace in k3s) +## Loading Docker Images +docker image load -i vc-app.tar.gz + +## Installing Vision Captor Application using helm + +Run the following commands to deploy through helm: + +`helm install vc-app ./vc-app` + + Sample Output would look like: + +> `NAME: vc-app` +> +> `LAST DEPLOYED:` +> +> `NAMESPACE: default` +> +> `STATUS: deployed` +> +> `REVISION: 1` +> +> `TEST SUITE: None` + + + +## Uninstall Vision captor application +To uninstall application run below command: + +`helm uninstall vc-app` + +## Testing Steps +For further instructions about steps for testing, contact VSBLTY Team (info@vsblty.net) + +## **Related material** +* https://vsblty.net/ \ No newline at end of file From afd55712911e4e441637482dcde23aee1476219a Mon Sep 17 00:00:00 2001 From: Vijay Jejurkar Date: Thu, 9 Dec 2021 21:21:03 +0530 Subject: [PATCH 6/6] updated openness version --- applications/data-captor/Readme.md | 16 ++++++++++++++++ applications/vc-app/Readme.md | 15 +++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/applications/data-captor/Readme.md b/applications/data-captor/Readme.md index ed0749c1..39dbf5b5 100644 --- a/applications/data-captor/Readme.md +++ b/applications/data-captor/Readme.md @@ -20,6 +20,22 @@ DataCaptor leverages camera and sensor technology through AI tools (machine lear Contact info@vsblty.net +## Pre Requisites - Installing OpenNESS +|**Configuration** | | +| ----------------------------------|-----------------------| +| OpenNESS Version | 20.12.02 | +| Flavor Used | Minimal | +| Distribution | OpenSource | + + +Follow below link to setup controller and edge-node for installing OpenNESS. + +https://github.com/open-ness/specs/blob/openness-20.12.02/doc/getting-started/network-edge/controller-edge-node-setup.md + +* Go to openness-experience-kits/ directory and comment out the grub role (role: machine_setup/grub) in the **network_edge.yml** file. +* Run the deployment script as ./deploy_ne.sh + + ## Pre Requisites - Installing Data Captor |**Configuration** | | | ----------------------------------|------------------------------------| diff --git a/applications/vc-app/Readme.md b/applications/vc-app/Readme.md index 041d8166..25bcb9b3 100644 --- a/applications/vc-app/Readme.md +++ b/applications/vc-app/Readme.md @@ -20,6 +20,21 @@ Using artificial intelligence and machine learning, VisionCaptor delivers target Contact info@vsblty.net +## Pre Requisites - Installing OpenNESS +|**Configuration** | | +| ----------------------------------|-----------------------| +| OpenNESS Version | 20.12.02 | +| Flavor Used | Minimal | +| Distribution | OpenSource | + + +Follow below link to setup controller and edge-node for installing OpenNESS. + +https://github.com/open-ness/specs/blob/openness-20.12.02/doc/getting-started/network-edge/controller-edge-node-setup.md + +* Go to openness-experience-kits/ directory and comment out the grub role (role: machine_setup/grub) in the **network_edge.yml** file. +* Run the deployment script as ./deploy_ne.sh + ## Pre Requisites - Installing Vision Captor |**Configuration** | | | ----------------------------------|------------------------------------|