You are previewing OpenStack Cloud Computing Cookbook - Third Edition.
O'Reilly logo
OpenStack Cloud Computing Cookbook - Third Edition

Book Description

Over 110 effective recipes to help you build and operate OpenStack cloud computing, storage, networking, and automation

About This Book

  • Explore many new features of OpenStack's Juno and Kilo releases
  • Install, configure, and administer core projects with the help of OpenStack Object Storage, Block Storage, and Neutron Networking services
  • Harness the abilities of experienced OpenStack administrators and architects, and run your own private cloud successfully
  • Practical, real-world examples of each service and an accompanying Vagrant environment that helps you learn quickly
  • In Detail

    OpenStack Open Source software is one of the most used cloud infrastructures to support software development and big data analysis. It is developed by a thriving community of individual developers from around the globe and backed by most of the leading players in the cloud space today.

    It is simple to implement, massively scalable, and can store a large pool of data and networking resources. OpenStack has a strong ecosystem that helps you provision your cloud storage needs. Add OpenStack's enterprise features to reduce the cost of your business.

    This book will show you the steps to build up a private cloud environment. At the beginning, you'll discover the uses of cloud services such as the identity service, image service, and compute service. You'll dive into Neutron, the OpenStack Networking service, and get your hands dirty with configuring ML2, networks, routers, and Distributed Virtual Routers. You’ll then gather more expert knowledge on OpenStack cloud computing by managing your cloud's security and migration. After that, we delve in to OpenStack Object storage and how to manage servers and work with objects, cluster, and storage functionalities. Also, as you go deeper into the realm of OpenStack, you'll learn practical examples of Block storage, LBaaS, and FWaaS: installation and configuration covered ground up. Finally, you will learn OpenStack dashboard, Ansible and Foreman, Keystone, and other interesting topics.

    What You Will Learn

  • Understand, install, configure, and manage Nova—the OpenStack Cloud Compute resource
  • Configure ML2, networks, routers, and Distributed Virtual Routers with Neutron
  • Use and secure Keystone, the OpenStack Authentication service
  • Install and set up Swift and Container Replication between datacenters
  • Gain hands-on experience and familiarity with Horizon, the OpenStack Dashboard user interface
  • Automate complete solutions with our recipes on Heat, the OpenStack Orchestration service
  • Use Ansible and Foreman to automate OpenStack installations successfully
  • Follow practical advice and examples to run OpenStack in production
  • Who This Book Is For

    This book is aimed at cloud system engineers, system administrators, and technical architects who are moving from a virtualized environment to cloud environments. This book assumes that you are familiar with cloud computing platforms, and have knowledge of virtualization, networking, and managing Linux environments.

    Style and approach

    Clear, step-by-step instructions coupled with practical and applicable recipes that'll enable you to use and implement the latest features of OpenStack.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

    Table of Contents

    1. OpenStack Cloud Computing Cookbook Third Edition
      1. Table of Contents
      2. OpenStack Cloud Computing Cookbook Third Edition
      3. Credits
      4. Foreword
      5. About the Authors
      6. About the Reviewers
      7. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      8. 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. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      9. 1. Keystone – OpenStack Identity Service
        1. Introduction
        2. Installing the OpenStack Identity Service
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Configuring OpenStack Identity for SSL communication
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Creating tenants in Keystone
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Configuring roles in Keystone
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Adding users to Keystone
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Defining service endpoints
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Creating the service tenant and service users
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Configuring OpenStack Identity for LDAP Integration
          1. Getting ready
          2. How to do it...
          3. How it works...
      10. 2. Glance – OpenStack Image Service
        1. Introduction
        2. Installing OpenStack Image Service
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Configuring OpenStack Image Service with OpenStack Identity Service
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Configuring OpenStack Image Service with OpenStack Object Storage
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Managing images with OpenStack Image Service
          1. Getting ready
          2. How to do it...
            1. Uploading Ubuntu images
            2. Listing images
            3. Viewing image details
            4. Deleting images
            5. Making private images public
          3. How it works
        6. Registering a remotely stored image
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Sharing images among tenants
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Viewing shared images
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Using image metadata
          1. Getting ready
          2. How to do it...
            1. Updating image properties
            2. Deleting all image properties
            3. Deleting specific image properties
            4. Using metadata for host scheduling
          3. How it works...
          4. See also
        10. Migrating a VMware image
          1. Getting ready
          2. How to do it...
          3. How it works...
        11. Creating an OpenStack image
          1. Getting ready
          2. How to do it...
          3. How it works...
      11. 3. Neutron – OpenStack Networking
        1. Introduction
        2. Installing Neutron and Open vSwitch on a dedicated network node
          1. Getting ready…
          2. How to do it...
          3. How it works...
        3. Configuring Neutron and Open vSwitch
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Installing and configuring the Neutron API service
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See Also
        5. Creating a tenant Neutron network
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Deleting a Neutron network
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Creating an external floating IP Neutron network
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Using Neutron networks for different purposes
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Configuring Distributed Virtual Routers
          1. Getting ready
          2. How to do it...
            1. Network node
            2. The Controller Node
            3. Compute nodes
          3. How it works...
        10. Using Distributed Virtual Routers
          1. Getting ready
          2. How to do it...
          3. How it works...
      12. 4. Nova – OpenStack Compute
        1. Introduction
        2. Installing OpenStack Compute controller services
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Installing OpenStack Compute packages
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There’s more...
            1. Using an alternative release
        4. Configuring database services
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Configuring OpenStack Compute
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There’s more...
          5. See also
        6. Configuring OpenStack Compute with OpenStack Identity Service
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Stopping and starting nova services
          1. Getting ready
            1. Controller
            2. Compute
          2. How to do it...
          3. How it works...
        8. Installation of command-line tools on Ubuntu
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        9. Using the command-line tools with HTTPS
          1. Getting ready
          2. How to do it...
          3. How it works...
        10. Checking OpenStack Compute services
          1. Getting ready
          2. How to do it...
          3. How it works...
        11. Using OpenStack Compute
          1. Getting ready
          2. How to do it...
          3. How it works...
        12. Managing security groups
          1. Getting ready
          2. How to do it...
            1. Creating security groups
            2. Removing a rule from a security group
            3. Deleting a security group
          3. How it works...
            1. Defining groups and rules using Nova client
        13. Creating and managing key pairs
          1. Getting ready
          2. How to do it...
            1. Listing and deleting key pairs using Nova client
            2. Listing the key pairs
            3. Deleting the key pairs
          3. How it works...
        14. Launching our first cloud instance
          1. Getting ready
          2. How to do it...
          3. How it works...
        15. Fixing a broken instance deployment
          1. Getting ready
          2. How to do it...
          3. How it works...
        16. Terminating your instances
          1. How to do it...
          2. How it works...
        17. Using live migration
          1. Getting ready
            1. Checking network connectivity
            2. Ensuring resources
          2. How to do it...
          3. How it works...
        18. Working with nova-schedulers
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There’s more...
        19. Creating flavors
          1. Getting ready
          2. How to do it...
          3. How it works...
        20. Defining host aggregates
          1. Getting ready
          2. How to do it...
          3. How it works...
        21. Launching instances in specific Availability Zones
          1. Getting ready
          2. How to do it...
          3. How it works...
        22. Launching instances on specific Compute hosts
          1. Getting ready
          2. How to do it...
          3. How it works...
        23. Removing Nova nodes from a cluster
          1. Getting ready
          2. How to do it...
          3. How it works...
      13. 5. Swift – OpenStack Object Storage
        1. Introduction
        2. Configuring Swift services and users in Keystone
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Installing OpenStack Object Storage services – proxy server
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Configuring OpenStack Object Storage – proxy server
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Installing OpenStack Object Storage services – storage nodes
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Configuring physical storage for use with Swift
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Configuring Object Storage replication
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Configuring OpenStack Object Storage – storage services
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Making the Object Storage rings
          1. Getting ready
          2. How to do it...
          3. How it works…
        10. Stopping and starting OpenStack Object Storage
          1. Getting ready
          2. How to do it...
          3. How it works...
        11. Setting up SSL access
          1. Getting ready
          2. How to do it...
          3. How it works...
      14. 6. Using OpenStack Object Storage
        1. Introduction
        2. Installing the swift client tool
          1. Getting ready
          2. How to do it...
          3. How it works…
        3. Creating containers
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Uploading objects
          1. Getting ready
          2. How to do it...
            1. Uploading files
            2. Uploading directories and their contents
            3. Uploading multiple objects
          3. How it works...
        5. Uploading large objects
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Listing containers and objects
          1. Getting ready
          2. How to do it...
            1. Listing all objects in a container
            2. Listing specific object paths in a container
          3. How it works...
        7. Downloading objects
          1. Getting ready
          2. How to do it...
            1. Downloading objects
            2. Downloading objects with the -o parameter
            3. Downloading all objects from a container
            4. Downloading all objects from our OpenStack Object Storage account
          3. How it works...
        8. Deleting containers and objects
          1. Getting ready
          2. How to do it...
            1. Deleting objects
            2. Deleting multiple objects
            3. Deleting containers
            4. Deleting everything from our account
          3. How it works...
        9. Using OpenStack Object Storage ACLs
          1. Getting ready
          2. How to do it...
          3. How it works
        10. Using Container Synchronization between two Swift Clusters
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more…
      15. 7. Administering OpenStack Object Storage
        1. Introduction
        2. Managing the OpenStack Object Storage cluster with swift-init
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more…
        3. Checking cluster health
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Managing the Swift cluster capacity
          1. Getting ready
          2. How to do it...
            1. Proxy server creation
            2. Storage node creation
          3. How it works...
        5. Removing nodes from a cluster
          1. Getting ready
          2. How to do it...
            1. Proxy Server
          3. How it works...
        6. Detecting and replacing failed hard drives
          1. Getting ready
          2. How to do it...
            1. Storage node
          3. How it works...
        7. Collecting usage statistics
          1. Getting ready
          2. How to do it...
          3. How it works...
      16. 8. Cinder – OpenStack Block Storage
        1. Introduction
        2. Configuring Cinder-volume services
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Configuring OpenStack Compute for Cinder-volume
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Creating volumes
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Attaching volumes to an instance
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Detaching volumes from an instance
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Deleting volumes
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Configuring third-party volume services
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Working with Cinder snapshots
          1. Getting ready
          2. How to do it...
          3. How it works...
        10. Booting from volumes
          1. Getting ready
          2. How to do it...
          3. How it works...
      17. 9. More OpenStack
        1. Introduction
        2. Using cloud-init to run post-installation commands
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more…
        3. Using cloud-config to run the post-installation configuration
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Installing OpenStack Telemetry
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Using OpenStack Telemetry to interrogate usage statistics
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Installing Neutron LBaaS
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Using Neutron LBaaS
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Configuring Neutron FWaaS
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Using Neutron FWaaS
          1. Getting ready
          2. How to do it...
          3. How it works...
        10. Installing the Heat OpenStack Orchestration service
          1. Getting ready
          2. How to do it...
          3. How it works...
        11. Using Heat to spin up instances
          1. Getting ready
          2. How to do it...
          3. How it works...
      18. 10. Using the OpenStack Dashboard
        1. Introduction
        2. Installing OpenStack Dashboard
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Using OpenStack Dashboard for key management
          1. Getting ready
          2. How to do it...
            1. Adding key pairs
            2. Deleting key pairs
            3. Importing key pairs
          3. How it works...
        4. Using OpenStack Dashboard to manage Neutron networks
          1. Getting ready
          2. How to do it...
            1. Creating networks
            2. Deleting networks
            3. Viewing networks
          3. How it works...
        5. Using OpenStack Dashboard for security group management
          1. Getting ready
          2. How to do it...
            1. Creating a security group
            2. Editing security groups to add and remove rules
            3. Deleting security groups
          3. How it works...
        6. Using OpenStack Dashboard to launch instances
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Using OpenStack Dashboard to terminate instances
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Using OpenStack Dashboard to connect to instances using a VNC
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Using OpenStack Dashboard to add new tenants – projects
          1. Getting ready
          2. How to do it...
          3. How it works...
        10. Using OpenStack Dashboard for user management
          1. Getting ready
          2. How to do it...
            1. Adding users
            2. Deleting users
            3. Updating user details and passwords
            4. Adding users to tenants
            5. Removing users from tenants
          3. How it works...
        11. Using OpenStack Dashboard with LBaaS
          1. Getting ready
          2. How to do it...
            1. Creating pools
            2. Adding pool members
            3. Adding a VIP to the Load Balancer pool
            4. Deleting the Load Balancer
          3. How it works...
        12. Using OpenStack Dashboard with OpenStack Orchestration
          1. Getting ready
          2. How to do it...
            1. Launching stacks
            2. Viewing stack details
            3. Deleting stacks
          3. How it works...
      19. 11. Production OpenStack
        1. Introduction
        2. Installing the MariaDB Galera cluster
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Configuring HA Proxy for the MariaDB Galera cluster
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Configuring HA Proxy for high availability
          1. Getting ready
          2. How to do it...
            1. OpenStack backend configuration using FloatingIP address
          3. How it works...
        5. Installing and configuring Pacemaker with Corosync
          1. Getting ready
          2. How to do it...
            1. Setting up the first node – controller1
            2. Setting up the second node – controller2
            3. Configuring the first node – controller1
            4. Configuring the second node – controller2
            5. Starting the Pacemaker and Corosync services
          3. How it works...
        6. Configuring OpenStack services with Pacemaker and Corosync
          1. Getting ready
          2. How to do it...
            1. Glance across two nodes with FloatingIP
            2. Configuring Pacemaker for use with Glance and Keystone
          3. How it works...
        7. Bonding network interfaces for redundancy
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        8. Automating OpenStack installations using Ansible – host configuration
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Automating OpenStack installations using Ansible – Playbook configuration
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        10. Automating OpenStack installations using Ansible – running Playbooks
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
      20. Index