How to Deploy with Helm#
Time to Complete: 30 minutes
Get Started#
Complete this guide to confirm that your setup is working correctly and try out workflows in the sample application.
Prerequisites#
K8s installation on single or multi node must be done as pre-requisite to continue the following deployment. Note: The kubernetes cluster is set up with
kubeadm
,kubectl
andkubelet
packages on single and multi nodes withv1.30.2
. Refer to tutorials such as https://adamtheautomator.com/installing-kubernetes-on-ubuntu and many other online tutorials to setup kubernetes cluster on the web with host OS as ubuntu 22.04.For helm installation, refer to helm website
Note If Ubuntu Desktop is not installed on the target system, follow the instructions from Ubuntu to install Ubuntu desktop.
Download the helm chart#
Follow this procedure on the target system to install the package.
Download helm chart with the following command
helm pull oci://registry-1.docker.io/intel/smart-parking --version 1.1.0
unzip the package using the following command
tar xvf smart-parking-1.1.0.tgz
Get into the helm directory
cd smart-parking
Configure and update the environment variables#
Update the below fields in
values.yaml
file in the helm chartHOST_IP: # replace localhost with system IP example: HOST_IP: 10.100.100.100 http_proxy: # example: http_proxy: http://proxy.example.com:891 https_proxy: # example: http_proxy: http://proxy.example.com:891 webrtcturnserver: username: # example: username: myuser password: # example: password: mypassword
Deploy the application and Run multiple AI pipelines#
Follow this procedure to run the sample application. In a typical deployment, multiple cameras deliver video streams that are connected to AI pipelines to improve the classification and recognition accuracy. The following demonstrates running multiple AI pipelines and visualization in the Grafana.
Deploy helm chart
helm install smart-parking . -n sp --create-namespace
Verify all the pods and services are running:
kubectl get pods -n sp kubectl get svc -n sp
Start the application with the Client URL (cURL) command by replacing the <HOST_IP> with the Node IP. (Total 8 places)
curl http://<HOST_IP>:30485/pipelines/user_defined_pipelines/yolov10_1_cpu -X POST -H 'Content-Type: application/json' -d '
{
"source": {
"uri": "file:///home/pipeline-server/videos/new_video_1.mp4",
"type": "uri"
},
"destination": {
"metadata": {
"type": "mqtt",
"host": "<HOST_IP>:30483",
"topic": "object_detection_1",
"timeout": 1000
},
"frame": {
"type": "webrtc",
"peer-id": "object_detection_1"
}
},
"parameters": {
"detection-device": "CPU"
}
}'
curl http://<HOST_IP>:30485/pipelines/user_defined_pipelines/yolov10_1_cpu -X POST -H 'Content-Type: application/json' -d '
{
"source": {
"uri": "file:///home/pipeline-server/videos/new_video_2.mp4",
"type": "uri"
},
"destination": {
"metadata": {
"type": "mqtt",
"host": "<HOST_IP>:30483",
"topic": "object_detection_2",
"timeout": 1000
},
"frame": {
"type": "webrtc",
"peer-id": "object_detection_2"
}
},
"parameters": {
"detection-device": "CPU"
}
}'
curl http://<HOST_IP>:30485/pipelines/user_defined_pipelines/yolov10_1_cpu -X POST -H 'Content-Type: application/json' -d '
{
"source": {
"uri": "file:///home/pipeline-server/videos/new_video_3.mp4",
"type": "uri"
},
"destination": {
"metadata": {
"type": "mqtt",
"host": "<HOST_IP>:30483",
"topic": "object_detection_3",
"timeout": 1000
},
"frame": {
"type": "webrtc",
"peer-id": "object_detection_3"
}
},
"parameters": {
"detection-device": "CPU"
}
}'
curl http://<HOST_IP>:30485/pipelines/user_defined_pipelines/yolov10_1_cpu -X POST -H 'Content-Type: application/json' -d '
{
"source": {
"uri": "file:///home/pipeline-server/videos/new_video_4.mp4",
"type": "uri"
},
"destination": {
"metadata": {
"type": "mqtt",
"host": "<HOST_IP>:30483",
"topic": "object_detection_4",
"timeout": 1000
},
"frame": {
"type": "webrtc",
"peer-id": "object_detection_4"
}
},
"parameters": {
"detection-device": "CPU"
}
}'
View the Grafana and WebRTC streaming on
http://<HOST_IP>:30480
.Log in with the following credentials:
Username:
admin
Password:
admin
Check under the Dashboards section for the default dashboard named “Video Analytics Dashboard”.
Figure 1: Grafana and WebRTC streaming
End the demonstration#
Follow this procedure to stop the sample application and end this demonstration.
Stop the sample application with the following command that uninstalls the release smart-parking.
helm uninstall smart-parking -n sp
Confirm the pods are no longer running.
kubectl get pods -n sp
Summary#
In this guide, you installed and validated Smart Parking sample application. You also completed a demonstration where multiple pipelines run on a single system with near real-time classification.
Troubleshooting#
The following are options to help you resolve issues with the sample application.
Deploying with Intel GPU K8S Extension on ITEP#
If you’re deploying a GPU based pipeline (example: with VA-API elements like vapostproc
, vah264dec
etc., and/or with device=GPU
in gvadetect
in config.json
) with Intel GPU k8s Extension on ITEP, ensure to set the below details in the file helm/values.yaml
appropriately in order to utilize the underlying GPU.
gpu:
enabled: true
type: "gpu.intel.com/i915"
count: 1
Deploying without Intel GPU K8S Extension#
If you’re deploying a GPU based pipeline (example: with VA-API elements like vapostproc
, vah264dec
etc., and/or with device=GPU
in gvadetect
in config.json
) without Intel GPU k8s Extension, ensure to set the below details in the file helm/values.yaml
appropriately in order to utilize the underlying GPU.
privileged_access_required: true
Error Logs#
View the container logs using this command.
kubectl logs -f <pod_name> -n sp