To launch a Heat stack we need three things: a name for the stack, the template (HOT) that describes the deployment, and finally, the environment file that fills in the blanks of the input parameters.
Ensure that you are logged on to a correctly configured OpenStack client and can access the OpenStack environment. Refer to Chapter 2, The OpenStack Client, for details of setting up your environment to use OpenStack.
Also ensure that you have downloaded the example cookbook.yaml
Heat template and have created the environment file, as described in the previous recipe.
In this section, we will download a HOT file called cookbook.yaml
, which will describe our instance and the network to attach it to:
openstack stack create myStack --template cookbook.yaml --environment cookbook-env.yaml
This will produce an output like the following:
openstack stack list
This will bring back a list of stacks currently running:
Note Stack Status. A successful launch is when it is marked as CREATE_COMPLETE.
Launching a stack is simple. We will specify the HOT file with the --template
parameter, and then we will specify the inputs that get described in the template in a file that we specify with the --environment
parameter.
The syntax is as follows:
openstack stack create nameOfStack --template template.yaml --environment template-env.yaml
18.116.63.191