Booting an instance
The most fundamental tasks that can be performed with instances are life cycle tasks. In this recipe, we will show you how to start or boot an instance.
Getting ready
To start an instance, you will need the following:
The
openstack
command-line clientThe
openrc
file containing appropriate credentialsThe name of the instance
The image to use for the instance
The name of the flavor to create the instance with
The name of the network or networks to attach the instance to
The keypair name to allow access to an instance
The name of any security groups to associate with the instance
How to do it…
The instance we will boot will have the following attributes:
Instance name:
cookbook.test
Flavor type:
openstack.cookbook
Image name:
Ubuntu 16.04 amd64
(UUID)Network:
public
(UUID)Keypair name:
cookbook_key
Security groups:
ssh
To start an instance, use the following steps:
To list the instances that are currently running, we issue the following command:
openstack server list
Note
This command...