Book Image

OpenStack Administration with Ansible 2 - Second Edition

Book Image

OpenStack Administration with Ansible 2 - Second Edition

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. We start with a brief overview of OpenStack and Ansible 2 and highlight some best practices. Each chapter will provide an introduction to handling various Cloud Operator administration tasks such as managing containers within your cloud; setting up/utilizing open source packages for monitoring; creating multiple users/tenants; taking instance snapshots; and customizing your cloud to run multiple active regions. Each chapter will also supply a step-by-step tutorial on how to automate these tasks with Ansible 2. 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 on the market today.
Table of Contents (17 chapters)
OpenStack Administration with Ansible 2 Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Coding the playbooks and roles


The playbook and role we will now create will allow you to take a snapshot of all instances within a single tenant at one time. This distinct task was chosen to try to keep the role simple and not to overcomplicate the tasks. You could very well also create a role to snapshot or backup all instances in all tenants with the removal of just one parameter. Pretty awesome, right? Well, send your thank you cards to Ansible for that.

At the beginning of this chapter, we reviewed the process of how to take instance backups and snapshots. It was a simple two-step process. For the purposes of automating this task, we have to add an additional step to the process. That step would be to get the tenant ID for the tenant we plan to take the snapshot(s) from. So in the big picture, there would be three steps. Step 1 is to record the tenant ID in which you wish to take instance snapshot(s) for. Step 2 is to now list all instance IDs from the tenant. Then, finally, Step 3 is...