What is HashiCorp Nomad?
Author: Jordan Phillpotts
Release Date: 03/05/2024
Greetings Traveller, come on in, you look weary from your lonely pilgrimage. Sit yourself by the fire and I’ll tell you a tale. This tale is of one like you, another Nomad, although this mythical figure does not travel the land in search of a home; instead is actually a pretty useful software solution from HashiCorp…
Yeah okay, that kind of kills the enigmatic stranger bit huh? But it’s true! One of the best things about HashiCorp as a partner is that they’ve designed their software as a suite of solutions solving problems at many different layers of the technology stack, from Terraform ensuring your infrastructure is provisioned correctly, down to Packer running scripts on an individual machine to ensure everything is configured correctly. This is great, but the challenge in thinking about these tools is that sometimes the solutions are designed to solve niche problems: if you’ve come across them, then you’re super grateful for the help, but, if you haven’t, they can almost feel like a solution looking for a problem. However, I assure you, the problems are there so I’m going to try to illustrate the utility of Nomad by presenting you with the kind of problems it aims to solve.
What does HashiCorp Nomad do?
So in cloud computing, we talk about load balancing a lot: the art of distributing your computing power efficiently so that your computational tasks get completed quickly. In fact that’s one of the key advantages of the cloud with companies such as Amazon or Microsoft advertising them as ‘elastic’, as in programs or virtualised computing that increases in size and/or power as needed. It is rightly thought of as a useful feature: if you’re a Christmas decorations business you don’t need a lot of computing power for most of the year but when it gets to December you’d better be ramping that webserver up a bit. Load balancing is important in many businesses for not only meeting your needs but also for being efficient with both your computing power and the associated costs of running it. And in these days of cost of living increases, we could all use a break right?
What does this have to do with Nomad? Yeah sorry, well Nomad is a really handy solution for improving your compute efficiency across a business rather than a single environment, as in it will find utilised compute power in your environment and push tasks out across them as required, maximising your use of your infrastructure. Pretty cool right? But that’s not all Nomad can do, it's an orchestrator as well; what does that mean? Well, I’m glad that I pretended that you asked: I have an analogy for you.
Nomad as an Orchestrator
Have you ever been to the theatre? Well if you look at how a show is run you can see all the technology elements of a show and you can see the complex rigging that is required to create that effect, all those various lights and speakers and smoke machines. Now in the old days, people might have operated each of those things manually, turning lights on one by one as required, but with the improvement of general technology available to crews, this is now less the case.
To run a show now, you set up all the equipment in the places it’s meant to be and you usually have most of the lights and sound at least connected to one desk so one person can operate all of it at once. Then you program the show: Scene One requires the blue light, then we add the red light, then turn them both off. In a decently equipped show, you shouldn’t notice someone turning that red light off then the blue one because they’ll be programmed, almost like a PowerPoint, so they go to the next action in the sequence encompassing the whole stage with one button press for each advancement.
This takes all of the manual labour out of each change in lighting etc so that all that is required is to know when to change, not what. So even if managing this requires more than one person each activation can be coordinated by one person (who is called the deputy stage manager, if you’re interested).
And that is what an orchestrator does, you define sets of tasks and you define when they are executed, across as many devices as you want (including across all sorts of operating environments and systems). Imagine you’re running several different environments (maybe a prod, dev and test) that while slightly different, need the same sort of actions being performed on them at the same time. Patching is an easy example of this, but it could be a wide array of tasks.
You can develop the job description with Nomad and then use it to push those same steps to the other environments in sequence, removing your manual overhead for each task. It also maintains a queue of tasks, basically allowing you to manage essentially a ticket system for your environment that’s completely automated. As it’s accessible through the command line, a web UI and an application programming interface (API), you should be able to find an easy way to integrate it into your workflow, especially if that workflow already includes other HashiCorp products, as they are designed to work together. Teamwork makes the dream work and all that.
Conclusion
So hopefully that clears up some confusion on Nomad’s role in the HashiStack. Sometimes, because Hashi technology has quite precise use cases, it can be hard to separate them out into their individual functionalities, for example, Nomad’s functionality could easily be confused for Terraform (Infrastructure provisioning) but is in fact clearly supplementary when you break it out using the problems they’re aiming to solve.