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

Playbook and role review


Let's jump right into examining the roles we created.

The completed role and file named main.yml located in the install-docker/tasks directory looks similar to this:

---

- name: Install additional packages
apt: name={{item}} state=present
with_items:
   - git
   - wget

- name: Pull down and install Docker packages
shell: chdir=/opt wget -qO- https://get.docker.com/ | sh

- name: Verify the Docker install
command: docker run hello-world

- name: Add Nova user to Docker group
command: usermod -aGdocker nova

The completed role and file named main.yml located in the nova-docker/tasks directory looks as follows:

---

- name: Pull down nova-docker package
command: chdir=/opt git clone http://github.com/stackforge/nova-docker.git

- name: Check out nova-docker branch pre-i18n
command: chdir=/opt/nova-dockergit checkout -b pre-i18n d1ad84793b7f2182de04df8a5323d6928af672ca

- name: Install nova-docker package
command: chdir=/opt/nova-docker pip install

The completed role and...