- Launch Kubernetes* Dashboard– Kubernetes* Dashboard is a web-based user interface to manage cluster resources, deploy applications and troubleshoot. The steps will help you generate the access token and launch the dashboard.
- Deploy the OpenVINO™ Application– Deploy and manage theOpenVINO™edge application from the Edge Controller to the Edge Node.
- Simulate the IP Camera Stream– Use the Rainy_street.mp4 video file to simulate an IP Camera stream and send it to theOpenVINO™application on the Edge Node.
- Start the Application– Start theOpenVINO™inference application for Pedestrian Detection inside the pod.
- Verify Inference– Start a video playback to visualize the inference video.
- Stop the Application– Stop the application and delete theOpenVINO™application.
Step 1: Launch the Kubernetes* Dashboard
kubectl get node -o wide
- Open a terminal and login as a root user:su rootIf the operating system was pre-installed on your hardware, refer to your manufacturer’s documentation for the root password.
- Get the Kubernetes dashboard URL and token. Run the following script on the Edge Controller system and wait for a few seconds, because token generation takes time:/root/get_controller_token.shYou are required to generate a new token by running this script whenever you want to log into the Dashboard, because the Token is valid only for the active session. The Kubernetes Dashboard will time out after 10 minutes of inactivity. To disable the timeout, see Known Issues.You will see the Dashboard URL and token generated in the terminal:Figure: Output of get_controller_token.sh
- Use the Firefox* browser to launch and sign into the Kubernetes Dashboard using the URL generated on the terminal and the token for authentication. The Firefox* browser allows you to log in to the Dashboard without additional configuration. You may be required to configure browser settings if other browsers are used. The URL will be https://<Controller-IP>The Kubernetes Dashboard uses self-signed certificates. In the Firefox* browser, you might need to click on Advanced and Accept the Risk and Continue.Figure: Kubernetes Dashboard Sign In
- You will see the following screen after a successful sign-in.You might see a different dashboard and different services after login, compared to the image below.Figure: Kubernetes Dashboard Overview
- Verify the status of the Edge Controller that you installed in the Dashboard. Select the Cluster > Nodes tab in the Dashboard, as shown in the following image:If the device is installed in single-node installation, you will only see one device. In addition, you might see a different device/node name based on the configuration.Figure: Kubernetes Dashboard Overview - Single NodeThe green-circled checkmark beside the Edge Controller label (under the Names column of the Nodes screen) indicates that the nodes are healthy.
- If the status of the Edge Controller changes fromReady(appears in green in the dashboard) toNotReady(appears in gray in the dashboard) after system reboot, then run the commands shown below on the respective systems and wait for few seconds:swapoff -a systemctl restart kubelet
Step 2: Deploy the
- Verify theOpenVINO™application is available in the local Harbor* registry:curl -X GET 'https://<Controller-IP>:30003/api/v2.0/projects/intel/repositories' -H 'accept: application/json' -k --cacert /etc/docker/certs.d/<Controller-IP>:30003/harbor.crt -u 'admin:Harbor12345' |jq | grep -w 'openvino-cons-app'Figure: VerifyOpenVINO™Application AvailabilityVerify that theopenvino-cons-appis available in the list of images. Other images are also available in the local Harbor registry targeted towards different use cases.
- Deploy a network policy allowing ingress traffic on port 5000 (tcp and udp) from 192.168.1.0/24 network to theOpenVINO™consumer application pod as follows:
- Create a new file namednetwork_policy.ymlin the current working directory and add the following specification to the file:Make sure to maintain the indentation for the following code snippet.apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: openvino-policy namespace: default spec: podSelector: matchLabels: name: openvino-cons-app policyTypes: - Ingress ingress: - from: - ipBlock: cidr: 192.168.1.0/24 ports: - protocol: TCP port: 5000 - protocol: UDP port: 5000
- Create the network policy:kubectl apply -f network_policy.yml
- Start theOpenVINO™application. This command downloads the app namedopenvino-cons-app, which is around 2 GB in size and contains theOpenVINO™application, libraries and inference model.cd /root/converged_edge_insights/Converged_Edge_Insights_<version>/Sample_OpenVINO_Application_for_OpenNESS/edgeapps/applications/openvino/consumer/ kubectl apply -f openvino-cons-app.yaml kubectl certificate approve openvino-cons-app
- Open the Kubernetes dashboard. View the status, log, and the device in which the pods are deployed.The logs for a pod can be viewed using the following command:kubectl logs -f -n <namespace> <pod_name>Where<pod_name>is similar to:openvino-con-app-6744f45755-l4d6mFigure: Kubernetes Dashboard Overview after successful application deployment
- If the status of openvino-cons-app deployment appears Red, then run the following command to stop the deployment and continue again with the previous step providing the correct IP address.kubectl delete deployment openvino-cons-appIf the deployment does not appear to be removed from the dashboard or the status shows as terminating, run the following commands to force the termination to complete:swapoff -a systemctl restart kubelet
Step 3: Simulate the IP Camera Stream
- In the terminal, run the following command to install ffmpeg server, download the video file and start simulating the video file:cd /root/converged_edge_insights/Converged_Edge_Insights_<version>/Sample_OpenVINO_Application_for_OpenNESS/ chmod a+x simulate-video-stream.sh ./simulate-video-stream.shWhere<version>is the version selected before downloading the package.
- After download and build, theRainy_Street.mp4file will start streaming to theOpenVINO™pod. You will see output similar to the image shown below. Let this continue in this terminal and proceed to the next step. The "RFC 2435…" message is normal and expected.Figure: Sample of Streaming Simulation Output
Step 4: Start the Application
- Open a new terminal and login as a root user:su root
- Run the following commands to update theOpenVINO™Kubernetes pod to start the application and stream inference video back to the Edge Controller.cd /root/converged_edge_insights/Converged_Edge_Insights_<version>/Sample_OpenVINO_Application_for_OpenNESS/ chmod a+x start-application.sh ./start-application.shWhere<version>is the version selected before downloading the package.
- Let this continue in this terminal and proceed to the next step. The messages "RTP timestamps don’t match", "Received packet without a start chunk; dropping frame", and "Missing packets; dropping frame" are all expected outputs that do not invalidate the execution.Figure: Start Application and Stream Inference Video
Step 5: Verify Inference
- Open a new terminal and login as a root user:su root
- Locally see the rendered data:setenforce 0 systemctl stop firewalld.service ffplay rtp://127.0.0.1:5001The video playback of inferenced data begins. If your bandwidth is poor, data frames (packets) might be missed and you will see latency in the video stream output visualization. This does not affect the validity of the demonstration.Figure: Rendered Video OutputThe rendered video shows a view from the street detecting people and creating bounding boxes around each recognized person.
Step 6: Stop the Application
- Close the video playback application by clicking theXicon on the top right of the window or by pressingCtrl+Cin the terminal from which it was launched.
- Stop theOpenVINO™application by pressingCtrl+Cin the terminal where it was running.
- Close the simulate IP Camera application usingCtrl+Zcommand in the terminal.
- To delete theOpenVINO™application from the Edge Controller and re-enable the firewall, run the following commands as root:kubectl delete deployment openvino-cons-app systemctl start firewalld.serviceIf the deployment does not appear to be removed from the dashboard or the status shows as terminating, run the following commands to force the termination to complete:swapoff -a systemctl restart kubelet