Depending on the platform Autostrap is deployed on, there are various entry points into the bootstrapping process. We refer to these entry points as Bootstrapping Stage 0. The first common point for all platforms is the initialize_instance script. This script we also refer to as Bootstrapping Stage 1. It is the starting point for the actual bootstrapping process. Currently, there are the following Stage 0 mechanisms for calling it:
Heat Resource
For Openstack platforms we developed the AS::autostrap Heat resource. It generates a user-data script ready to be passed into OS::Nova::Server instances. This script turns the parameters it receives through Heat into environment variables, clones bootstrap-scripts and launches initialize_instance in this environment. Usually you will only need one instance of this resource per Heat stack, i.e. you can pass the same generated script to all Nova servers in your stack.
autostrap.standalone
For environments without Heat and cloud-init we developed autostrap.standalone. This script provides the same environment as the AS::autostrap Heat resource and invokes initialize_instance as well. It emulates the Heat based parametrization mechanisms detailed in the Life of a Stack section with the following two mechanisms:
-
Parameters that are passed into AS::autostrap as Heat properties are retrieved from identically named environment variables.
-
cloud-init metadata parameters are passed as
=
delimited key-value arguments toautostrap.standalone
's-m
option.
Example:
autostrap.standalone -m topics=puppet-agent \
-m nodetype=appserver