Getting started with Stitch

Stitch is a collection of tools available out-of-the-box with Deploy. Stitch extends Deploy’s capability and enables the field experts in your organization to define and build scaled customizations and variants of reusable deployment patterns that your cloud-native teams can effortlessly consume for their cloud and container deployments.

Stitch is Deploy’s new configuration and variant generation solution. And unlike other solutions, Stitch is a scaled configuration composer that is applicable to a variety of deployment destinations, not just Kubernetes.

Using Stitch, field and subject matter DevOps experts can:

  • Enable the application of reusable code blocks, complex patching, and policy validation on applications being deployed with Terraform, CloudFormation, Azure ARM, and Kubernetes YAML and JSON configuration files.

    Note: * For the list of Deploy plugins that currently support Stitch, see Plugin support in Stitch

  • Define re-useable customizations to generate the YAML / JSON to be consumed across the organization

How Stitch works

DevOps experts can create Stitch rules to define the customizations they wish to use, see  Stitch rules. Stitch rules are declarative YAML files made up of conditions and processors sections that can be used to specify when to activate the rule and define what actions to take. A condition may be a certain type of deployed, a flag which defines the rules to be applied as a part of preprocessing/postprocessing transformation or an expression which evaluates an environment name, a tag, and basically anything that is either accessible from the deployment planning context of Deploy, or is provided as a content of a configuration file.

A processor can be one of the following types: macros, Groovy script, FreeMarker template, Patch and AddYamlObject. Adding new processor types is available through Stitch extensibility options.

DevOps experts can define reusable customization logic primitives as code snippets in YAML files and share them with the entire organization in the form of Stitch macros. Other users in the organization can use available macros when creating new rules and also choose for which deployments to activate them using rule conditions.

You can store your customization definitions viz. macros and rules, in a Git repository of your choice, and connect this repository to Stitch via its GUI, ‘DevOps as Code’, REST API, or Jython CLI. See Stitch repositories for more details.

The Stitch Engine fetches customizations from all known repositories into a single centralized database. The Stitch Workbench is a part of Deploy’s web-based user interface that provides an overview of all customizations known to Stitch. See Stitch Workbench.

Deploy uses the Stitch Engine as part of the Planning phase of the deployment process. For each deployment planning the Stitch Engine evaluates the conditions for all known customizations and selects those that apply. Using concepts of Phase and Weight, it decides upon the order of customizations in steps, and applies them to a configuration file content.

At the end of the planning phase Deploy provides an insight into which Stitch customizations were applied, the order in which they were applied, and the result of each step of the customization. In case of any errors during the deployment planning you would be able to troubleshoot them. See Deployment Preview and Stitch troubleshooting