OpenStack Cloud Computing Cookbook - Fourth Edition

Book description

The Fourth Edition of the industry-acclaimed OpenStack Cloud Computing Cookbook, from four recognized experts, updated to the latest OpenStack build including Cinder, Nova, and Neutron.

About This Book

  • Over 100 recipes created by a team of OpenStack experts
  • Updated to work with the latest OpenStack builds, with recipes covering the installation and use of OpenStack with Ansible
  • It covers topics such as Keystone, Glance, Neutron, Nova, Cinder, and more, plus recipes for OpenStack storage, networking, and orchestrating workloads
  • Test drive OpenStack using the accompanying Vagrant environment

Who This Book Is For

This book is written for 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.

What You Will Learn

  • Understand, install, configure, and manage a complete OpenStack Cloud platform using OpenStack-Ansible
  • Configure networks, routers, load balancers, and more with Neutron
  • Use Keystone to setup domains, roles, groups and user access
  • Learn how to use Swift and setup container access control lists
  • 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 as well as using Ansible to orchestrate application workloads
  • Follow practical advice and examples to run OpenStack in production

In Detail

This is the fourth edition of the industry-acclaimed OpenStack Cloud Computing Cookbook, created by four recognized OpenStack experts. It has now been updated to work with the latest OpenStack builds, using tools and processes based on their collective and vast OpenStack experience.

OpenStack Open Source Cloud software is one of the most used cloud infrastructures to support a wide variety of use cases, from software development to 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. We make it simple to implement, massively scalable, and able to 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 begin by showing you the steps to build up an OpenStack private cloud environment using Ansible. You'll then 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 networks, routers, load balancers, and more.

You'll then gather more expert knowledge on OpenStack cloud computing by managing your cloud's security and migration. After that, we delve into OpenStack Object storage and you'll see how to manage servers and work with objects, cluster, and storage functionalities. Finally, you will learn about OpenStack dashboard, Ansible, Keystone, and other interesting topics.

Style and approach

Clear, step-by-step instructions coupled with practical and applicable recipes that will enable you to use and implement the latest features of OpenStack. The authors provide all the context you need around each recipe so that you can make it part of your own OpenStack solutions.

