logo资料库

OpenStack.Cloud.Computing.Cookbook.3rd.Edition.1782174788.pdf

第1页 / 共436页
第2页 / 共436页
第3页 / 共436页
第4页 / 共436页
第5页 / 共436页
第6页 / 共436页
第7页 / 共436页
第8页 / 共436页
资料共436页,剩余部分请下载后查看
Cover
Copyright
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Table of Contents
Preface
Chapter 1: Keystone – OpenStack Identity Service
Introduction
Installing the OpenStack Identity service
Configuring OpenStack Identity for SSL Communication
Creating tenants in Keystone
Configuring roles in Keystone
Adding users to Keystone
Defining service endpoints
Creating the service tenant and service users
Configuring OpenStack Identity for LDAP Integration
Chapter 2: Glance – OpenStack Image Service
Introduction
Installing OpenStack Image Service
Configuring OpenStack Image Service with OpenStack Identity Service
Configuring OpenStack Image Service with OpenStack Object Storage
Managing images with OpenStack Image Service
Registering a remotely stored image
Sharing images among tenants
Viewing shared images
Using image metadata
Migrating a VMware image
Creating an OpenStack image
Chapter 3: Neutron – OpenStack Networking
Introduction
Installing Neutron and Open vSwitch on a dedicated network node
Configuring Neutron and Open vSwitch
Installing and configuring the Neutron API service
Creating a tenant Neutron network
Deleting a Neutron network
Creating an external floating IP Neutron network
Using Neutron networks for different purposes
Configuring Distributed Virtual Routers
Using Distributed Virtual Routers
Chapter 4: Nova – OpenStack Compute
Introduction
Installing OpenStack Compute controller services
Installing OpenStack Compute packages
Configuring database services
Configuring OpenStack Compute
Configuring OpenStack Compute with OpenStack Identity service
Stopping and starting nova services
Installation of command-line tools on Ubuntu
Using the command-line tools with HTTPS
Checking OpenStack Compute services
Using OpenStack Compute
Managing security groups
Creating and managing key pairs
Launching our first cloud instance
Fixing a broken instance deployment
Terminating your instances
Using live migration
Working with nova-schedulers
Creating flavors
Defining host aggregates
Launching instances in specific Availability Zones
Launching instances on specific Compute hosts
Removing nodes from a cluster
Chapter 5: Swift – OpenStack Object Storage
Introduction
Configuring Swift services and users in Keystone
Installing OpenStack Object Storage services – proxy server
Configuring OpenStack Object Storage – proxy server
Installing OpenStack Object Storage services – storage nodes
Configuring physical storage for use with Swift
Configuring Object Storage replication
Configuring OpenStack Object Storage – storage services
Making the Object Storage rings
Stopping and starting OpenStack Object Storage
Setting up SSL access
Chapter 6: Using OpenStack Object Storage
Introduction
Installing the swift client tool
Creating containers
Uploading objects
Uploading large objects
Listing containers and objects
Downloading objects
Deleting containers and objects
Using OpenStack Object Storage ACLs
Using Container Synchronization between two Swift Clusters
Chapter 7: Administering OpenStack Object Storage
Introduction
Managing OpenStack Object Storage cluster with swift-init
Checking cluster health
Managing the Swift cluster capacity
Removing nodes from a cluster
Detecting and replacing failed hard drives
Collecting usage statistics
Chapter 8: Cinder – OpenStack Block Storage
Introduction
Configuring Cinder-volume services
Configuring OpenStack Compute for Cinder-volume
Creating volumes
Attaching volumes to an instance
Detaching volumes from an instance
Deleting volumes
Configuring third-party volume services
Working with Cinder snapshots Cinder snapshots
Booting from volumes
Chapter 9: More OpenStack
Introduction
Using cloud-init to run post-installation commands
Using cloud-config to run post-installation configuration
Installing OpenStack Telemetry
Using OpenStack Telemetry to interrogate usage statistics
Installing Neutron LBaaS
Using Neutron LBaaS
Configuring Neutron FWaaS
Using Neutron FWaaS
Installing the Heat OpenStack Orchestration service
Using Heat to spin up instances
Chapter 10: Using the OpenStack Dashboard
Introduction
Installing OpenStack Dashboard
Using OpenStack Dashboard for key management
Using OpenStack Dashboard to manage Neutron networks
Using OpenStack Dashboard for security group management
Using OpenStack Dashboard to launch instances
Using OpenStack Dashboard to terminate instances
Using OpenStack Dashboard for connecting to instances using a VNC
Using OpenStack Dashboard to add new tenants – projects
Using OpenStack Dashboard for user management
Using OpenStack Dashboard with LBaaS
Using OpenStack Dashboard with OpenStack Orchestration
Chapter 11: Production OpenStack
Introduction
Installing the MariaDB Galera cluster
Configuring HA Proxy for the MariaDB Galera cluster
Configuring HA Proxy for high availability
Installing and configuring Pacemaker with Corosync
Configuring OpenStack Services with Pacemaker and Corosync
Bonding network interfaces for redundancy
Automating OpenStack installations using Ansible – host configuration
Automating OpenStack installations using Ansible – Playbook configuration
Automating OpenStack installations using Ansible – running Playbooks
Index
1
OpenStack Cloud Computing Cookbook Third Edition Over 110 effective recipes to help you build and operate OpenStack cloud computing, storage, networking, and automation Kevin Jackson Cody Bunch Egle Sigler BIRMINGHAM - MUMBAI
OpenStack Cloud Computing Cookbook Third Edition Copyright © 2015 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: September 2012 Second edition: October 2013 Third edition: August 2015 Production reference: 1170815 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78217-478-3 www.packtpub.com
Credits Copy Editors Roshni Banerjee Trishya Hajare Project Coordinator Milton Dsouza Proofreader Safis Editing Indexer Hemangini Bari Graphics Sheetal Aute Production Coordinator Nitesh Thakur Cover Work Nitesh Thakur Authors Kevin Jackson Cody Bunch Egle Sigler Reviewers Chris Beatty Walter Bentley Victoria Martinez de la Cruz Stefan Lenz Andy McCrae Melissa Palmer Sriram Rajan Commissioning Editor Kartikey Pandey Acquisition Editor Indrajit Das Content Development Editor Akashdeep Kundu Technical Editors Naveenkumar Jain Narsimha Pai
Foreword At CERN, the European Organization for Nuclear Research, physicists and engineers are probing the fundamental structure of the universe. They use the world's largest and most complex scientific instruments to study the basic constituents of matter—the fundamental particles. The particles are made to collide together at close to the speed of light. The process gives clues to physicists about how the particles interact and provides insights into the fundamental laws of nature. The Large Hadron Collider (LHC) is the world's largest and most powerful particle accelerator. The LHC consists of a 27-kilometer ring of superconducting magnets with a number of accelerating structures to boost the energy of the particles along the way. Inside the accelerator, two high-energy particle beams travel at close to the speed of light, before they are made to collide. This produces 27 petabytes of data every year, which is recorded and analyzed by thousands of computers in the CERN data centre. With an upgrade to the LHC in 2015 to nearly double the collision energy, it was clear that further computing resources were needed. To provide the additional capacity and be more responsive to the users, a new approach was needed. In 2012, a small team at CERN started looking at OpenStack, a piece of open source software, to create computing clouds. It was a very promising technology with an enthusiastic community but a significant level of complexity. Along with the code being very new, those were very early days for the documentation and training. We wanted to educate people rapidly to start the project and so looked for guides to make the new administrators productive. This was when we encountered the first edition of the book, OpenStack Cloud Computing Cookbook. It became the standard document for newcomers in the team to understand the concepts, set up their first clouds, and then start work on the CERN cloud.
As the cloud evolved and the OpenStack technology matured, we continued to use this guide, even as the members of the team rotated, building small clouds to try out new concepts and investigate the flexibility of cloud computing. Over the years, I have frequently met Kevin, Cody and Egle at the OpenStack summits that give the community an opportunity to meet and exchange experiences. With OpenStack evolving so rapidly, it also gives an opportunity to get the latest editions of the cookbook, which they have continued to keep up to date. The CERN cloud is now in production across two data centers in Geneva and Budapest, with over 3,000 servers running tens of thousands of virtual machines. With new staff members joining frequently, we continue to use the cookbook as a key part of the team's training and look forward to the updates in the latest edition. Tim Bell Infrastructure Manager, CERN
About the Authors Kevin Jackson is married and has three children. He is an experienced IT professional working with business and enterprises of all sizes at Rackspace as an OpenStack and private cloud specialist. Kevin has been working with OpenStack since early 2011 and has extensive experience of various flavors of Linux, Unix, and hosting environments. Kevin can be found on Twitter at @itarchitectkev. Kevin authored the first edition and coauthored the second edition of the OpenStack Cloud Computing Cookbook, Packt Publishing. Kevin also coauthored OpenStack Foundation's OpenStack Architecture Design Guide during a 5-day book sprint in California. I'd like to thank Cody for stepping up to the plate again to go through the pain and anguish to get another edition of the book out. Also thanks, of course, go to Egle, whom we somehow commandeered to help get this out the door bigger and better than before. We have a whole bunch of tech reviewers from across the globe too who have helped keep us within reach of our goals, so thanks for keeping it real. I'd also like to thank my family, although I'm not sure they have realized I wrote another one. I think I may have just about gotten away with this one unscathed. Finally, I'd like to thank Rackspace for giving me the opportunity and support to pursue such endeavors and the many people I bug now for answers to stupid questions.
分享到:
收藏