This repository contains Heat templates for bootstrapping Openstack instances using Autostrap, along with some handy OS::Neutron wrapper resources.
All templates must reside in a directory with their implemented resource's
name. E.g. the autostrap
resource would reside in autostrap/
.
Resources must be versioned, i.e. whenever a resources' parameters, output or behaviour changes this change results in an incremented version number.
File names in a resource directory match the following pattern:
vversion number.yaml
Where version number reflects the resources version number for each of the resource's versions.
Example:
autostrap/v1.yaml
autostrap/v2.yaml
The latest version must be symlinked to the repository's root directory. The
link must the resource's name with a .yaml
extension, e.g. if
autostrap/v2.yaml
is the latest version of the autostrap
resource, there
would have to be the following symlink in the repository's root directory:
There are two ways to install these resources:
Just issue a
make
in this repository's top-level directory. This will create the Heat environment
file env.yaml
which contains a resource_registry
data structure referencing
all resources in this repository. Add this file to your Heat client's
environment using the -e
option.
Alternatively, you can install these resources as a global environment by cloning this repository to all machines your cloud runs heat-engine on and issuing a
make install
in its top-level directory.
This will create the environment file /etc/heat/environment.d/autostrap.yaml
referencing this repository's resources in a resource_registry
data structure.
All of these resources are prefixed with the namespace component AS
. So you
could use the latest versio of the autostrap resource in the example
above (autostrap/v2.yaml
) in two ways:
- Using the alias referencing the latest resource version:
bootstrap:
type: AS::autostrap
properties:
[...]
- Referencing version 2 explicitly:
bootstrap:
type: AS::autostrap::v2
properties:
[...]
Documentation for these resources can be generated by running make doc
in the
top-level directory. This requires asciidoctor and
autostrap-utils' bin/ directory
to be in $PATH
. Additionally, make lint
will run basic sanity checks on all
resources (it checks for missing description:
fields and report them). This
also requires autostrap-utils.