The Evolving Edge whitepaper highlights heterogeneity as an essential ingredient of Evolving Edge Computing. We call systems that contain more than one different type of processor a "hybrid system". The Exploring Hybrid Runtime for Cloud-Native Deployment in High-Performance IoT Edge blog post describes the implementation of a container runtime that enables the deployment of applications onto additional processors within a system. For example, this can be used to deploy applications onto a microcontroller embedded alongside application-profile cores in an SoC.
In this blog post, we show how this new container runtime can be used to extend an existing application that is deployed using k3s (a container orchestrator) onto an edge compute node based on a hybrid SoC.
As part of the SMARTER (Secure Municipal, Agricultural, Rural, and Telco Edge Research) project, Arm has been exploring the use of cloud-native technology and methodologies in edge environments to evaluate their effectiveness at addressing the challenges of developing, debugging, deploying and securing software for edge devices. The SMARTER: Experiences with cloud Native on the Edge paper presented at the HotEdge'20 workshop on Hot Topics in Edge Computing describes in more detail how we address the challenges, especially at scale and the code is available via the project website: https://getsmarter.io/.
The SMARTER Demo application consists of a number of containerized services that are deployed onto an edge system using a container orchestrator (k3s) that has been configured to cater for the differences between deploying to the edge and deploying to the cloud. Once deployed the demo application uses a machine learning model to perform object detection on a video stream. Detection data is sent to the cloud where it can be visualized with a grafana dashboard.
Figure 1: SMARTER Demo application
For this demo we are use the I.MX 8M Mini EVK from NXP. This board is a platform designed to show the most commonly used features of the i.MX 8M Mini Applications Processor in a small and low-cost package. The i.MX 8M Mini Quad applications processor contains 4x Cortex-A53 @ 1.8 GHz and 1x Cortex-M4 @ 400 MHz. The EVK board has 2GB LPDDR4, 16GB eMMC and 32GB QSPI NOR.
We run a Yocto Linux built using the instructions on the NXP website. We built the Mickledore release resulting in a 6.1.22 kernel version. We configured this kernel to enable the use of containers and k3s.
The SMARTER application is designed to take input from a camera but for the purpose of demonstration we use a MP4 video file and a video4linux loopback device. We configure the application so that no data is sent to the cloud and we do not use the audio processing part of the application.
We have created a new part of the application which runs on the Cortex-M4 and can be deployed using k3s just like the other parts of the demo application. New functionality is implemented in a FreeRTOS application that monitors the status of the Cortex-A53 cores ie whether they are running or have been put into sleep mode. If the application detects that the Cortex-A53 cores have been put into sleep mode then it will wait for ten seconds and then wake the Cortex-A53 cores via a specific interrupt. This allows us to show how an embedded MCU could be used to perform a task that requires lower performance whilst the main system is suspended (which can save energy) and then wake the system if more compute power is required.
Figure 2: Hybrid SMARTER Demo application
The video below shows how we can deploy the SMARTER application to the iMX8M-Mini-EVK. We follow the instructions given in the SMARTER Project repo to deploy the original application and then deploy the extra (hybrid) component as a "container" that runs on the Cortex-M4.
Before the video starts, we have set up the server machine, running a k3s server to create a k3s cluster and booted the edge node running a k3s agent and joining it to the cluster.
These are the steps shown in the video:
We have shown how the proof of concept hybrid container runtime described in the "Cloud-Native Deployment on Hybrid Edge Systems" blog can be used to deploy software onto an embedded processor within a System-on-Chip running Linux.
The ability to deploy the multiple parts of an application using a single deployment mechanism (in this case the k3s container orchestrator) makes it easier to develop, test and deploy software running on a heterogeneous system.
Find out more about how Arm is transforming Edge Computing Enabling Edge Computing
Repositories:
Kubernetes