Application Placement and Lifecycle Management
local graph
Chapter 5 — Application Placement and Lifecycle Management
Section titled “Chapter 5 — Application Placement and Lifecycle Management”Now that we’ve covered the foundational concepts and attributes of Edge computing, we will take a deeper look at the practice of application placement and life cycle management – arguably one of the most important issues in scaling a production Edge solution. We’ll introduce the Linux Foundation LF Edge Open Horizon project and its commercial distribution provided with IBM Edge Application Manager (IEAM). These will be leveraged heavily in the remainder of this book to assist with reducing the complexities of application placement and life cycle management that can otherwise derail a successful deployment.
In this chapter, we’re going to cover the following main topics:
- Deploying containers to the Edge
- Introduction to Open Horizon and IEAM
- The architecture of the management system
- The components of the Management Hub
- More about the Edge Agent
- An examination of service life cycles
- An overview of patterns
- Policy-based management is key to deployment at scale
Technical requirements
Section titled “Technical requirements”This chapter is going to focus on how the LF Edge Open Horizon, and by extension IEAM, help solve the problem of placing containerized microservices on the Edge – getting the right service to the right place at the right time. To that end, you must have a particular Edge topology, infrastructure, and set of application services in mind that you can use to think about the capabilities we will be discussing here. We recommend that you follow the constructs outlined in the previous chapters as you consider your project.
For this chapter, we will leverage a scenario involving POS terminals and intelligent cameras as edge devices as examples. Nonetheless, the principles can be applied to virtually any industry scenario.
Deploying containers to the Edge
Section titled “Deploying containers to the Edge”As mentioned in the previous chapter, transferring your container image – what the Cloud industry typically refers to as deployment – is only part of the story when it comes to getting containerized microservices to the Edge. Recall the discussion in the Software and model deployment section of Chapter 3 stating the list of factors that can complicate the choice of where and when to place containers (and AI/ML models) at the Edge. To summarize, those factors include the following:
- The same software on different devices, servers, and locations
- Differences in CPU architecture on different devices and servers
- Specific co-processor and I/O dependencies
- Localized customization requirements
- Variations in operating schedules and procedures
- Differences in hardware generation, capacity, and topology
- Economic trade-offs between the far Edge and network or metro Edge in different geographies
- Differences in life cycles and priorities
- Changes over time for different services
Traditional DevOps practices for statically selecting a location to deploy software that applies to large, centralized cloud locations are far too rigid for use in Edge deployments. You need to condition placement decisions based on any or all of the aforementioned factors (or others not mentioned), and the process of evaluating those conditions needs to be dynamic and continuous.
That level of condition assessment is overwhelming for human operators, even for only one application set of services. This becomes even more extreme when you consider doing it for the many applications you need to run your business.
The LF Edge Open Horizon project was designed specifically to handle this complexity by automating the process of evaluating the various conditions that are important to you, the real-time changes occurring in your infrastructure, and updates to your application over time so that you can make choices for an optimal solution based on your priorities.
Introduction to Open Horizon and IEAM
Section titled “Introduction to Open Horizon and IEAM”Open Horizon is a community-based open source project at the Linux Foundation within their LF Edge 1 umbrella organization. To quote the project’s introduction page, Open Horizon “…enables autonomous management of applications deployed to distributed webscale fleets of Edge computing nodes and devices without requiring on-premises administrators.” Note the focus on webscale fleets. It is designed to scale with your business.
At the time of writing, Open Horizon is in Stage 2 of maturity. This means it has a growing community of contributors, has an established project leadership structure, well-defined governance, and has active collaboration with other LF Edge projects. In particular, Open Horizon incorporates the FIDO Device Onboard (FDO) 2 project to enable zero-touch provisioning of the Open Horizon Agent for Edge devices – reducing the complexity of securely provisioning your environment at scale. It also is compatible with EdgeX Foundry 3 and Project EVE 4 and is actively collaborating with Akraino 5, Home Edge 6, and Fledge 7.
Chapter 6 will introduce you to and demonstrate how to install the all-in-one (AIO) Management Hub. This is also included in the LF Edge Open Horizon project to make it easy to prototype the use of Open Horizon for managing your Edge deployments.
IBM was the original, main contributor to the Open Horizon project at LF Edge. Virtually everything we’ll discuss in this book is based on what is available in the Open Horizon project.
IBM also packages a distribution of Open Horizon in a product called IBM Edge Application Manager (IEAM). IEAM differs from the core Open Horizon in three significant ways:
- IBM provides maintenance and support for their licensed product. Any issues you encounter will be resolved for you by IBM.
- IBM always hosts the Management Hub on Red Hat OpenShift – a Kubernetes platform with proven enterprise-scale robustness that provides integration with your enterprise LDAP for user credentials.
- IBM has a web UI to help present the operational aspects of managing Open Horizon graphically. See Chapter 17, Using the IBM Edge Application Manager Web UI for more information about the IEAM interface.
And that’s it! Otherwise, IEAM is exactly Open Horizon as presented in this book.
The architecture of the management system
Section titled “The architecture of the management system”Open Horizon is composed of two main elements:
- A centralized Management Hub
- An Edge Agent
The Management Hub (Hub for short) is the core of the system – providing a portal at which Edge nodes are registered, containerized microservices are published as services, and deployment patterns and policies are defined and managed, among other tasks. Normally, the Management Hub is installed to run in Kubernetes in production environments 8.
8 The AIO packaging of the Management Hub for use in prototyping environments can be installed on a vanilla Docker Engine. The IEAM distribution of Open Horizon is only supported on Red Hat OpenShift.
The Edge Agent (Agent for short) is a small piece of code (about 30 MB) that’s hosted in every Edge device and server under the control of the Open Horizon system. If you have several servers in a single Kubernetes cluster, you only need one Agent for the entire cluster, or you can introduce an Agent for each namespace in that cluster to enable multi-tenant isolation. The Agent can run either in its own process or as a container hosted by the container runtime on that Edge node.
All Agents are connected to their corresponding Hub and take direction from that Hub for any Edge workloads to be deployed to that Edge node. The Agent ensures those services are up and running in the container runtime at that node – including configuring the container runtime to enable any secure communication that needs to be set up for the containers hosted at the node.
This results in a hub-and-spoke configuration for the system, as depicted in Figure 5*.1*. Here, the Hub is hosted in a central data center, and Agents are depicted as @ symbols that are resident in every Edge device – an intelligent vehicle, handheld device, network device, POS terminal, intelligent shopping cart, intelligent food processor, digital pricing label, intelligent camera, elevator, robot, gauge, sensor, controller, intelligent power equipment, intelligent safety equipment, lighting system, materials handling equipment, and so on – in your system, and servers at the far Edge, or network or metro Edge. Each Agent connects with its assigned Hub:

