logo资料库

OpenStack Administration with Ansible 2, 2nd Edition 2016.pdf

第1页 / 共222页
第2页 / 共222页
第3页 / 共222页
第4页 / 共222页
第5页 / 共222页
第6页 / 共222页
第7页 / 共222页
第8页 / 共222页
资料共222页,剩余部分请下载后查看
Cover
Copyright
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Table of Contents
Preface
Chapter 1: Introduction to OpenStack
An overview of OpenStack
The OpenStack Foundation
Reviewing the OpenStack services
OpenStack Compute (code-name Nova)
OpenStack Object Storage (code-name Swift)
OpenStack Image Service (code-name Glance)
OpenStack Identity (code-name Keystone)
OpenStack Dashboard (code-name Horizon)
OpenStack Networking (code-name Neutron)
OpenStack Block Storage (code-name Cinder)
OpenStack Orchestration (code-name Heat)
OpenStack Telemetry (code-name Ceilometer)
OpenStack Database (code-name Trove)
OpenStack Data Processing (code-name Sahara)
OpenStack Bare Metal Provisioning (code-name Ironic)
Other optional services
OpenStack supporting components
Features and benefits
Fully distributed architecture
Using commodity hardware
Scaling horizontally or vertically
Meeting high availability requirements
Compute isolation and multi-dc Support
Robust role-based access control
Working examples – listing the services
Listing the OpenStack services
Via API
Via CLI
Summary
Chapter 2: Introduction to Ansible
Ansible 2.0 overview
What are playbooks, roles, and modules?
Playbooks
Roles
Modules
Setting up the environment
Upgrading to Ansible 2.0
New OpenStack client authentication
Variables and facts
Variables
Setting variable placeholders
Defining variable values
Registering variables
Facts
Defining the inventory
Dynamic inventory
Blocks
Strategies
Cloud integrations
Summary
Chapter 3: Creating Multiple Users/Projects
Creating users and projects
Manually creating users and projects
Creating a user
Creating a project
Assigning a role and project access to users
Automation considerations
Defining variables globally or per role
OpenStack API or CLI?
Where to run Ansible
Coding the playbooks and roles
Reviewing playbooks and roles
Summary
Chapter 4: Customizing Your Clouds Quotas
Defining and creating quotas
Manually creating quotas
Setting up default quotas
Resetting quota values
Automation considerations
Coding the playbooks and roles
Reviewing playbooks and roles
Summary
Chapter 5: Snapshot Your Cloud
Defining backups and snapshots
Manually creating backups and snapshots
Restoring an instance backup
Automation considerations
Coding the playbooks and roles
Reviewing playbooks and roles
Summary
Chapter 6: Migrating Instances
Instance migration
Manually migrating instances
Migrating an instance to a specific compute node
Automation considerations
Coding the playbooks and roles
Role details
Variable details
Playbook details
Reviewing playbook and role
Summary
Chapter 7: Managing Containers on Your Cloud
The container concept explained
Building and deploying containers
Building containers with Ansible Container
Automation considerations
Step 1
Step 2
Step 3
Step 4
Deploying Kubernetes on OpenStack
Automation considerations
Managing CoreOS and Docker with Ansible
Automation considerations
Coding the playbooks and roles
Deploying Nova LXD on OpenStack
Automation considerations
Reviewing playbooks and roles
Summary
Chapter 8: Setting Up Active-Active Regions
Reviewing OpenStack high availability scenarios
Multiple data centers
Single data center
Availability Zones
Why to use Active-Active cloud regions?
Setting up Active-Active cloud regions
Region endpoint inventory
Admin region configurations
Creating service user accounts on the Admin region
Creating services on the Admin region
Registering each region's endpoints to the Admin region
Adjusting the Admin regions' identity endpoint
Active region configurations
Coding the playbooks and roles
Setting up the Admin region
Setting up Active regions
Reviewing playbooks and roles
Summary
Chapter 9: Inventory Your Cloud
Collecting cloud metrics
User report
Project report
Network report
Volume report
Cloud-at-a-Glance report
Coding the playbooks and roles
cloud-inventory
cloud-usage
user-inventory
project-inventory
network-inventory
volume-inventory
Reviewing playbooks and roles
Summary
Chapter 10: Health Check Your Cloud with Nagios
Monitoring the cloud
OpenStack service processes
Infrastructure services
MariaDB and Galera
RabbitMQ
Core OpenStack services
Service and process check examples
Setting up Nagios and import checks
Collect your metrics via SNMP
Coding the playbooks and roles
snmp-config
install-nagios
nagios-plugins
install-nconf
nconf-post-install
create-nagios-user
infra-plugin-config
nagios-post-install
Reviewing playbook and role
Summary
Index
OpenStack Administration with Ansible 2 Second Edition Orchestrate and automate your OpenStack cloud operator tasks with Ansible 2.0 Walter Bentley BIRMINGHAM - MUMBAI
OpenStack Administration with Ansible 2 Second Edition Copyright © 2016 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 author, 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: January 2016 Second edition: December 2016 Production reference: 1221216 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78712-163-8 www.packtpub.com
Credits Author Walter Bentley Reviewer Travis Truman Copy Editor Dipti Mankame Project Coordinator Judie Jose Commissioning Editor Pratik Shah Proofreader Safis Editing Acquisition Editor Rahul Nair Indexer Francy Puthiry Content Development Editor Abhishek Jadhav Graphics Kirk D'Penha Technical Editor Mohd Riyan Khan Production Coordinator Deepika Naik
About the Author Walter Bentley is a Rackspace Private Cloud Technical Marketing Engineer and author with a diverse background in production systems administration and solutions architecture. He has more than 15 years of experience in sectors such as online marketing, financial, insurance, aviation, the food industry, education, and now in technology. In the past, he was typically the requestor, consumer, and advisor to companies in the use of technologies such as OpenStack. Today, he’s an OpenStack promoter and cloud educator. In his current role, Walter helps customers build, design, and deploy private clouds built on OpenStack. That includes professional services engagements around operating OpenStack clouds and DevOps engagements creating playbooks/roles with Ansible. He presents and speaks regularly at OpenStack Summits, AnsibleFest, and other technology conferences, plus webinars, blog posts and technical reviews. His first book, OpenStack Administration with Ansible, was released in 2016. I would like to thank my wife and best friend Tasha for allowing me to take on this life changing opportunity for the second time around. Without her understanding and support I do not think it could have all happened. She is truly my life’s motivation. Also, wish to thank my wonderful daughters, London and Rio, for bringing so much joy to our lives. Thank you to my mother and father for cultivating the technical spirit within me from a very early age (that Commodore 64 was definitely my springboard…LOL). I would also like to thank my coworker and fellow architect Kevin Jackson for providing me with the courage to take on this project. I also wish to give deep thanks and gratitude to all of my mentors over the years I have had the privilege to work for and with. Those individuals include David Bartlett, Tyrone Paige, Steve Contrabasso, and Mike Childress. Their multitude of great advice has allowed me to be where I am today.
About the Reviewer Travis Truman has 20+ years of experience in the technology industry. His previous roles include software engineering, software product architecture, SaaS platform architecture, and VP of Engineering in several Philadelphia-area startups. Travis is a regular contributor to open source software and has contributed code to OpenStack, Ansible, GopherCloud, Terraform, Packer, Consul, and many other projects powering modern cloud computing. Travis currently works as a Cloud Architect focused on OpenStack, AWS, and Azure for a Fortune 50 media and technology company based in Philadelphia.
www.PacktPub.com For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. h t t p s ://w w w . p a c k t p u b . c o m /m a p t Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career. Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser
Customer Feedback Thank you for purchasing this Packt book. We take our commitment to improving our content and products to meet your needs seriously—that's why your feedback is so valuable. Whatever your feelings about your purchase, please consider leaving a review on this book's Amazon page. Not only will this help us, more importantly it will also help others in the community to make an informed decision about the resources that they invest in to learn. You can also review for us on a regular basis by joining our reviewers' club. If you're interested in joining, or would like to learn more about the benefits we offer, please contact us: customerreviews@packtpub.com.
分享到:
收藏