Metadata

Each blueprint has a metadata.yaml file at its root level. This file defines things like the blueprint name, version and description, as well as values which the user can provide when rendering the blueprint.

Here is a simple example:

name: foo version: 1 author: thecodesmith description: A simple microservice blueprint values: - name: name description: The name of your project required: true - name: port description: The port where the service listens default: "8000" exclusions: - "images/*"

Let's break it down:

ParameterDescription
nameThe blueprint name
versionThe blueprint version
authorThe blueprint author
descriptionThe blueprint description
valuesA list of values that will be provided to the template rendering
exclusionsA list of glob patterns to exclude from rendering
upgradesAn optional list of upgrade scripts

There can be any number of items in the values list. The structure of each item looks like this:

ParameterDescription
nameThe value key name
descriptionThe description of this value; becomes the interactive prompt text
requiredWhether the value must be provided by the user (true or false)
defaultThe default value if one is not provided by the user

The required field defaults to false, and can be omitted.

The default field can also be omitted. If there is no default, the user will be prompted for this value (if not provided with the -v flag).

The upgrades field can have any number of upgrade scripts in the list. The structure of each upgrade script is like this:

Parameter | Description version | The blueprint version where this script will be run (format: integer) script | The name of the script file in the blueprint scripts directory executable | The executable (program) to use to run the script