Book Image

OpenStack Cloud Computing Cookbook - Fourth Edition

By : Kevin Jackson, Cody Bunch, Egle Sigler, James Denton
Book Image

OpenStack Cloud Computing Cookbook - Fourth Edition

By: Kevin Jackson, Cody Bunch, Egle Sigler, James Denton

Overview of this book

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.
Table of Contents (15 chapters)
OpenStack Cloud Computing Cookbook Fourth Edition
Contributors
Preface
Another Book You May Enjoy
Index

Preface

OpenStack is the open source software for building public and private clouds, and privately hosted software-defined infrastructure services. It is a global open source success and is developed and supported by thousands of people around the globe and backed by leading players in the cloud space today. This book is specifically designed to quickly help you get up to speed with OpenStack and give you the confidence and understanding to roll it out into your own datacenters. This book covers an installation of OpenStack using Ansible, into your datacenters, in addition to providing steps for running under so that you can quickly gain the knowledge needed to install and operate OpenStack today. This book has been written by four principal level OpenStack engineers and architects from Rackspace, and it covers a wide range of topics that help you install and configure your OpenStack environments. This book will guide you in the following things:

  • How to install and configure all of the core components of OpenStack using OpenStack-Ansible

  • How to master the complete private cloud stack, from scaling out compute resources to managing object storage services for highly redundant, highly available storage

  • Examples of using Heat and Ansible to orchestrate workloads running on OpenStack

  • Practical, real-world examples of each service built upon in each chapter, allowing you to progress with the confidence that they will work in your own environments

This book gives you clear, step-by-step instructions to install and run your own private cloud successfully. It is full of practical and applicable recipes that enable you to use the latest capabilities of OpenStack and implement them.

Who this book is for

This book is aimed at system administrators and technical architects moving from a virtualized environment to cloud environments who are familiar with cloud computing platforms. Knowledge of virtualization and managing Linux environments is expected. Prior knowledge or experience of OpenStack is not required, although beneficial.

What this book covers

Chapter 1, Installing OpenStack with Ansible, walks you through a practical installation of OpenStack using OpenStack-Ansible.

Chapter 2, The OpenStack Client, shows you how to install the tools needed to operate OpenStack, as well as providing a quick reference to commonly used commands.

Chapter 3, Keystone – OpenStack Identity Service, explains how to use Keystone to configure and maintain services and projects within OpenStack.

Chapter 4, Neutron – OpenStack Networking, covers the introduction and use of the software-defined networking service and its plugins.

Chapter 5, Nova – OpenStack Compute, works through a number of examples of running and operating virtual machine instances to run your applications.

Chapter 6, Glance – OpenStack Image Service, explores the use of the machine images that are used to spawn instances.

Chapter 7, Cinder – OpenStack Block Storage, presents how to work with block storage volumes to attach to your instances.

Chapter 8, Swift – OpenStack Object Storage, depicts how to use the highly available and redundant object storage service.

Chapter 9, OpenStack Orchestration Using Heat and Ansible, discusses how to begin orchestrating your workloads within OpenStack using both Heat and Ansible.

Chapter 10, Using OpenStack Dashboard, shows you how to navigate the Horizon user-interface dashboard.

To get the most out of this book

To use this book, you will need access to computers or servers that have hardware virtualization capabilities. Familiarity of Linux and accessing Linux servers using SSH is expected.

To set up the lab environment described at the end of Chapter 1, Installing OpenStack with Ansible, you will need to install and use Oracle’s VirtualBox and Vagrant. You can access details of how to set up your computer using VirtualBox and Vagrant by visiting https://github.com/OpenStackCookbook/vagrant-openstack.

There are additional recipes to get you started with the lab environment available at http://www.openstackcookbook.com. Refer to this website for information on installation of supporting software such as MariaDB/MySQL. More information can be found at http://bit.ly/OpenStackCookbookPreReqs.

Download the example code files

You can download the example code files for this book 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 files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at http://www.packtpub.com.

  2. Select the SUPPORT tab.

  3. Click on Code Downloads & Errata.

  4. Enter the name of the book in the Search box and follow the on-screen instructions.

Once the file is downloaded, make sure that you unzip or extract the folder using the latest version of one of these:

  • WinRAR / 7-Zip for Windows

  • Zipeg / iZip / UnRarX for Mac

  • 7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/OpenStack-Cloud-Computing-Cookbook-Fourth-Edition. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://www.packtpub.com/sites/default/files/downloads/OpenStackCloudComputingCookbookFourthEdition_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: Configuration of the host’s networking, on a Ubuntu system, is performed by editing the /etc/network/interfaces file.A block of code is set as follows:

# Shared infrastructure parts
shared-infra_hosts:
  controller-01:
    ip: 172.29.236.110
  controller-02:
    ip: 172.29.236.111
  controller-03:
    ip: 172.29.236.112
# Compute Hosts
compute_hosts:
  compute-01:
    ip: 172.29.236.113
  compute-02:
    ip: 172.29.236.114

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

# Shared infrastructure parts
shared-infra_hosts:
  controller-01:
    ip: 172.29.236.110
  controller-02:
    ip: 172.29.236.111
  controller-03:
    ip: 172.29.236.112
# Compute Hosts
compute_hosts:
  compute-01:
    ip: 172.29.236.113
  compute-02:
    ip: 172.29.236.114

Any command-line input or output is written as follows:

cd /opt/openstack-ansible/scripts

Bold: Indicates a new term, an important word, or words that you see on the screen, for example, in menus or dialog boxes, also appear in the text like this. Here is an example: "Next choose Advanced system settings from the menu on the left."

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Sections

In this book, you will find several headings that appear frequently (Getting ready, How to do it..., How it works..., There’s more..., and See also).

To give clear instructions on how to complete a recipe, use these sections as follows:

Getting ready

This section tells you what to expect in the recipe and describes how to set up any software or any preliminary settings required for the recipe.

How to do it…

This section contains the steps required to follow the recipe.

How it works…

This section usually consists of a detailed explanation of what happened in the previous section.

There’s more…

This section consists of additional information about the recipe in order to make you more knowledgeable about the recipe.

See also

This section provides helpful links to other useful information for the recipe.

Get in touch

Feedback from our readers is always welcome.

General feedback: Email and mention the book’s title in the subject of your message. If you have questions about any aspect of this book, please email us at .

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book we would be grateful if you would report this to us. Please visit, http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit http://authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packtpub.com.