Skip to content
ImagineWorld

Automate to Achieve Scale

node_idnode-book_edge-computing-patterns-for-solution-architects_chapter-07-automate-to-achieve-scale
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num7
chapter_titleAutomate to Achieve Scale
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Deploying applications and models to hundreds and thousands of edge devices and edge clusters/nodes, then monitoring and managing all these things, is a challenge and not for the faint of heart. With the proliferation of these heterogeneous edge devices and the services required in an edge solution, it is almost impossible to manually deploy applications on these devices and manage them at scale, especially when it comes to networking components. The more prudent approach would be to introduce automation. In fact, it is an absolute necessity.

From monitoring the devices to updating the applications and models running on those devices, the goal of automation is to allow enterprises to build capabilities that can act and react with the solution components in a more secure and trusted manner with minimal human interaction. The other facet of automation is the ability to scale. An automated process should work for hundreds and thousands of devices whether it is to configure things or to roll things back. Like the digital journey or the AI journey, automation in the deployment of edge computing components is now trending more toward automation facilitated by open source communities such as LF Edge.

This chapter dives into areas where automation can help speed up deployment tasks and help information technology (IT) and operations team (OT) staff. The following topics are covered in this chapter:

  • Automating service delivery
  • Attaining scalability with automation
  • Remote operational security
  • Automation with artificial intelligence (AI)

Whether it is to manage edge devices more efficiently, apply configurations more consistently across varied and heterogeneous infrastructure, or distribute updates or patches, the goal of automation is to be able to do all of this automatically and flawlessly.

Most of the topics discussed thus far have had to do with the architecture, configuration, and setup of an edge computing topology or solution, which fall into the category of day 1 tasks. This chapter on automation addresses not only day 1 operations but also day 2 tasks, which have more to do with maintaining a system. Solution architects must always keep day 2 operations in mind when architecting a solution because a well-architected solution ensures a healthy system, which is best achieved with deployment automation.

The goal of service delivery is to reduce the number of steps required to deliver a service. This is true in IT as well as in edge computing. Whether it is a simple application or a machine learning (ML) model to be deployed on edge devices quickly and securely, automating those steps is what teams strive for. Doing so helps eliminate configuration errors and scale such solutions.

Physical installation of devices is not something that the OT can automate, but the configuration of the devices and deployment of applications that run on those devices can be automated. If a large bank that has over 10,000 ATMs across the country wants to apply an update to its ATMs, it cannot afford to send personnel to every ATM. Rather, the update is done remotely either through command-line scripts or a DevOps toolchain. Another good example is damage detection sensors on wind turbine blades monitored by edge nodes located on top of the wind turbines.

Collaboration between development (Dev) and operations (Ops) has given us a set of processes known as DevOps, which allows for a pipeline to develop, test, deploy, and monitor code in a continuous manner. This is done with a set of open source tools, such as Ansible and Eclipse IDE, that work together in the form of a toolchain.

EdgeOps

Not all DevOps features are applicable to edge computing, especially continuous delivery, because as we know, some devices operate in disconnected mode. EdgeOps is a new paradigm that addresses edge computing-specific aspects, which can vary and be less predictable compared to cloud environments due to the heterogeneous nature of the edge hardware. This article from the Eclipse Foundation explains the EdgeOps project: https://www.eclipse.org/community/eclipse_newsletter/2021/february/2.php.

Infrastructure as code (IaC) uses the DevOps methodology to describe the layout of IT infrastructure and provides the ability to provision and manage resources. These resources include compute, storage, and network. They can be in the cloud, in a data center, or even at the edge.

There are many automation frameworks that enterprises can choose from, including Ansible, Chef, Puppet, and Terraform. There are pros and cons to each of these frameworks.

