Grlx: DevOps Gets Another Flavorful Approach

Author: Keisha Thomas-Gamble

Introduction

Grlx (pronounced "garlic") dubbed as a fleet configuration management system, brings a new aroma to the world of automation, crafted entirely in Go. This flavorful tool aims to automate system management tasks across designated nodes, aptly referred to as "Sprouts," ensuring these nodes maintain a harmonious state as defined by their "Recipes."

Originating from the developer's own tales of woe, Grlx sprouted forth from soil of discontent with existing configuration management systems. Its developers reported grappling with resource constraints, intricate dependencies, and connectivity challenges, particularly within constrained environments like IoT devices. This created the atmosphere for Grlx's growth, and a reported focus on several design considerations: Low overhead: Grlx boasts minimal resource consumption, ensuring efficient operation even in resource-limited environments. Simple to install and dependency free: The installation process is straightforward and hassle-free, devoid of tangled dependencies that often plague other systems. Scalable and fault tolerant: Designed with scalability in mind, Grlx can gracefully handle growth while remaining resilient to failures, ensuring uninterrupted operation. Secure by default: Grlx prioritizes security, requiring no third-party suites for protection. Its default settings provide robust security measures out of the box. Flexible: To maintain a lightweight core, Grlx employs a plugin system, allowing users to tailor the system to their specific needs without bloating its footprint. Easy to Understand: With clarity as a guiding principle, Grlx's source code is designed for readability, allowing users to grasp its intricacies in a relatively short time frame.

Interested to see what’s cooking ourselves, we threw on an apron and rolled up our sleeves:

What are we cooking with?

Within the Grlx ecosystem, three key components take center stage: the Farmer, Sprouts, and CLI.

The Farmer functions as the management server. Much like its counterparts, the Salt Master or Chef Server, the Farmer oversees the orchestration of tasks. Sprouts, on the other hand, function as managed nodes, resembling salt minions, executing commands dispatched by the Farmer. Acting as the intermediary, the CLI serves as the interface for interactions between users, the Farmer, and managed sprouts.

With this foundational understanding in place, we ventured into the heart of the kitchen to prepare our system for the Grlx experience.

System Prep: The Installation

Installing a new tool can often feel as arduous as chopping onions. However, setting up Grlx proved to be refreshingly straightforward. Following the provided instructions, we fetched the binary for each component and performed some initial configuration to establish the Farmer interface and configure the TLS certificate.

With each component installed, we turned to the Grlx CLI to verify that everything was properly set up. Using a few commands, we confirmed that all pieces were in place and ready to go.

During this process, we utilized the CLI to accept authentication keys from the Sprouts, enabling seamless communication with managed nodes. With our key accepted, our sprout system seamlessly integrated into the Grlx ecosystem, awaiting instructions from the Farmer.

Exploring Grlx: Crafting Recipes

With Grlx installed on our system, we were eager to dive into its capabilities. At quick glance we could see Grlx utilized Infrastructure as Code (IaC) principles, which gave off a familiar tone reminiscent of other configuration management tools. However, before we could get started, we needed to grasp the fundamentals of declaring configurations.

Two key concepts stood out to us in the realm of configuration management with Grlx: Ingredients and Recipes.

  • Ingredients serve as the foundational elements of configuration, acting as the building blocks for defining states.

  • Recipes are a combination of these Ingredients, guiding the system towards the desired configuration via steps.

For instance:

file.exists:     
        - name: /tmp/exists 

This snippet represents an Ingredient, specifying the existence of a file in a particular location.

To craft a coherent plan for our deployment, we combined various Ingredients to create Recipes, each outlining the necessary steps to achieve the desired state.

Lets look at a simple Recipe:

steps:     
        First step:       
                file.touch:         
                        - name: tmp/grlx/config     
        Second step:       
                user.exists:         
                        - name: test  

In this snippet, we have a simple Recipe with two steps. The first step creates an empty file on the machine, while the second step verifies the existence of a specified user. We used Ingredients from earlier to establish these steps. Keep in mind, our example is rather straightforward, where the steps are non-deterministic and does not include conditionals or properties.

Properties serve as system-specific information that can dictate conditional execution within Recipes. For instance, a step may execute only on certain operating systems, enhancing Recipe flexibility and adaptability.

For this example, we saved our Recipe file as first_recipe with the .grlx extension and dropped it in the /srv/grlx/recipes/prod location.

Now armed with our Recipe, it's time to get cooking!

Cooking with Grlx: Executing Recipes

To execute your Recipe with Grlx, you'll need to instruct Grlx to cook. Using the CLI, simply execute "grlx cook" followed by the name of your Recipe (without the .grlx extension) and the sprouts you want to execute the Recipe against (\* will target all sprouts).

Executed command:

grlx cook first_recipe -T \*

Upon execution, a detailed report highlights the success of each step, providing valuable insights into system changes and ensuring seamless deployment:

ID: First step
Result: Success
Execution Notes:
user test exists
----------
ID: Second step
Result: Success
Execution Notes:
timestamps of `tmp/grlx/config` changed
----------
Successes:      2
Failures: 0
Errors:         0

Make sure to visit the docs to get a full understanding and scope of the capabilities of Recipes.

User Considerations: Navigating the Grlx Landscape

After mastering the art of executing Recipes with Grlx, it's important to consider various factors when navigating the Grlx landscape.

Functionality

Grlx prioritizes simplicity in its design, which may lead to it not being as feature-rich as other leading configuration management tools. While executing Recipes remains its primary focus, we found that the tool offers limited additional functionality. Depending on your environment, this simplicity may be advantageous or disadvantageous. However, it's worth noting that Grlx allows for expandability through its plugin system. As Grlx continues to evolve, we anticipate the library of available plugins will grow accordingly.

Documentation

While using Grlx, you may encounter gaps in the documentation. In-depth guides to setting up Recipes, troubleshooting, and configuration options are not yet fully detailed in the documentation. However, Grlx provides resources such as a Discord channel and various other outlets where users can seek assistance, provide feedback, and report issues.

Key Points to Note

Although the installation process is generally smooth, unforeseen challenges may arise. For example, configuring the TLS certificate, crucial for Grlx's security features, can be challenging. Typos in IP or domain names during installation may lead to TLS errors, which can be difficult to rectify even after uninstalling the software. It's important to remember that Grlx is still under active development. This means you might encounter open issues and a smaller community compared to more established tools.

Conclusion

In the realm of DevOps automation, Grlx emerges as a promising contender, offering a refreshing approach to fleet configuration management. While Grlx presents a familiar tone reminiscent of other configuration management tools, Grlx distinguishes itself with its unique approach, specifically addressing challenges encountered in IoT and small instance environments.

As we explored its capabilities and whipped up Recipes, we encountered challenges typical of any tool in its early stages. While Grlx excels in design aspects like low overhead, there are areas where functionality could be further developed compared to established tools. Nevertheless, Grlx's solid design and ongoing evolution show promise for meeting the diverse needs of DevOps teams and establishing itself in the DevOps toolkit. With each update, it advances in sophistication, and as DevOps continues to heat up, the prospects of the future continue to get more flavorful.

Previous
Previous

Salt vs Grlx: The Battle of Automation Is Getting Spicy

Next
Next

Simplifying EKS Cluster Management with Slack Notifications