Figure 5.1 – Topological architecture of the Open Horizon management system
With the system provisioned in this way, it can manage how containerized services are deployed to any of these devices or servers.
What is a service?
Section titled “What is a service?”By now, you should be wondering what we mean when we use the term service.
A service is a formalism in Open Horizon that essentially declares what containers are so interrelated that they should be treated as a single unit during deployment. A service will often have a one-to-one correlation to a container. However, in other cases, it may compose several containers. An Open Horizon service is similar to a Pod in Podman and Kubernetes terms.
The service is declared through a JSON file that names the service and identifies the containers it composes, including the container registries in which they are held, and other metadata about the service that will be discussed later.
However, one interesting thing about a service worth noting here is that it can have a dependency on one or more other services. This is referred to as dependent services. This property can be recursive, which means it can involve further sub-dependencies.
This mechanism enables services to be constructed in a way that is natural to their design set by the software engineer and yet managed in a way that is natural to the topology of the infrastructure, as determined by the operations team – fulfilling the key principles of loose-coupling and separation-of-concerns in modern DevOps practices.
A service and its tree of dependent services are treated as a unit by Open Horizon for deployment purposes, as well as in setting up inter-microservice network connections within a given Edge node.
Sometimes, in the Open Horizon literature, and even within this book, you will see the term workload used as a synonym for a service and its dependent services tree.
Tip
In this context, the term workload, representing a service and its dependent services tree, should not be confused with the amount of demand being placed on a server, also referred to as workload.
The components of the Management Hub
Section titled “The components of the Management Hub”The Management Hub is comprised of six subsystems that collaborate to provide management of the overall system. These are as follows:
- Agreement Bot (Agbot)
- Exchange
- Switchboard
- Model Manager
- Secrets Manager
- FIDO Device Onboard
We will discuss these further here.
Agbot is the heart of the Hub. It is responsible for monitoring all the Edge nodes (through their respective Agents) for node registrations, and any changes that affect the placement of services at any of the nodes. It evaluates the policies and patterns that you have published to make placement decisions continuously. Agbot negotiates agreements with the individual Agents for the placement of specific services.
Agreements
Section titled “Agreements”Important note
Agreements are an important concept within Open Horizon. An agreement is a contract, documented in JSON, between an Agent and the Agbot to place a workload at the Edge node. This agreement can be used to audit the decisions the system has made about where to place workloads.
More importantly, it can be used to enable the Agent and Agbot to continuously monitor the environment for changes that would violate the conditions that were necessary to form that agreement in the first place. If those conditions are no longer met, the Agent or the Agbot invalidates the agreement, at which point the state of the environment is evaluated again and new agreements negotiated that may change where workloads are deployed. This will become clearer as we discuss Policy-based management in the Policy-based management is key to deployment at scale section later in this chapter.
Exchange
Section titled “Exchange”The Exchange is the record-keeping system for the Hub. All agreements, node states, and published services, policies, and patterns are recorded in the Exchange. Most of the important API or CLI (through their use of underlying APIs) requests to the Hub are handled in the Exchange, against the state that it has recorded about the system.
Switchboard
Section titled “Switchboard”The Switchboard manages secure communication between the Agents and the Agbot. The Switchboard uses a mailbox system to enable communication between components to resume after any system or network outage. If an Agent and Agbot are interrupted in the middle of negotiating an agreement, that negotiation will resume where it left off after the connection is restored.
Every component and Agent has a mailbox, and messages that are mailed to a recipient are encrypted with the public key of that recipient. Any component can put a message in a mailbox intended for another component, but only the intended component can retrieve messages that have been placed in its mailbox, thus preventing eavesdropping by any other component or adversary. This is key in considering the potential for the Edge environment to have many “bad actors” – the system must operate securely with zero trust in the physical environment in which it exists.
Model Manager
Section titled “Model Manager”The Model Manager is responsible for storing and securely transmitting model files to any service that has a dependence on that model.
The Model Manager can be used to transmit any kind of file – it doesn’t distinguish between files that contain AI/ML models from files containing any other data. Some projects use this to distribute configuration data to an Edge node, for example. Transmission can be done in either direction – downloading or uploading the file to or from the node. In this way, the Model Manager is also sometimes referred to as a file-sync manager.
The Model Manager determines where to sync its files using model policies and the same negotiation process that is used to determine where to place workloads. We’ll discuss this further in the Model policies section later in this chapter, and then again in Chapter 10, AI/ML Workload and Model Deployment.
Secrets Manager
Section titled “Secrets Manager”The Secrets Manager is responsible for binding secrets in a Vault to individual deployed services. Consider for a moment a containerized microservice that you’ve written to make use of an external Cloud-based service. That service will likely require that you use an API key to authenticate your use of that service.
You could hard-code that API key into your microservice, but that would make your microservice fragile – you would have to update your code any time you have to update your API key. It also creates a huge vulnerability. Anyone can reverse-engineer your code and extract your API key – using it to make illegitimate calls to your service by masquerading as your microservice.
It is much better practice to place these API keys (or any similar secret) in a Vault, and then load that into your software memory when it starts its execution.
However, you will not want to put a distinct Vault at every Edge node. And since you won’t necessarily know in advance where your services may get deployed at the Edge, you don’t want to load those Vaults at the Edge with every possible secret you may need – including for services that may or may not ever get deployed to that Edge node.
Furthermore, you may not want the same key at every node or location where your service is deployed at the Edge. You may want different keys for different locations or different uses of your service. It is important to ensure that any secrets that are extracted from a central Vault are transmitted to your service at the Edge securely.
The role of the Secrets Manager is to resolve bindings in your service to specific secrets in the Vault and to transmit them to each of your service instances securely, but only to the nodes where your service has been deployed - and only while that service remains deployed on that node.
Fast Identity Online (FIDO) Device Onboard (FDO) is a system developed by the FIDO Alliance 9 to enable zero-touch provisioning of software to Edge nodes. It is premised on the idea that device manufacturers will create a securely encrypted ownership voucher for each device that can be used to attest to the authenticity of that individual device. A few hundred vendors have joined the FIDO Alliance 10, indicating their support for including FDO ownership vouchers in their products.
While Intel led the FIDO Alliance of the FDO specification, they did so knowing that creating an open standard approach is essential to solving the industry-wide challenge of providing secure attestation and automated provisioning of any compute system, wherever it is deployed. Vouching for the authenticity of devices, even when there are no people to confirm that authenticity at the physical location of that device, is critical when you’re dealing with hundreds or even millions of devices. You simply cannot deploy enough people, operating with complete trust and without error, to handle the magnitude of the provisioned environment without a mechanism like FDO.
Open Horizon integrates FDO to support zero-touch provisioning of the Edge Agent. In a nutshell, it operates as follows:
- When a device is manufactured, an ownership voucher is created for that device and registered in a well-known rendezvous service (whose URL is published with that device).
- You purchase that device. Assume, for example, you are a retailer and have purchased several hundred POS terminals that you intend to provision to your stores. You receive that order of devices on a pallet, still in their cartons, at your warehouse.
- Before you distribute the device to stores, you register it with the Management Hub. By doing this, you’re importing the ownership vouchers for each device to Open Horizon. You may receive those vouchers in a manifest file from the manufacturer, or more likely there will be a QR code on the outside of the carton for each device that you can scan and use to download the voucher. The Hub will use that registration to record its expectation of each device to come online later. You can also use this step in the process to identify other properties about each device that are important to you – such as what store it is assigned to, its geographic location, physical address, and so on.
- Under the covers, the Hub will automatically contact the rendezvous service specified by that manufacturer and establish its intention of managing that device, along with a URL the system can use to contact that Hub instance.
- You can then put a shipping label on each of your servers (without ever taking them out of their original cartons) and ship them out to each of your stores.
- At the store, the manager, or some other clerk, can take the device out of its carton, plug it into a network jack, plug in the power, and turn on the machine. When the device starts up, it automatically connects to the rendezvous server, learns what system intends to manage it, and redirects to that Hub instance.
- The Hub then confirms the ownership voucher that was used to prove that the device is what it claims to be and that it is a node that the Hub is expecting to manage – as established in Step 3. This is important to prevent someone from inserting a different, potentially rogue, device into the network and claiming it to be legitimate.
- From there, the latest version of the Edge Agent is downloaded to the server and brought up, and it takes over negotiating with the Agbot over what workloads to place on that device.
All of this is predicated on the assumption that the device manufacturer has created an ownership voucher for their device and has pre-installed an operating system and the container runtime of their preference. That said, if you’re dealing with devices from a manufacturer that doesn’t support FDO, you can generate ownership vouchers on your own and pre-install them, along with any operating system or container runtime you need on the device in your warehouse, and still get the advantages of FDO for zero-touch provisioning at your stores.
At the time of writing, Open Horizon only supports FDO zero-touch provisioning for Edge devices hosting the Docker or Podman container runtime. It does not work with Edge servers running Kubernetes.
Secure Device Onboard (SDO) is a predecessor to FDO that worked similarly. SDO is also supported in Open Horizon but has been superseded with the formally standardized and updated FDO specification.
Organizations and tenants
Section titled “Organizations and tenants”It’s worth pausing here to point out that the Open Horizon Management Hub is designed to be multi-tenant – that is, the same Hub can support thousands of separate organizations to independently manage their own set of Edge nodes. This is useful in a large enterprise that has many different departments or divisions with different operational responsibilities – for example, one responsible for stores, another for warehouses, another for logistics, and so forth, each with its own set of Edge devices and servers.
This is also a basic prerequisite to qualify as a cloud-native service. Several organizations have indicated interest in provisioning an Open Horizon Management Hub in a cloud infrastructure and offering it as a subscription service.
More about the Edge Agent
Section titled “More about the Edge Agent”The Open Horizon Edge Agent resides at every Edge device or server. In a device, it can execute either as a standalone process in Linux or optionally can be hosted as a container in Docker or Podman.
The Agent must be run as a Container on Docker when running on macOS.
Likewise, the Agent must be run as a container on Kubernetes on Edge servers.
On Edge servers, an Agent can be configured with either a cluster scope or a namespace scope. Cluster-scoped Agents can manage the deployment of services to any namespace in that Kubernetes cluster.
If you need to limit and control namespace isolation, for different tenants of that cluster, for example, a namespace-scoped Agents can only deploy services to the namespace to which it belongs. However, you can have multiple namespace-scoped Agents in the same Kubernetes cluster – each associated with a different namespace.
While the Agent is quite small, it has a significant role in the Open Horizon system, performing several responsibilities:
- Managing secure communication between the Agent and its Management Hub with the Switchboard at that Hub
- Negotiating agreements with the Agbot to place workloads on that node, or deleting the workload from the node when agreements are terminated
- Pulling containers from their respective container registries and verifying their signatures to ensure they haven’t been tampered with
- Ensuring any deployed workloads are up and running, and restarting them in case they fail, or the machine is restarted
- Configuring the container runtime to enable secure communication between Containers within a service, or independent services
- Setting any environment variables used by services when they start executing
- Managing synchronization of any AI/ML models, or other files, assigned to the services hosted on that node
- Securely binding secrets for services on that node with the Vault
- Managing any code updates to itself
- Serving as the CLI to the Open Horizon system to perform local functions, as well as forwarding requests to the Management Hub
As stated earlier, the Agent does not open any listening ports. All connections to the Management Hub are initiated by the Agent. Consequently, it offers no opportunity for an external component to hack its functionality. Just as important, it uses standard https protocols and therefore does not require any special firewall policies to connect it to your enterprise or Cloud data center.
In essence, the Agent will keep polling its mailbox in the Hub to see if there is any work, such as negotiating an agreement, for it to do. To avoid overloading the network, the polling cycle can be configured as an option in the Node Policy file. In addition, if the Agent discovers no new work to do for a long period, it will automatically reduce its frequency of polling under the assumption that its environment is relatively stable – although it will resume at its configured frequency as soon as new work is found.
If at any time the Agent loses connection with the Hub, it will continue to operate offline, fulfilling its role in monitoring local workloads to ensure they remain running, until a connection can be restored. This autonomous operation capability is one of the core features of Open Horizon.
Automatic Agent updates
Section titled “Automatic Agent updates”Once an Agent has been provisioned, it is important to ensure you can keep it up to date remotely, without requiring someone to go out to Edge to manually perform that update.
Open Horizon provides a mechanism for automating these types of updates, referred to as the node management system. This mechanism leverages the same policy-based approach used by the Agbot for determining which nodes to update, and when. Updates, when they occur, are performed in place without disrupting any of the currently executing workloads. There’s no need to restart the node, and certainly not the executing workloads being managed at that node.
Of course, agreement processing is suspended during the upgrade but will resume automatically from wherever it was suspended once the Agent update is completed.
While further details about how the Agent update system works are outside the scope of this book, we encourage you to visit https://open-horizon.github.io/docs/anax/docs/node_management_overview/ for more information.
An examination of service life cycles
Section titled “An examination of service life cycles”Let’s take a moment and think about service life cycles.
For any application made up of multiple interacting microservices, you must consider that each microservice may have multiple versions, with new versions being introduced in the future. You may have different versions representing the following:
- Fixes to bugs or security vulnerabilities
- Enhancements for new features
- Differences in functionality for different circumstances
- Localization or regional customizations
- Processing architecture differences (requiring different compilations)
- Experiments for different optimizations
- Changes in design directions
Any of these differences can be codified in different ways, including the following to name a few:
- Mangling the package names with version numbers
- Tagging the package with property-specific differences
- Repo forks
- Parameterizing the logic through environment variables or configuration files
The specific approach you take will depend on your project needs and enterprise development practices standards.
Fortunately, Open Horizon provides mechanisms that support any of these approaches for managing the versions of your microservices.
Just as important, Open Horizon supports a range of design practices for how you can compose your microservices, including the following:
- Implementing different microservice APIs in a single program
- Bundling multiple microservices in a single container
- Composing multiple containers in a single Open Horizon service
- Creating dependent service trees for a set of services
- Bundling multiple containers in a single Pod – which can only be done with Podman or Kubernetes
Irrespective of these choices, consider that your services will go through periodic updates – ranging from every few days to every few months. As you read through the next sections of this chapter, consider your project needs and how you might leverage Open Horizon to get those updates deployed back out to your Edge environments – automatically and accurately.
An overview of patterns
Section titled “An overview of patterns”Open Horizon offers two mechanisms for controlling the deployment of services to the Edge. The first of these is referred to as patterns.
Patterns are simple but effective when you’re first kicking the tires with a couple of nodes. A pattern is a JSON file that lists the services you want to deploy with that pattern. Once you’ve written the pattern JSON file, you can publish it with the Management Hub.
After that, you can reference one or more patterns in the Node Policy document associated with the Edge Agent at each of your nodes. We’ll discuss the Node Policy document later in this chapter.
Whenever the Agent on a particular node starts, it will form an agreement with the Agbot to place the services specified in its referenced patterns at that node.
As you can see, this is a quick way of getting a well-known set of services placed on your nodes. However, it is static. The same services will always be placed at that node until you either change the pattern or remove a reference to it in your Node Policy document.
Policy-based management is key to deployment at scale
Section titled “Policy-based management is key to deployment at scale”The other mechanism provided by Open Horizon for making placement decisions is the Policy system. Policy-based management is key to deploying your production system.
The Policy system makes use of several distinct policy files:
- Node Policies
- Service Policies
- Model Policies
- Deployment Policies
Each of these represents the perspectives of the different actors in the system. Recall the different roles that we outlined in Chapter 2, including the provisioning engineer, software engineer, *data scientist,*and deployment operations manager. Each of the aforementioned policy files is intended for each of these roles, respectively.
We will discuss these further, and then bring them all together at the end.
Node Policies
Section titled “Node Policies”Node Polices are specified in a JSON document associated with each Edge node. They are intended to be used primarily by the provisioning engineer to express the capabilities and constraints of that node.
For example, an intelligent camera positioned over the cereal aisle in a store might have a Node Policy that asserts that it has an ARM processing architecture with 4 cores, 6 GB of memory, runs the Debian operating system, and is located on Aisle 4 – all properties associated with its physical capabilities and where it is located.
As indicated earlier, the Node Policy can also be used to express the pattern(s) to place on that node. In that sense, it may be shared between the provisioning engineer and the deployment operations manager.
Regardless of whether it identifies a pattern, and again as an example, the deployment operations manager may also assert a constraint in the Node Policy that that device should only ever run services for doing cereal identification. These, and any other constraints specified in the Node Policy will be factored into the placement decision.
Service Policies and Service Definitions
Section titled “Service Policies and Service Definitions”Service Policies are specified as a section within a larger Service Definition JSON document. The Service Definition document is used by the software engineer to express the properties and constraints of their microservices. For example, they can assert they have compiled their microservice for ARM processing architectures, and can optionally leverage a GPU if one is present. They may assert the constraint that this service can only run on nodes that have at least 2 GB of memory.
If the software engineer knows there are tight timing dependencies between a set of interrelated microservices, they may specify those in a single service definition to ensure they will all be deployed as a single unit.
If their microservice reads from environment variables that need to be set in the environment when it executes, those variables and their values can be specified in the Service Definition.
Furthermore, if the microservice depends on any secrets that need to be obtained from the Vault, those bindings are specified in the Service Definition as well.
Finally, if the microservice is an AI/ML algorithm and depends on a model file (or other file, such as for configuration data), the software engineer needs to create a Model Policy file for that model (or other) file.
Model Policies
Section titled “Model Policies”Model Policies are used by the data scientist responsible for training the model(s) for a service. The Model Policy is where the data scientist can assert the properties and constraints of the model, including identifying the service to which it belongs.
The deployment operations manager may also revise this Model Policy document to further condition where this model will be used. For example, they may express a constraint that this model is only deployed in the region where the cereals for which this model has been trained are sold.
Deployment Policies
Section titled “Deployment Policies”Deployment Policies are used by the deployment operations manager to apply their own operations knowledge of how they want services placed in the field. The Deployment Policy identifies the service(s) to which this policy applies. It then goes on to express the properties and constraints that need to be factored into the deployment of the identified services. Usually, these deployment properties and constraints focus on factors that are relevant to business operations.
For example, the Deployment Policy for a visual product identification service may constrain it to only be deployed on intelligent cameras in regions where local regulations require computer vision processes to be performed within the store. They may allow that same service to be deployed to metro Edge servers in other regions where compute can be consolidated at a lower cost.
Policy-based placement negotiations
Section titled “Policy-based placement negotiations”With each of those policies defined by the respective actors in the system, the deployment system has enough to do its job.
The Agbot combines the Deployment Policy with the Service Policies for each of the services identified in that Deployment Policy. It then compares that combined set of properties and constraints with the Node Policy for each node in the system.
The constraints expressed in the combined Deployment Policy and Service Policy are evaluated against the properties in the Node Policy. Then, the constraints in the Node Policy are evaluated against the properties in the combined Deployment Policy and Service Policy. If, and only if, both sets of constraints are satisfied will the services identified by that Deployment Policy be placed on that node. The Agbot enters into the agreement protocol with that node’s Agent to deploy the service(s) to the node.
It does this for each Deployment Policy published to the system.
In addition, the Model Manager does a similar evaluation of Model Policy properties and constraints for each of the nodes to which the corresponding service has been deployed with the Node Policies for each of those nodes.
As indicated earlier, an agreement contract is formed for every service that’s deployed to each node. From that, the Agent on each node, and the Agbot in its central position, will continuously evaluate those agreements. Let’s say something changes, such as one of the following:
- A software version update
- A change in any of the policies from one of the actors
- A change in the node’s geofenced position
- A change in the node’s memory, storage, network, or any other resource that is being actively reflected 11 in Node Policy properties 11 This type of reflection is typically performed by an external program, perhaps another service, with the right permissions, that has been set up to monitor for these external factors and will reflect them as property changes in the Node Policy document.
In this case, the agreement will be automatically invalidated, the associated workloads will be terminated, and a new set of agreements will be negotiated. In this way, once policies have been set, the system will take responsibility for making placement decisions, deploying services throughout the Edge, and ensuring applications remain up to date and in their correct locations, even as changes are occurring in the operational environment.
Summary
Section titled “Summary”In this chapter, you gained a comprehensive understanding of the Open Horizon system and how it deploys services to the Edge. You learned that deployment in an Edge environment is more complicated than you will find in typical cloud environments. There are many more moving parts at the Edge, under less strict control.
We outlined the architecture of the system, the components, and what each does. We also explained the role of the Edge Agent and Management Hub, and within the Hub the responsibilities of the Agbot, Exchange, Switchboard, Model Manager, Secrets Manager, and FIDO Device Onboard subsystems. We discussed some of the security measures that are built into the design of the Agent, and how the Agent can automatically update itself.
Then, we helped you understand the difference between the Open Horizon open source project and the IEAM commercial product distribution of the Open Horizon project.
Most importantly, you learned about the two systems for controlling the deployment of services to the Edge – patterns and policy-based systems. You also learned how the policy system works to factor in the perspectives of different actors in the system to ensure a large-scale production system can be managed effectively and safely.
Next, we will start diving deeper into how to perform specific tasks using the available CLIs and APIs of the Open Horizon system, starting with installing your own AIO Management Hub to play with, and then installing an Edge device Agent.