Configure Custom Salt Grains and Node Groups

30 minutes
  • 3 Learning Objectives

About this Hands-on Lab

When Salt manages large swathes of infrastructure, we need to be able to target exactly which servers we want to communicate with. This can be done via grains, which contain information about our underlying system — but we can also add grains information ourselves. We can additionally configure custom node groups using existing targeting methods to quickly reference common groups of nodes.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Configure Custom Grains

Add custom grains files to each provided server, based on the information in the instructions.

Configure Node Groups

Configure a node group for each feature grain referenced.

Test Each Node Group

Ensure everything is working by running against each node group.

Additional Resources

You are a DevOps engineer at Provendentia Press, a digital publisher. You need to set up a quick proposal for how the team will be adding grains and node groups to all servers managed by Salt as a means of tagging and targeting.

Using the providing servers, add grains for the associate team and feature. devops is currently the only team managing all infrastructure and can be used as the team for all servers. The salt master needs to be tagged as part of the configmanage feature set, the web01 server should be tagged website, and the db-users server is part of two features: the pubplatform and community.

Node groups should then be added each feature, so they can be quickly referenced by name.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?