OpenStack Administration with Ansible 2 - Second Edition

Book description

Orchestrate and automate your OpenStack cloud operator tasks with Ansible 2.0

About This Book

  • Automate real-world OpenStack cloud operator administrative tasks

  • Construct a collection of the latest automation code to save time on managing your OpenStack cloud

  • Manage containers on your cloud and check the health of your cloud using Nagios

  • Who This Book Is For

    This book is aimed at OpenStack-based cloud operators and infrastructure and sys administrators who have some knowledge of OpenStack and are seeking to automate taxing and manual tasks. This book is also for people new to automating cloud operations in general and the DevOps practice in particular.

    What You Will Learn

  • Efficiently execute OpenStack administrative tasks

  • Familiarize yourself with how Ansible 2 works and assess the defined best practices

  • Create Ansible 2 playbooks and roles

  • Automate tasks to customize your OpenStack cloud

  • Review OpenStack automation considerations when automating administrative tasks

  • Examine and automate advanced OpenStack tasks and designated use cases

  • Get a high-level overview of OpenStack and current production-ready projects

  • Explore OpenStack CLI tools and learn how to use them

  • In Detail

    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.

    Style and approach

    This book is a concise, fast-paced guide filled with real-world scenarios that will execute OpenStack administrative tasks efficiently. It serves as a quick reference guide for not just OpenStack functions, but also for creating future Ansible code.

    Publisher resources

    Download Example Code

    Table of contents

    1. OpenStack Administration with Ansible 2 Second Edition
      1. OpenStack Administration with Ansible 2 Second Edition
      2. Credits
      3. About the Author
      4. About the Reviewer
        1. Why subscribe?
      6. Customer Feedback
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Introduction to OpenStack
        1. An overview of OpenStack
          1. The OpenStack Foundation
        2. Reviewing the OpenStack services
          1. OpenStack Compute (code-name Nova)
          2. OpenStack Object Storage (code-name Swift)
          3. OpenStack Image Service (code-name Glance)
          4. OpenStack Identity (code-name Keystone)
          5. OpenStack Dashboard (code-name Horizon)
          6. OpenStack Networking (code-name Neutron)
          7. OpenStack Block Storage (code-name Cinder)
          8. OpenStack Orchestration (code-name Heat)
          9. OpenStack Telemetry (code-name Ceilometer)
          10. OpenStack Database (code-name Trove)
          11. OpenStack Data Processing (code-name Sahara)
          12. OpenStack Bare Metal Provisioning (code-name Ironic)
          13. Other optional services
        3. OpenStack supporting components
        4. Features and benefits
          1. Fully distributed architecture
          2. Using commodity hardware
          3. Scaling horizontally or vertically
          4. Meeting high availability requirements
          5. Compute isolation and multi-dc Support
          6. Robust role-based access control
        5. Working examples – listing the services
          1. Listing the OpenStack services
            1. Via API
            2. Via CLI
        6. Summary
      9. 2. Introduction to Ansible
        1. Ansible 2.0 overview
        2. What are playbooks, roles, and modules?
          1. Playbooks
          2. Roles
          3. Modules
        3. Setting up the environment
          1. Upgrading to Ansible 2.0
          2. New OpenStack client authentication
        4. Variables and facts
          1. Variables
            1. Setting variable placeholders
            2. Defining variable values
            3. Registering variables
          2. Facts
        5. Defining the inventory
          1. Dynamic inventory
        6. Blocks
        7. Strategies
        8. Cloud integrations
        9. Summary
      10. 3. Creating Multiple Users/Projects
        1. Creating users and projects
          1. Manually creating users and projects
            1. Creating a user
            2. Creating a project
            3. Assigning a role and project access to users
        2. Automation considerations
          1. Defining variables globally or per role
          2. OpenStack API or CLI?
          3. Where to run Ansible
        3. Coding the playbooks and roles
        4. Reviewing playbooks and roles
        5. Summary
      11. 4. Customizing Your Clouds Quotas
        1. Defining and creating quotas
          1. Manually creating quotas
          2. Setting up default quotas
          3. Resetting quota values
        2. Automation considerations
        3. Coding the playbooks and roles
        4. Reviewing playbooks and roles
        5. Summary
      12. 5. Snapshot Your Cloud
        1. Defining backups and snapshots
          1. Manually creating backups and snapshots
          2. Restoring an instance backup
        2. Automation considerations
        3. Coding the playbooks and roles
        4. Reviewing playbooks and roles
        5. Summary
      13. 6. Migrating Instances
        1. Instance migration
          1. Manually migrating instances
          2. Migrating an instance to a specific compute node
        2. Automation considerations
        3. Coding the playbooks and roles
          1. Role details
          2. Variable details
          3. Playbook details
        4. Reviewing playbook and role
        5. Summary
      14. 7. Managing Containers on Your Cloud
        1. The container concept explained
        2. Building and deploying containers
          1. Building containers with Ansible Container
            1. Automation considerations
              1. Step 1
              2. Step 2
              3. Step 3
              4. Step 4
          2. Deploying Kubernetes on OpenStack
            1. Automation considerations
          3. Managing CoreOS and Docker with Ansible
            1. Automation considerations
            2. Coding the playbooks and roles
          4. Deploying Nova LXD on OpenStack
            1. Automation considerations
        3. Reviewing playbooks and roles
        4. Summary
      15. 8. Setting Up Active-Active Regions
        1. Reviewing OpenStack high availability scenarios
          1. Multiple data centers
          2. Single data center
          3. Availability Zones
        2. Why to use Active-Active cloud regions?
        3. Setting up Active-Active cloud regions
          1. Region endpoint inventory
          2. Admin region configurations
            1. Creating service user accounts on the Admin region
            2. Creating services on the Admin region
            3. Registering each region's endpoints to the Admin region
            4. Adjusting the Admin regions' identity endpoint
          3. Active region configurations
        4. Coding the playbooks and roles
          1. Setting up the Admin region
          2. Setting up Active regions
        5. Reviewing playbooks and roles
        6. Summary
      16. 9. Inventory Your Cloud
        1. Collecting cloud metrics
          1. User report
          2. Project report
          3. Network report
          4. Volume report
          5. Cloud-at-a-Glance report
        2. Coding the playbooks and roles
          1. cloud-inventory
          2. cloud-usage
          3. user-inventory
          4. project-inventory
          5. network-inventory
          6. volume-inventory
        3. Reviewing playbooks and roles
        4. Summary
      17. 10. Health Check Your Cloud with Nagios
        1. Monitoring the cloud
          1. OpenStack service processes
          2. Infrastructure services
            1. MariaDB and Galera
            2. RabbitMQ
        2. Core OpenStack services
          1. Service and process check examples
        3. Setting up Nagios and import checks
          1. Collect your metrics via SNMP
        4. Coding the playbooks and roles
          1. snmp-config
          2. install-nagios
          3. nagios-plugins
          4. install-nconf
          5. nconf-post-install
          6. create-nagios-user
          7. infra-plugin-config
          8. nagios-post-install
        5. Reviewing playbook and role
        6. Summary

    Product information

    • Title: OpenStack Administration with Ansible 2 - Second Edition
    • Author(s): Walter Bentley
    • Release date: December 2016
    • Publisher(s): Packt Publishing
    • ISBN: 9781787121638