Book Image

OpenStack Administration with Ansible

By : Walter Bentley
Book Image

OpenStack Administration with Ansible

By: Walter Bentley

Overview of this book

Most organizations are seeking methods to improve business agility because they have realized just having a cloud is not enough. Being able to improve application deployments, reduce infrastructure downtime, and eliminate daily manual tasks can only be accomplished through some sort of automation. Packed with real-world OpenStack administrative tasks, this book will walk you through working examples and explain how these tasks can be automated using one of the most popular open source automation tools—Ansible. We will start with a brief overview of OpenStack and Ansible and highlight some best practices. Each chapter will provide an introduction to handling various Cloud Operator administration tasks such as creating multiple users/tenants, setting up Multi-Tenant Isolation, customizing your clouds quotas, taking instance snapshots, evacuating compute hosts for maintenance, and running cloud health checks, and a step-by-step tutorial on how to automate these tasks with Ansible.
Table of Contents (18 chapters)
OpenStack Administration with Ansible
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Coding the playbook and roles


Before we start, we should first refer to the beginning of this chapter. We outlined the steps to create users and tenants within your OpenStack cloud. Here they are again for a quick reference:

  • Creating the user (with a corresponding complex secure password)

  • Creating the tenant for the user

  • Linking the user to the tenant while assigning that user with the appropriate role

The first step is to tackle the user creation portion of the process. Creating a user is a simple task in OpenStack, so why not add some administration flares to go along with it. Part of the process of creating a user is to assign that user an appropriate password. We will include this as part of the role that creates the user and tenant that we will assign the user to.

When creating a playbook, I normally start with creating roles to handle the administrative tasks needed. The role will contain all the executable code against OpenStack cloud. The playbook will contain the host to run the role...