Table of contents

  1. OpenStack Cloud Computing Cookbook Fourth Edition
    1. Table of Contents
    2. OpenStack Cloud Computing Cookbook Fourth Edition
      1. Why subscribe?
      2. PacktPub.com
    3. Contributors
      1. About the authors
      2. About the reviewers
      3. Packt is searching for authors like you
    4. Preface
      1. Who this book is for
      2. What this book covers
      3. To get the most out of this book
        1. Download the example code files
        2. Download the color images
        3. Conventions used
      4. Sections
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There’s more…
        5. See also
      5. Get in touch
        1. Reviews
    5. 1. Installing OpenStack with Ansible
      1. Introduction – the OpenStack architecture
        1. Controllers
        2. Computes
        3. Storage
        4. Load balancing
        5. OpenStack-Ansible installation requirements
          1. Minimal data center deployment requirements
      2. Host network configuration
        1. Getting ready
        2. How to do it…
        3. How it works…
      3. Root SSH keys configuration
        1. Getting ready
        2. How to do it…
        3. How it works…
      4. Installing Ansible, playbooks, and dependencies
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      5. Configuring the installation
        1. Getting ready
        2. How to do it...
        3. How it works…
      6. Running the OpenStack-Ansible playbooks
        1. Getting ready
        2. How to do it…
        3. How it works…
      7. Troubleshooting the installation
        1. How to do it...
        2. How it works…
      8. Manually testing the installation
        1. Getting ready
        2. How to do it…
        3. How it works…
      9. Modifying the OpenStack configuration
        1. Getting ready
        2. How to do it...
        3. How it works…
      10. Virtual lab - vagrant up!
        1. Getting ready
        2. How to do it…
        3. How it works…
    6. 2. The OpenStack Client
      1. Introduction – using OpenStack
      2. Installing Python on Windows
        1. Getting ready
        2. How to do it…
        3. How it works…
      3. Installing the OpenStack clients
        1. Getting ready
        2. How to do it…
          1. Alternative – use a preconfigured OpenStack client virtual machine
        3. How it works…
      4. Configuring your Linux or macOS environment
        1. Getting ready
        2. How to do it…
        3. How it works…
      5. Configuring your Windows environment
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Common OpenStack networking tasks
        1. Getting ready
        2. How to do it…
          1. Creating a network
            1. Creating a provider network (for use with Floating IPs)
            2. Creating a new security group
            3. Adding a rule to a security group
            4. Creating a router
            5. Adding a subnet to a router
              1. Setting a gateway on the router
      7. Common OpenStack server (instances) tasks
        1. Getting ready
        2. How to do it…
          1. Launching an instance
          2. Listing OpenStack Instances
          3. Create instance snapshot
          4. Resizing an instance
          5. Creating a flavor
      8. Common OpenStack image tasks
        1. Getting ready
        2. How to do it…
          1. Uploading an image to Glance
          2. Downloading an image or snapshot from Glance as a file
          3. Sharing images between projects
      9. Common OpenStack identity tasks
        1. Getting ready
        2. How to do it…
          1. Creating a new project
          2. Creating a user
          3. Adding a user to a project
          4. Changing a user's password as an administrator
          5. Changing your own password
      10. Common OpenStack storage tasks
        1. Getting ready
        2. How to do it…
          1. Create a new Cinder volume
          2. Attaching a volume
          3. Detaching a volume
          4. Creating a volume snapshot
          5. Listing Object Storage containers and contents
          6. Creating and uploading files to the Object Storage service
          7. Downloading from Object Storage
      11. Common OpenStack orchestration tasks
        1. Getting ready
        2. How to do it…
          1. Launch a stack from a template and environment file
          2. Listing stacks
          3. Deleting a running stack
          4. Listing resources in a stack
          5. Viewing the outputs of a running Stack
    7. 3. Keystone – OpenStack Identity Service
      1. Introduction – OpenStack Identity
      2. Creating OpenStack domains in Keystone
        1. Getting ready
        2. How to do it…
        3. How it works…
      3. Enabling domains in the OpenStack dashboard
        1. Getting ready
        2. How to do it…
        3. How it works…
      4. Creating OpenStack projects 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 in Keystone
        1. Getting ready
        2. How to do it…
        3. How it works…
      7. Configuring groups in Keystone
        1. Getting ready
        2. How to do it…
        3. How it works…
          1. Add group to a role:
      8. Deleting projects
        1. Getting ready
        2. How to do it…
        3. How it works…
      9. Deleting users
        1. Getting ready
        2. How to do it…
        3. How it works…
      10. Deleting roles
        1. Getting ready
        2. How to do it…
        3. How it works…
      11. Deleting groups
        1. Getting ready
        2. How to do it…
        3. How it works…
      12. Deleting domains
        1. Getting ready
        2. How to do it…
        3. How it works…
      13. OpenStack endpoint information
        1. Getting ready
        2. How to do it…
        3. How it works…
    8. 4. Neutron – OpenStack Networking
      1. Introduction to OpenStack networking
      2. Managing networks, subnets, and ports
      3. Creating provider networks
        1. Getting ready
        2. How to do it…
        3. How it works...
      4. Creating tenant networks
        1. Getting ready
        2. How to do it…
        3. How it works...
      5. Creating ports
        1. Getting ready
        2. How to do it…
        3. How it works...
      6. Updating network attributes
        1. Getting ready
        2. How to do it…
        3. How it works...
      7. Deleting ports
        1. Getting ready
        2. How to do it…
      8. Deleting networks
        1. Getting ready
        2. How to do it…
        3. How it works...
      9. Managing routers and floating IPs
        1. Creating routers
        2. Getting ready
        3. How to do it…
        4. How it works...
      10. Attaching networks to routers
        1. Getting ready
        2. How to do it…
        3. How it works...
      11. Creating and assigning floating IPs
        1. Getting ready
        2. How to do it…
        3. How it works…
      12. Deleting routers
        1. Getting ready
        2. How to do it…
        3. How it works...
      13. Managing security groups
        1. Creating security groups
        2. Getting ready
        3. How to do it…
        4. How it works...
        5. Creating security group rules
        6. Getting ready
        7. How to do it…
        8. How it works...
        9. Applying security groups to instances
        10. Getting ready
        11. How to do it…
        12. How it works...
      14. Managing load balancers
        1. Creating load balancers
        2. Getting ready
        3. How to do it…
        4. How it works...
        5. Creating pools
        6. Getting ready
        7. How to do it…
        8. How it works...
        9. Creating members
        10. Getting ready
        11. How to do it…
        12. How it works...
        13. Creating listeners
        14. Getting ready
        15. How to do it…
        16. How it works...
        17. Verifying connectivity
        18. Getting ready
        19. How to do it…
    9. 5. Nova – OpenStack Compute
      1. Introduction to OpenStack Compute
      2. Adding a compute host using OpenStack-Ansible
        1. Getting ready
        2. How to do it…
        3. How it works…
      3. Suspending a host for maintenance
        1. Getting ready
        2. How to do it…
        3. How it works…
      4. Configuring Nova Scheduler to use host aggregates
        1. Getting ready
        2. How to do it…
        3. How it works…
      5. Creating a host aggregate
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Adding a compute host to a host aggregate
        1. Getting ready
        2. How to do it…
        3. How it works…
      7. Removing a compute host from a host aggregate
        1. Getting ready
        2. How to do it…
        3. How it works…
      8. Adding metadata to a host aggregate
        1. Getting ready
        2. How to do it…
        3. How it works…
      9. Deleting a host aggregate
        1. Getting ready
        2. How to do it…
        3. How it works…
      10. Creating an Availability Zone
        1. Getting ready
        2. How to do it…
        3. How it works…
      11. Booting an instance into an Availability Zone
        1. Getting ready
        2. How to do it…
        3. How it works…
      12. Removing an Availability Zone
        1. Getting ready
        2. How to do it…
        3. How it works…
      13. Creating a flavor
        1. Getting ready
        2. How to do it…
        3. How it works…
      14. Deleting a flavor
        1. Getting ready
        2. How to do it…
        3. How it works…
      15. Setting CPU limits for a flavor
        1. Getting ready
        2. How to do it…
        3. How it works…
      16. Setting IOPS limits for a flavor
        1. Getting ready
        2. How to do it…
        3. How it works…
      17. Booting an instance
        1. Getting ready
        2. How to do it…
        3. How it works…
      18. Stopping an instance
        1. Getting ready
        2. How to do it…
        3. How it works…
      19. Deleting an instance
        1. Getting ready
        2. How to do it…
        3. How it works…
      20. Live migration
        1. Getting ready
        2. How to do it…
        3. How it works…
      21. Snapshotting an instance
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      22. Booting an instance from a snapshot
        1. Getting ready
        2. How to do it…
        3. How it works…
      23. Rescuing an instance
        1. Getting ready
        2. How to do it…
        3. How it works…
      24. Shelving an instance
        1. Getting ready
        2. How to do it…
        3. How it works…
      25. Reviewing the console logs
        1. Getting ready
        2. How to do it…
        3. How it works…
    10. 6. Glance – OpenStack Image Service
      1. Introduction to OpenStack Image services
      2. Managing images
        1. Uploading images
        2. Getting ready
        3. How to do it…
        4. How it works...
        5. Listing images
        6. Viewing image details
        7. Deleting images
        8. Getting ready
        9. How to do it…
        10. Downloading images
        11. Getting ready
        12. How to do it…
        13. Sharing images
        14. Getting ready
        15. How to do it…
        16. How it works...
      3. Using image snapshots
        1. Creating snapshots
        2. Getting ready
        3. How to do it…
        4. How it works…
      4. Using image metadata
        1. Setting image metadata
        2. Getting ready
        3. How to do it…
        4. How it works...
        5. Removing image metadata
        6. Getting ready
        7. How to do it…
      5. Protecting images
        1. Protecting an image
        2. Getting ready
        3. How to do it…
        4. How it works...
        5. Unprotecting an image
        6. Getting ready
        7. How to do it…
      6. Deactivating images
        1. Deactivating an image
        2. Getting ready
        3. How to do it…
        4. How it works...
        5. Activating an image
        6. Getting ready
        7. How to do it…
      7. Creating custom images
        1. Getting ready
        2. How to do it…
    11. 7. Cinder – OpenStack Block Storage
      1. Introduction
      2. Configuring Cinder volume services
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Creating volumes
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more…
      4. Attaching volumes to an instance
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Detaching volumes from an instance
        1. Getting ready
        2. How to do it...
        3. How it works…
      6. Deleting volumes
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
      7. Working with volume snapshots
        1. Getting ready
        2. How to do it…
        3. How it works…
      8. Configuring volume types
        1. Getting ready
        2. How to do it…
        3. How it works…
      9. Enabling volume encryption
        1. Getting ready
        2. How to do it…
        3. How it works…
      10. Configuring volume Quality of Service (QoS)
        1. Getting ready
        2. How to do it…
        3. How it works…
      11. Resetting volume state
        1. Getting ready
        2. How to do it…
        3. How it works…
    12. 8. Swift – OpenStack Object Storage
      1. Introduction – OpenStack Object Storage
      2. Creating object containers
        1. Getting ready
        2. How to do it…
        3. How it works…
      3. Deleting object containers
        1. Getting ready
        2. How to do it…
        3. How it works…
      4. Uploading objects
        1. Getting ready
        2. How to do it…
        3. How it works…
      5. Uploading large objects
        1. Getting ready
        2. How to do it..
        3. How it works
      6. Downloading objects
        1. Getting ready
        2. How to do it…
        3. How it works…
      7. Deleting objects
        1. Getting ready
        2. How to do it…
        3. How it works
      8. Container ACLs
        1. Getting ready
        2. How to do it…
        3. How it works…
    13. 9. OpenStack Orchestration Using Heat and Ansible
      1. Introduction – orchestrating with OpenStack
      2. Creating your first stack
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Launching your stack with Heat
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Viewing the resources and output of a stack created with Heat
        1. Getting ready
        2. How to do it...
        3. How it works…
      5. Deleting a Heat stack
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Updating a Heat stack
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Installing and configuring Ansible for OpenStack
        1. Getting ready
        2. How to do it...
          1. Ubuntu
          2. macOS/OS X (and for those wanting to use pip)
          3. Verifying the installation
        3. How it works...
      8. Using Ansible to launch instances
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. See also
      9. Using Ansible to orchestrate software installation
        1. Getting ready
        2. How to do it...
        3. How it works...
      10. Using Ansible to orchestrate software installations across multiple instances
        1. Getting ready
        2. How to do it...
        3. How it works...
      11. Using Ansible to fully orchestrate the creation of a web server and load balancer stack
        1. Getting ready
        2. How to do it...
        3. How it works...
    14. 10. Using OpenStack Dashboard
      1. Introduction – OpenStack Dashboard
      2. 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…
      3. Using OpenStack Dashboard to manage Neutron networks and routers
        1. Getting ready
        2. How to do it
          1. Creating networks
          2. Creating routers
          3. Viewing networks
          4. Deleting routers
          5. Deleting networks
        3. How it works…
      4. 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...
      5. Using OpenStack Dashboard to launch instances
        1. Getting ready
        2. How to do it…
        3. How it works…
      6. Using OpenStack Dashboard to delete instances
        1. Getting ready
        2. How to do it…
        3. How it works…
      7. Using OpenStack Dashboard to add new projects
        1. Getting ready
        2. How to do it…
        3. How it works…
      8. 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 projects
          5. Removing users from projects
        3. How it works…
      9. Using OpenStack Dashboard with LBaaS
        1. Getting ready
        2. How to do it…
          1. Creating load balancer
          2. Deleting load balancer
        3. How it works…
      10. 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…
    15. Another Book You May Enjoy
      1. Leave a review – let other readers know what you think
    16. Index

Product information

  • Title: OpenStack Cloud Computing Cookbook - Fourth Edition
  • Author(s): Kevin Jackson, Cody Bunch, Egle Sigler, James Denton
  • Release date: January 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781788398763