Popular Articles

The XebiaLabs DevOps Platform provides visibility and synchronizes data across the CI/CD pipeline by connecting issue tracking and ITSM ticketing tools, so that user stories and change tickets are always up to date.

Subscribe for more!

Blueprints are a key feature of XebiaLabs’ DevOps as Code approach; they guide teams through a fast, easy process that automatically generates YAML files that describe applications, infrastructure, and more as code that can be checked into a source control management system. Blueprints allow you to embed corporate policies, security requirements, and best practices in code that you can share across the enterprise, so it’s easier to on-board teams to the DevOps toolchain and migrate applications to new technologies such as container platforms and cloud-based environments.

XebiaLabs provides sample blueprints that help you migrate applications to platforms such as Amazon ECS and EKS—but you can build your own blueprints, too! For example, say you want to make it easy for Jane, a new developer, to deploy Docker containers on her local Docker installation. Let’s see what that would look like.

Step 1 Build the blueprint YAML file

The blueprint YAML file provides the questions that Jane will answer, defines default answers where needed, and identifies the templates (tmpl files) that the XL command-line interface (CLI) should use for the output. This example assumes that Jane’s application is packaged in two Docker images: one for the front end, and one for the back end.

Step 2 Encode best practices in YAML templates

The magic of blueprints lies in templates for the YAML files that the XL CLI will generate. Templates enable you to build corporate requirements and technical best practices directly in code—no need for Jane to know the ins and outs of the target configuration.

In a template, the values between double curly brackets will be replaced with information that’s specific to Jane’s application and Docker setup. For example, this template requires an application name, the names of the two Docker images, and the port bindings to pass to the Docker installation.

Step 3 Run the blueprint!

Jane just needs to install the XL CLI, execute xl blueprint, select the blueprint, and answer the questions that are defined in the blueprint YAML file.

The XL CLI uses Jane’s answers to generate YAML files based on the templates that you created. The xebialabs.yaml file points to the other generated files, so that Jane can later apply everything with a single CLI command.

In this case, Jane didn’t need to provide any sensitive data; but if that was required, the data would be stored in xlvals files. The gitignore file ensures that Jane doesn’t accidentally check sensitive data into source control management.

Jane can check the generated YAML files into a source control management (SCM) system, in the same repository as her application code. SCM will secure the YAML files and make it easy for Jane’s team to collaborate on any modifications that are required in the future. SCM also tracks their changes and version-controls the files, so it’s easy to roll back unwanted changes.

Step 5 Bring it all together

After the YAML files are generated, Jane can put them to use! A simple xl apply command sends the YAML to the XebiaLabs DevOps Platform, which creates the required configuration items and release template.

Try it yourself

Are you using Docker? You can try this blueprint today! Just download the XL CLI and execute xl blueprint to access XebiaLabs’ publicly available blueprints. If you aren’t using the XebiaLabs DevOps Platform yet, sign up for a free trial to get started.

Check out a demo featuring Amazon EKS

Are you interested in a more advanced blueprint scenario? Check out this video, which shows how you can use DevOps as Code to deploy a microservice-based application on Amazon EKS.

The Reality of Software Releases

Many organizations model software delivery as if the features that are initially planned for a release are always the features that are actually delivered to production when the release is done. But the reality of software releases is more complicated than that, because it’s hard to predict the delivery of planned features. The XebiaLabs DevOps Platform can help you deal with the reality of software releases. See for yourself!

Start Your Trial

The XebiaLabs DevOps Platform provides the intelligence, automation, and control that technical and business teams need.