Screen Shot 2022-05-03 at 10.32.12 AM

In my previous blog, Why 2022 will be the year for edge automation, we discussed the objective of edge solutions to bring resources closer to the end user or data source.

As edge expands its IT footprint and becomes an extension of the data center, bare-metal, virtual environments, private cloud and public cloud start to coexist as part of the infrastructure. 

While our customers move forward with their own automation journey, they are adding edge computing to the puzzle, with common automation challenges such as:

How to automate disparate architectures at scale

How do we reduce the operational burden, if the IT teams do not grow exponentially? 

What is needed to foster a collaborative automation practice?

As part of this blog we will go through a hybrid edge computing automation scenario. But let's start with the fundamental question: Why is hybrid cloud critical for edge computing?

Hybrid cloud to solve edge computing challenges

At the edge, geography matters

The fundamental need is to allocate resources closer to where the data is generated to pre-process the information before forwarding it to the data centers. The reason for this architectural change is to increase efficiency and business agility, and to allow real time decisions to be made at the edge.

IT teams have the mission to mitigate security and operational risks, while ensuring standardization and compliance across all remote edge IT components including network devices, computers, servers and applications.

Depending on your industry and business needs, a common architecture to consider is deploying small-form servers across multiple locations such as stadiums, theaters, public sector offices, retail or bank branches. 

For the far edge, if there are many IoT-type sensors that do not have any compute or storage, then the edge architecture will probably include edge clusters, low power servers or tiny devices to consolidate and save data, or even to contain applications in a distributed fashion. 

How can we get consistency if edge computing has such disparate scenarios? That’s when hybrid cloud enter the picture. Hybrid cloud provides sanity across the technology ecosystem, and gives a common foundation to manage thousands of networked devices as if they were part of a centralized architecture.

Final architecture will depend on customer specific requirements, however in a majority of the edge scenarios, hybrid cloud might be the most appropriate cloud deployment model.

Infrastructure as code for edge computing devices with Ansible Automation Platform 

When we want to manage and automate resources at the edge, there must be a paradigm shift: We should manage and provision infrastructure through code, instead of using manual processes. This is called Infrastructure as code (IaC)

What are the advantages of IaC?

  • Version control using a single source of truth.
  • Reduces human errors or inconsistencies.
  • Faster deployments and patching. 
  • Eliminates configuration drift.

The video demonstration for this blog will include the following scenarios, which emulate real world hybrid architecture use cases: 

  • Edge servers deploy (imaging)
  • Serverless using RHEL 
  • RHEL image update (device)
  • Application update (container)

These use cases are part of  the Red Hat Enterprise Linux capabilities for edge, such as GreenBoot facility, and serverless (when systemd listens on a specific port and starts the container on first request).

Demo workflow

Step 1. Test the systemd feature to act as serveless on edge-server-1

Systemd daemon listens on a specific port (in our case 8080), and when systemd receives a connection request it starts the container using podman as container execution engine and using a container image pulled on edge-server-1

We  will use an Ansible Playbook to check how many containers are running before the first connection, run a script to connect to the web server (this will start the container), and check how many containers are running after the script execution.

Step 2. Test the podman auto-update feature

We will update the application running on edge-server-1 by changing the label for the container images on the registry and triggering the update of the container by podman (auto-update). 

We use an Ansible Playbook to get the container images, change the labels and push the container registry. 

Step 3. Test the greenboot feature of RHEL

Lastly we will update the OS image of edge-server-2 using the web server to distribute the edge image (previously created using Cockpit). During the process upgrade, the GreenBoot scripts check a string that will deliberately fail. After three reboots, the GreenBoot will fail back to the previous OS image.

We use an Ansible Playbook to launch the upgrade, wait until getting ssh access to the device, and check if the upgrade was successful or not.

Now that the steps and goals are defined, let’s move to the fun part and see how this works:

If you are a Spanish speaker and want to check this demo in Spanish, we have a translated version for the same demo here:

Key takeaways

As you observed during the demonstration, the complexity to automate and manage edge use cases can be abstracted to the operator through automation. The development of these use cases is tackled using a common human-readable language. Edge IT infrastructure is already complex even for a single domain, and customers are urged to consume automation faster. 

Ansible Automation Platform is a powerful agentless multi-domain, and multi-vendor solution for your edge automation needs. It is architected to scale in a flexible manner across edge environments using capabilities such as  automation mesh and automation execution environments.

Moving forward your edge automation journey

Want to try Ansible Automation Platform in your own environment? 

We offer an Ansible Automation Platform trial.

Interested in developing human-readable automation with ansible? 

DO007 is a free self-paced online video course to expand your automation skills. We also provide short self-paced, interactive labs with Ansible Automation Platform 2.

Want to recreate the demo?

You can recreate this demo scenario anytime with the following resources to set up the RHEL for edge demo and the GitHub Code to recreate the automation for these tasks. 

Want to learn more about edge?

If you are interested in expanding your knowledge about edge, you can take a look at these reading blogs: 

Acknowledgement: I’d like to thank Moisés Rivera for his outstanding contributions to this demonstration and blog.

About the author

Dafné is a Principal Technical Marketing Manager for Ansible Automation Platform Business Unit at Red Hat. Prior to Red Hat, Dafné worked at Cisco Systems, supporting Service Providers customers across US, Canada and Latin America to design, implement and adopt automation, orchestration and network management solutions. She brings over 15 years of experience in the IT field with specializations in DevNet, ITIL, SCRUM, consulting, networking and automation.

Read full bio