Introducing Trackman: Execute Commands as a Workflow

DZone 's Guide to

Introducing Trackman: Execute Commands as a Workflow

Introducing Trackman!

· Open Source Zone ·
Free Resource


Trackman? Sounds a lot like Pac-man!

Today, we would like to introduce you to Trackman, the open-source, execute-commands-as-a-workflow tool. In this post, we take a closer look at what it is, why we need it, and how to best implement the tool. Let's get started.

You may also like:   Most Useful Linux Command-Line Tricks

What Is Trackman?

Trackman is a command-line tool and Go library that runs multiple commands in a workflow. It supports parallel steps, step dependencies, async steps, and success checkers.

Why Do I Need Trackman?

Most of us are familiar with Bash (or other Shell) scripts: a simple way to run commands in order. Bash, as a scripting language, is a powerful and flexible way to do almost anything you want in Linux. On Windows, this is true for PowerShell scripts.

When deploying our applications to Kubernetes, we often find ourselves running command sequences like this:

  1. Run helm install
  2. Wait for the installation to complete successfully
  3. Run kubectl apply -f some_file.yml
  4. Wait for it to successfully start the application
  5. Run some migration job, like a database schema migration.

While putting all these commands in a Bash script is possible, we can observe a pattern here: run a command, check to see it's done right, and move on to the next step.

Trackman is a way to just do that: run commands, check they ran fine, then run the next step.

If you want some more complex workflows, Trackman can run steps in parallel, define dependencies between them (A depends on B and C's successful completion), run some "pre-flight" checks before running a step, and some more.

How Do I Use Trackman?

Trackman can run as a single executable on Linux, Mac, or Windows without any dependencies. It can also be used as a library in a Golang project if you would like to add its functionality to another tool you are building. To learn more about Trackman, you can check out this Trackman repository or watch our Trackman pre-release webinar:

What's Next?

We currently use Trackman to simplify Cloud 66 Skycap deployments. Trackman is also integrated into the Cloud 66 Toolbelt. In the future, Trackman will add support for Notifiers (to notify an external entity of a step's run progress) and re-tries and more. In the meantime, please check it out and feel free to let us know your thoughts in the comments below!

Further Reading

Basic Terms and Commands Explained

Functions in Shell Script

Most Useful Linux Command-Line Tricks

commands ,linux ,mac os ,open source ,oss ,release ,shell ,trackman ,windows ,workflow

Published at DZone with permission of Khash Sajadi , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}