diff --git a/content/blog/2025-07-24-introducing-patternizer.adoc b/content/blog/2025-07-24-introducing-patternizer.adoc new file mode 100644 index 000000000..79afe178c --- /dev/null +++ b/content/blog/2025-07-24-introducing-patternizer.adoc @@ -0,0 +1,110 @@ +--- + date: 2025-07-24 + title: From Helm Charts to Validated Patterns in a Single Command + summary: This post introduces Patternizer, a new tool to simplify pattern authoring. Learn how to convert your Helm charts into a deployable Validated Pattern by generating all required scaffolding with a single command. + author: Drew Minnear + blog_tags: + - patterns + - announce + - patternizer +--- +:toc: +:imagesdir: /images + +Validated Patterns provide a powerful, GitOps-based framework for deploying complex cloud-native applications. We have great resources on our link:https://validatedpatterns.io/learn/[Learn] and link:https://play.validatedpatterns.io/vp-workshop/main/index.html[Workshop] pages, but the initial learning curve can seem steep. + +For developers who just want to package their applications as a pattern, the most common route has been to clone the `multicloud-gitops` repository and adapt it. While effective, this process can be a hurdle for a prospective author who simply wants to know: "How can I turn my Helm charts into a pattern as quickly and painlessly as possible?" + +To bridge this gap, we are thrilled to introduce **link:https://github.com/validatedpatterns/patternizer[Patternizer]**—a new command-line tool designed specifically to address this pain point. + +== The Solution: Patternizer + +Patternizer is a CLI tool that bootstraps a Git repository containing Helm charts into a ready-to-use Validated Pattern. It automatically generates the necessary scaffolding, configuration files, and utility scripts, so you can get your pattern up and running in minutes. + +With Patternizer, you can go from a directory of Helm charts to a fully functional Validated Pattern with a single command. + +== Getting Started: A Quick Workflow + +Let's walk through an example. All you need is a Git repository containing one or more Helm charts and a container runtime like Podman or Docker. + +. **Prepare your repository:** ++ +Clone your repository and create a new branch for the pattern initialization. ++ +[source,bash] +---- +git clone https://github.com/your-org/your-awesome-app.git +cd your-awesome-app +git checkout -b feature/initialize-pattern +---- + +. **Initialize the pattern:** ++ +Navigate to your repository's root and run the Patternizer container, mounting your current directory. ++ +[source,bash] +---- +podman run -v "$PWD:/repo:z" quay.io/hybridcloudpatterns/patternizer init +---- ++ +This single command scans your repository for Helm charts and generates all the necessary files to turn it into a Validated Pattern. + +. **Review and commit:** ++ +Commit the newly generated files to your branch. ++ +[source,bash] +---- +git add . +git commit -m 'feat: Initialize Validated Pattern with Patternizer' +git push -u origin feature/initialize-pattern +---- + +. **Install your new pattern!** ++ +Patternizer also generates a handy utility script. You can now install your pattern just like any other Validated Pattern. ++ +[source,bash] +---- +./pattern.sh make install +---- + +== Under the Hood: What You Get + +Running `patternizer init` creates a set of files that form the foundation of your pattern: + +* `pattern.sh`: A utility script for common operations like `install` and `upgrade`. +* `Makefile` & `Makefile-pattern`: The core Makefiles with all the pattern-related build logic. +* `values-global.yaml`: A place for global pattern configuration. +* `values-prod.yaml`: A cluster group-specific values file (for the default `prod` group). + +The tool is designed to be idempotent. You can continue adding Helm charts to your repository and just rerun the `init` command. It will intelligently update the necessary values files while preserving any manual changes you've made. + +== Need Secrets? We've Got You Covered + +When your pattern is ready to handle sensitive information, you can easily add scaffolding for secrets management. + +Run the `init` command with the `--with-secrets` flag: + +[source,bash] +---- +podman run -v "$PWD:/repo:z" quay.io/hybridcloudpatterns/patternizer init --with-secrets +---- + +This command updates your configuration to integrate with External Secrets Operator (ESO) and Vault. It generates a `values-secret.yaml.template` for defining your secrets and automatically adds the required operator subscriptions to your pattern. + +== Current Scope and Future Direction + +Patternizer is in its infancy, and its initial focus is on solving the Helm-to-Pattern problem. As such, there are a few things to keep in mind: + +. **Helm-Based Patterns Only:** The tool is currently designed exclusively for creating patterns from Helm charts. If you need an Ansible-based GitOps pattern, this tool will not be helpful. + +. **Operators Need Manual Addition:** Patternizer creates the Argo CD `Applications`, `Namespaces`, and `Projects` for your Helm charts. If your pattern requires Operators from OperatorHub, you will need to manually add them to the `subscriptions` section in your cluster group values file (e.g., `values-prod.yaml`). Patternizer conveniently creates this section as an empty map for you. + +. **Single Cluster Group Focus:** The tool generates a single cluster group named `prod` by default. If your use case requires managing multiple, distinct cluster groups, we recommend the traditional approach of cloning the `multicloud-gitops` pattern for now. + +== We Want Your Feedback! + +Patternizer is a simple tool today, but it is extendable to cover more use cases if the need arises. We built it to make your life easier, and your feedback is crucial. + +Please give it a try and don't hesitate to ask for features or report bugs on link:https://github.com/validatedpatterns/patternizer/issues[Patternizer's GitHub issues page]. Happy pattern-making!