Book Image

OpenStack Cloud Computing Cookbook

By : Egle Sigler, Kevin Jackson, Cody Bunch
Book Image

OpenStack Cloud Computing Cookbook

By: Egle Sigler, Kevin Jackson, Cody Bunch

Overview of this book

Table of Contents (19 chapters)
OpenStack Cloud Computing Cookbook Third Edition
About the Authors
About the Reviewers

Using cloud-init to run post-installation commands

Cloud-init was originally developed by Canonical and is the de facto standard for running post-installation commands and configuration on a cloud instance. When an instance is launched, if cloud-init is part of the image being used, it will look for metadata information passed to it at launch time to do post-installation execution of commands. When a shell script is used (as demonstrated in the following How to do it… section of this recipe), it can be analogous to running commands in the /etc/rc.local working directory of a Linux machine. Cloud-init relies on data being sent from the nova-metadata API service. An instance looks for data associated with the particular instance and executes it accordingly. This section will cover the basics of using cloud-init.

Getting ready

Ensure that you are logged into a Ubuntu host that has access to our OpenStack environment on the public network. This host will be used to run client...