Enterprises either end up using what their developers are comfortable with or rely on the recommendation of their cloud provider. Ansible and Terraform are probably the two top automation frameworks (see the reviews on https://www.techrepublic.com). While both help with automating provisioning and deployment tasks, and both are open source and cloud agnostic, there are subtle differences. See Table 7.1 for the differences:

TerraformAnsible
An IaC software tool that is used to automate building, provisioning, and managing IT resourcesA suite of command-line software tools that are used as IaC to automate application deployment and configuration management tasks in IT
Written in the Go languageWritten in the Python language
Uses a declarative approachUses both declarative and procedural approach

Table 7.1: Differences between Terraform and Ansible

Chapter 9 provides more detail about the declarative and procedural styles of coding.

GitOps

GitOps extends IaC by including Git as the single source of truth where the infrastructure and application deployment manifest files are stored. All changes are initiated from Git.

The challenge has been automating the proverbial last mile when it comes to edge computing. The reason for that is the small footprint of far edge devices. Deploying infrastructure to and at the edge is best accomplished using a DevOps toolchain. DevOps toolchain diagrams are usually shown as a sideways figure 8 loop and encompass IT and OT tasks working seamlessly.

A DevOps pipeline, on the other hand, is a set of agreed-upon processes and related tools that allow developers to do their development tasks and collaborate with operations to deploy the coded applications. Figure 7*.1* shows a pipeline with tools that help in building, testing, and deploying an edge server.

Figure 7.1 - DevOps pipeline to deploy edge infrastructure

With this diagram, we simply wanted to get the point across that the steps to configure an edge server/cluster are rather straightforward. The tools shown are example open source tools.

When it comes to deploying applications to edge servers/clusters and far-edge devices, a similar set of tools could be used but there would be two pipelines. The first pipeline would deploy the application to the edge server or cluster, and a second pipeline would be used to deploy container-based applications on the far edge devices. See Figure 7*.2*.

Figure 7.2 - DevOps pipeline to deploy an edge application

We talked about deploying edge infrastructure and applications on edge devices. What about developing edge applications? Let’s take a brief look at Open Horizon. Chapter 10 describes everything you need to know about Open Horizon.

Open Horizon, which is a project from the Linux Foundation (https://www.lfedge.org/projects/openhorizon/), is an open source platform for the development and autonomous management of software applications that are deployed on edge devices or nodes. Information about DevOps support in Open Horizon can be found at https://github.com/open-horizon/devops.

The fun thing about edge computing is that anyone can create a simple application and deploy it to an edge device such as Raspberry Pi, a robot, a drone, or a Jetson Nano camera. Obviously, creating and maintaining applications that perform visual analytics or data inferencing requires expertise in several different fields of software development. The following code snippet is a very simple Hello World service that outputs Hello from Packt every five seconds. Such a simple edge service is typically used to test and confirm that an edge device is working properly:

#!/bin/sh
# Simple edge service
while true; do
echo "HZN_DEVICE_ID says: Hello from Packt!"
sleep 5
done

The service also outputs the device ID, which in a real-world use case is an easy way to identify the device. If you notice closely, it is an Open Horizon environment variable, namely HZN_DEVICE_ID. You could choose not to have it and make the program even more simple. If you want to get all the supporting code that deploys the service, you can find it on the Open Horizon GitHub repository (https://github.com/open-horizon/examples/blob/master/edge/services/helloworld/CreateService.md).

We often hear the term automation at scale, which really means using data analytics and ML tools to help with automation across an organization. From an edge computing perspective, it would translate to having automation as we move from right to left—from the cloud to the network to the enterprise all the way to the far edge devices.

Now imagine, if that trivial program shown previously was to be deployed on hundreds of cameras in a large automotive manufacturing plant, the IT department would use a configuration and management software tool to do that. The biggest benefit of automation is being able to scale and, very importantly, roll back if every device is not updated. No matter the number of devices, one or more DevOps pipelines would help with that task. Once tested, the same deployment task can be repeated many times without the concern of introducing any human errors.

We have talked a lot about edge devices and their variances in form, size, and use. But what does it take to onboard an edge device such as a camera or a robot? The edge device/node owner takes on that responsibility and performs five tasks, as shown in Figure 7*.3*.

Figure 7.3 - Steps to prep an edge device

The high-level tasks are as follows:

  1. Select the appropriate device, making sure the type of hardware is supported by the proposed edge solution.
  2. Prep the device by installing the minimal operating system.
  3. Set various environment variables.
  4. Install an agent so that it can be registered with an edge management hub.
  5. Register the edge device with an edge management hub in order to run edge services.

Once the edge device is registered, the management hub can monitor it and the device can also be added as an endpoint in a DevOps toolchain so that applications can be deployed to it.

The tasks shown previously must be done for each edge device that needs to be part of the edge solution. Zero-touch provisioning solutions make it possible to automate the initial imaging and configuration of new nodes. The zero-touch paradigm is described in Chapter 9. From a scalability perspective, and even from the perspective of IoT devices that do not have compute and storage, there is another option, which is to prep an edge cluster that is connected to such IoT devices. The steps are very similar.

A solution architect must be aware of when using edge clusters makes sense. Edge clusters are usually container-based clusters and are used either in colocation scenarios or in situations when more scalability and computing capability are needed to support many edge devices. The tasks are shown in Figure 7*.4*.

Figure 7.4 - Steps to prep an edge cluster

The OT gets involved when setting up an edge cluster. As before, after the edge cluster is registered, the management hub can monitor it and it can be added as an endpoint in a DevOps toolchain so that applications can be deployed to it.

As your IT team/OT manages day 1 provisioning and deployment tasks based on the architecture and plans defined during day 0, let’s address operational security issues from both a planning and process perspective, with emphasis on aspects that may be unique to edge computing. In this section, we’ll discuss limiting access in all layers of the architecture, how that applies to automation, and an example based on the concept of the Tactical Edge. As you read through this section, consider creating a custom checklist containing the items and considerations that apply to your specific architecture deployment scenario and then review it with the staff that will be working on the deployment.

When it comes to regional deployments at the service provider edge, most access to equipment is managed by the facility staff and infrastructure. But when it comes to field deployments at the user edge, there can be little to no consistency or standardization. Some servers may be in racks, mounted in a room, or out in the open. Other edge devices may be wall mounted or sitting on a shelf or desk. Ensure that devices are in a locked room or otherwise out of sight and arrange for local staff to inspect the devices on a regular, scheduled basis. If practical, see whether automated visual monitoring of high-value hardware can be added to your architecture as a requirement.

Likewise, consider hardware specifications that include cases that limit physical access to device inputs, such as connectors, plugs, and slots, and that allow physical connections to be locked in place. If an unauthorized person cannot plug an external device into your hardware after it has been deployed, that is one less way to exploit your solutions. Lastly, ensure the hardware cannot be booted from an externally mounted storage device, and that you use trusted boot technology.

When deploying devices in the field, it is important to consider the ways in which a device can communicate, enumerating the allowed methods from that list, and then disabling all other methods. It may not be enough to disable functionality in the software, so consider physically altering the hardware to prevent the use of that function. Likewise, see whether you can determine the allowed hosts that the device may communicate with, and ensure that no other host is allowed to communicate.

If practical, disable all inbound communications and only allow the device to initiate outbound communications. The rule of thumb is the same as the standard zero-trust approach: deny all, then allow some as required. Any automation tools and configurations you use should implement this pattern. Ensure that your architectures and resulting requirements communicate this clearly and firmly, and that tests verify that it has been implemented for all frequencies, transports, protocols, and ports. Consider using device management solutions that track and automate the collection and control of this information and functionality, and only trust solutions that provide source code to allow independent verification.

Additionally, solution architects should consider the use of Trusted Platform Module (TPM) and Trusted Execution Environment (TEE) technologies, when possible, to aid in ensuring the identity and ownership of the hardware device.

These technologies can also be used to establish the ownership of devices and automate the transfer of ownership. The Fast IDentity Online (FIDO) Alliance created the FIDO Device Onboard (FDO) specification in 2019 to standardize this hands-free onboarding process. Intel Corporation then created an open source project named FDO to provide tools and an SDK and implementation example so that organizations could easily create solutions that complied with the specification. FDO works with TPM and TEE technologies.

The process begins when device manufacturers create an ownership voucher before shipping the device. When the user activates the device, the other half of the authentication process is completed, making the device operationally secure. See Figure 7*.5* for an overview of the ownership transfer process following the FDO specification.

Figure 7.5 - Provisioning a device with FDO

Open Horizon’s support for the FDO project can be found at https://github.com/open-horizon/FDO-support/blob/main/README.md. There is a GitHub repository (https://github.com/open-horizon/FDO-support) where the corresponding integration software between FDO and Open Horizon can be found.

Here we will list various solution components that will enable operational data security and show how they can be combined.

In the Data encryption section of Chapter 6, we discussed the concept of a Data Confidence Fabric (DCF) and how it can generate data confidence scores to give you a level of confidence that you understand the source of the data, how it may have been manipulated or altered, and how likely it is that the data has or has not been subject to undetected tampering.

Likewise, in the same section, we covered a technique that allows calculations to be performed on encrypted data without first decrypting it, and the results delivered are encrypted. That technique, fully homomorphic encryption (FHE), should be considered in any architecture where the data being collected is numeric and sensitive, confidential, or regulated.

In Chapter 3, we briefly mentioned the concept of perfect forward secrecy, where two parties communicating over an encrypted protocol (such as TLS 1.3) can then further encrypt messages using asymmetric public key encryption so the receiver can decrypt the message using their private key and the sender’s public key, with the session being encrypted using a key unique to that session. The strength of this approach is that in the off chance the session can be intercepted and decrypted by a third party, the key used to decrypt that session cannot also be used to decrypt messages between those parties sent in any other session.

We’ve talked about trusted data, trusted hardware, limiting connectivity, and other security-related features that businesses like to see before embarking on an edge solution. It all adds up to this paradigm of trusted edge computing (TEC), which strives for the next level of security of running secure and isolated containers, secure storage, and even secure memory. It also addresses business application protection mechanisms running on edge infrastructures. The solution architect must assure enterprises that their data, their program logic, and, ultimately, their intellectual property are protected. That should ideally involve remote attestation of business logic running on edge devices.

Running an application in a container provides some resource isolation, but it does not provide the sort of security isolation of identity or network isolation that you get when using VMs. Hence, you have to take advantage of the different layers of a container platform. Figure 7*.6* shows the various layers, which put together provide the required security isolation and trust.

Figure 7.6 - Isolation provided by Kubernetes layers

As an example, Kubernetes has different layers that are nested. If you start from the smallest unit, the container on the inside, and move out, the level of isolation and security progressively increases. Container technology is one option. There could be other alternatives but the reason we focus on containers is that many edge applications are by their very nature more suited to run in containers.

Tactical Edge is a term that describes secure edge computing in contested environments where different entities across different domains are vying for similar resources. It combines the best practices of operational security in edge computing working in tandem with a secure edge platform. Further, its default operating assumptions are geared toward both offline-first principles as well as denied, disrupted, and intermittent connectivity with limited bandwidth (DDIL). Let’s briefly describe what system components go into a Tactical Edge platform architecture, define their operational characteristics, and then discuss ways to automate the provisioning and operation of Tactical Edge environments.

Tactical Edge consists of hardware and software working together as a unified solution to support mission-critical workloads in field-deployed environments outside the core network and cloud infrastructure. It should do the following:

  • Operate in disrupted, disconnected, denied, degraded, intermittent, or limited communication environments
  • Function in degraded or otherwise extreme environmental conditions and operating environments
  • Be self-sustaining as long as possible
  • Be built as ruggedized units and maintained with commercial off-the-shelf (COTS), open source, and custom-built technologies
  • Be deployable at scale, usable, and accessible in the field by anyone, in adverse conditions, and with minimal training

Attributes and elements of the Tactical Edge include the following:

  • Trusted infrastructure, computers, devices, data, models, and identities
  • Small-footprint devices, including both compute and wearables
  • Runtime protection with zero trust
  • Secure, redundant communication capabilities
  • Resilient operation, yet breakable if removed from a specified geofence

Note

Geofence is a technology that uses location services to enforce or activate a virtual boundary.

  • Deployable and replaceable in minutes without IT or OT staff, including zero touch

Note

Zero-touch deployment is the ability to remotely provision edge devices without having to do it manually. The zero-touch paradigm is discussed in Chapter 9.

  • Capable of running on-demand analytics and sensor fusion use cases adapted to local capacity
  • Capable of bursting northbound for extra capacity

A Tactical Edge platform that meets the requirements listed previously is built on compute hardware that employs zero trust from the silicon on up, with a hardware-based root of trust for platform attestation, workload signing, and confidence-scoring injection into a data confidence fabric. Running on that hardware should be a Kubernetes distribution, integrated to provide hardware-based workload isolation and protection from competing workloads. Together, the two provide data protection at rest, in motion, and while processing. Additionally, a secure, pull-based workload and ML model life cycle management solution should be employed to handle placement and deployment tasks. Also, on top of that, a secure, redundant network overlay should be deployed and run.

Note

From the silicon on up means visualizing the stack or architecture of a computer from the physical layer (motherboard, processing units, and memory) up to the operating system and/or virtualization layer to the running applications. It’s not enough to secure the applications if the operating system is not secure. And it’s not enough to secure the operating system if the hardware has vulnerabilities. By securing the complete system, beginning with the hardware, you ensure you’ve presented the smallest potential attack surface possible.

Such an environment fits scenarios where the operating climate is harsh and stressful with restricted communication networks. See Figure 7*.7*. Some examples are ground operations on a battlefield, a fleet of merchant ships or aircraft carriers facing challenging weather at sea, and disaster response teams in disaster areas, where solutions must be resilient to disruption and sometimes survival is based on distributed decision-making.

Figure 7.7 - Tactical Edge components

By using secure hardware compute and devices that support FDO technology for provisioning, hardware can complete all day 1 tasks over local networks or be pre-provisioned elsewhere and then deployed locally for scenarios and locations with no local connectivity. This approach will meet all of the preceding Tactical Edge considerations: zero-touch and zero-trust operation by minimally trained people in the field using COTS hardware.

In the next section, we will discuss scenarios based on how the use of AI can optimize automation.

We discussed deploying AI applications and ML models at the edge in Chapter 5, which is becoming a common scenario because enterprises are adamant about reducing the time for decision-making and minimizing data movement. In Chapter 4, we touched upon using AI/ML applications to determine network traffic patterns and using automation to perform network maintenance and monitor network performance. This latter discussion, albeit brief, is more in keeping with the automation theme.

Using AI techniques to automate facets of the edge computing paradigm will allow for automation at scale. With so much data being generated by edge devices, enterprises are finding ways to not only infer and analyze that data but also create a corpus that can be used to learn from, build, and train new models. We now see the rise of such corpus models as Large Language Models (LLMs).

LLMs are massive amounts of data gathered from numerous existing sources that can be used to answer natural language queries, perform summarizations, or create classifications. These ML models that use neural networks are trained on massive amounts of data and can predict the next word in a natural language sentence. LLMs are a subset of generative AI (GenAI).

These models and techniques have given rise to a new form of AI, namely GenAI. As the name suggests, this category of AI models can generate new and previously unseen content, including text, music, and images. From an edge computing perspective, the best use case of GenAI is image processing.

LLMs and GenAI stem from foundation models (FMs), which are any model trained on very large data from the web using ML. They contain what are called tunable parameters in a mathematical sense, which ends up being their unit of size. When a model is listed as 3B, it means the model contains 3 billion tunable parameters. Although the terms LLM and FM are often used interchangeably, they are different because FMs can be more than just linguistic models. Figure 7*.8* depicts which of the model types could be more relevant in the domain of edge computing.

Parameter

A parameter is a configuration variable inside the model that can be tuned to optimize its performance.

Figure 7.8 - FMs and LLMs in Edge Computing

We have seen drones used in industrial settings where they are deployed to assess and inspect an area or equipment. Imagine a drone sent to inspect a large concrete bridge to look for cracks or other structural variations. In the traditional world of AI, it would be limited to a small set of historical data, specifically images, to ascertain whether a linear marking is a crack or not. A human would have to determine whether it was indeed a crack after further analysis.

But now the drone can use the power of GenAI and compare what it is seeing to data contained in these large FMs to determine on its own whether something is a crack or a fault in the concrete structure. Using data from those large models improves the performance of visual analysis. Industry-specific vision models can be applied in different scenarios to get quicker and better results.

The challenge lies in using all these AI domains to automate tasks and help OT and IT with managing and monitoring edge devices, clusters, and network components. Thanks to FMs, it is possible to automate the drone scenario of detecting faults or defects in industrial scenarios. That would possibly require less human intervention and mitigate errors in such scenarios.

Another example of where GenAI could play a major role in edge solutions is in responding to questions from customers as in the case of directional kiosks. This would take advantage of the question-and-answer capability of LLMs. Based on what the customer is enquiring about, the system could anticipate the customer’s next question and suggest things. Similarly, quick service restaurants (QSRs) could look at replacing order takers at drive-throughs with AI systems backed by GenAI, specifically the natural language processing capability. Taking the customer’s order, recommending add-ons, and speeding up the entire process is another example of automation with AI.

Automating with AI is a bit more obvious when dealing with the network because we can use historical data to determine network traffic patterns and use AI to automate network maintenance and help it perform better. As an example, this would really help in determining how to slice a 5G network, which can be a complex task. When it comes to multi-access edge computing (MEC), IaC can be an essential tool to facilitate their deployments. Furthermore, with the load that MEC could experience, it is important to continually monitor the demand and optimize all its services. Demand monitoring and auto-scaling could be achieved with automation, specifically automation using AI.

IEEE published a survey about automated application deployment on MEC that be found here (https://ieeexplore.ieee.org/document/10225499).

Section II describes MEC and provides a reference architecture. Section III describes the various IaC tools and compares them, including Ansible and Terraform.

The chapter started with a discussion of service delivery automation, which is a rather broad term for automating human tasks in a business and is relevant to edge computing. Whether it is DevOps or IaC, achieving scalability through automation ends up being one of the major benefits. We saw that from monitoring edge devices to updating the applications and models running on those devices, there is an opportunity to apply automation.

The latter half of the chapter addressed the security aspect by introducing the onboarding of edge devices with security features before shipping them. While it seemed like we digressed, it was important to talk about security in the context of automation. Automation allows enterprises to build capabilities that can react with minimal human interaction in a more secure and trusted way.

The final section dealt with the most interesting and relevant topic, namely AI. It seems AI is omnipresent in edge computing from AI applications deployed on edge devices to the use of AI in the deployment of devices and their operation. Enterprises can now look ahead to the use of FMs in edge computing.

While we have briefly mentioned monitoring in this chapter, Chapter 8 takes a deeper look into the domain of observability.