Exploring the Fluidity of FlowPipe

Author: Nicholas M. Hughes

Recently, I stumbled upon a fascinating tool that's been buzzing in the developer community: Flowpipe. This innovative platform caught my attention as a unique way to script complex workflows, especially for those who are familiar with Terraform but might not be hardcore coders.

The Matrix: Peeling Back the Layers of Flowpipe

From the developer's standpoint, Flowpipe is crafted with a deep understanding of the challenges and needs in modern development environments. It's designed almost like an imperative (not stateful) version of Terraform. This means that while it shares some conceptual similarities, it operates under a different paradigm. Flowpipe allows developers to script workflows in a sequential and straightforward manner, offering clarity and precision that's often needed in complex deployment scenarios.

Delving into its core, Flowpipe presents itself as the perfect pipeline scripting language for folks who don't traditionally write code but are well-versed in the world of Terraform. Its use of a "hub" for modules and the adoption of HCL (HashiCorp Configuration Language) makes it strikingly reminiscent of writing Terraform scripts. For many, this familiarity breeds convenience, making the transition to Flowpipe smoother and more intuitive.

Pirates of the Caribbean: Navigating the Seas of Modules

Here's a quick module I experimented with to understand Flowpipe's capabilities:

mod "local" {
  title = "create-projects"
  require {
    mod "github.com/turbot/flowpipe-mod-github" {
      version = "*"
    }
  }
}

pipeline "create_repos" {
  param "repo_list" {
    type = string
    description = "Comma-separated list of repositories to create"
  }

  step "pipeline" "create_repo" {
    for_each = toset(split(",", param.repo_list))
    pipeline = github.pipeline.create_repository
    args = {
      visibility = "PUBLIC"
      repository_owner = "salt-extensions"
      repository_name = "saltext-${each.value}"
    }
  }
}

This module, titled "create-projects," utilizes the Flowpipe mod from GitHub to create multiple repositories. The pipeline "create_repos" takes a comma-separated list of repository names and iteratively creates public repositories under the "salt-extensions" owner, each prefixed with "saltext-".

Star Trek: Boldly Running the Pipeline

Running the script is as straightforward as its configuration. With the following command, I could effortlessly initiate the creation of repositories named 'saltext-freezer' and 'saltext-haproxy'.:

flowpipe pipeline run create_repos --arg repo_list=freezer,haproxy

The simplicity and power of Flowpipe in automating such tasks were both impressive and quite handy.

The Good, The Bad and The Ugly: Weighing Preferences in Development Languages

Despite its interesting features, embracing Flowpipe comes down to a matter of preference. You have to really prefer writing HCL over a "normal" programming language. From my perspective, while I appreciate the structure and capabilities of Flowpipe, I personally find it easier just to pick up Python for most tasks. Python's wide-ranging libraries and versatile syntax make it a go-to for a variety of scripting and automation tasks.

A Beautiful Mind: Concluding Thoughts

In conclusion, Flowpipe stands out as a unique tool in the landscape of deployment and workflow scripting. Its familiarity for Terraform users makes it an attractive option for those looking to script without diving deep into traditional programming. However, it's also a reminder of the diverse preferences and approaches in the developer community. Whether you're a seasoned coder or a Terraform enthusiast looking to extend your scripting capabilities, Flowpipe offers an intriguing path to explore. As with any tool, the best approach is to try it out for yourself and see how it fits into your workflow. After all, the right tool is the one that best suits your project's needs and your personal style of coding.

Previous
Previous

Switching Gears: My Rewarding Journey from Network Security to DevOps

Next
Next

Efficient Power Management in AWS