OpenStack Trove Essentials - Alok Shrivastwa - E-Book

OpenStack Trove Essentials E-Book

Alok Shrivastwa

0,0
31,19 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Build your own cloud based Database as a Service using OpenStack Trove

About This Book

  • Familiarize yourself with the concept of Database as a Service and make your existing system scalable and efficient with OpenStack Trove
  • Minimize the administrative tasks and complexities of managing your cloud infrastructure
  • This is a fast-paced guide to datastore management on the OpenStack platform using OpenStack Trove

Who This Book Is For

If you are a DBA / system administrator / architect, or a student who wants to build a Database as a Service based on OpenStack, this book is for you. You should have a basic knowledge of OpenStack components, RDBMS/NoSQL, IaaS, and cloud computing.

What You Will Learn

  • Get to grips with the basics of OpenStack and the prerequisites to install Trove
  • Understand the expectations of DBaaS and how Trove can help you achieve them
  • Set up a basic installation of DevStack (Development Stack) in a virtual box
  • Install Trove and utilize its configuration groups to manage and tune databases
  • Use Image builder to create guest images for Trove
  • Utilize Trove to provision your first database instance
  • Back up and restore your databases with the help of Trove

In Detail

OpenStack has become an extremely popular solution to build public and private clouds with. Database as a Service (DBaaS) enables the delivery of more agile database services at lower costs. Some other benefits of DBaaS are secure database deployments and compliance to standards and best practices. Trove is a DBaaS built on OpenStack and is becoming more popular by the day.

Since Trove is one of the most recent projects of OpenStack, DBAs and system administrators can find it difficult to set up and run a DBaaS using OpenStack Trove. This book helps DBAs make that step. We start by introducing you to the concepts of DBaaS and how is it implemented using OpenStack Trove. Following this, we look at implementing OpenStack and deploying Trove. Moving on, you will learn to create guest images to be used with Trove. We then look at how to provision databases in self-service mode, and how to perform administration tasks such as backup and recovery, and fine-tuning databases. At the end of the book, we will examine some advanced features of Trove such as replication.

Style and approach

This fast-paced, step-by-step guide introduces you to DBaaS, OpenStack Trove, and its components, leading you through building your own Cloud-based DBaaS. Using the DevStack deployment method, you will spend less time on installing OpenStack so you can devote more time to learning how to provision and manage databases in a DBaaS environment.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 163

Veröffentlichungsjahr: 2016

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

OpenStack Trove Essentials
Credits
About the Authors
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Introducing OpenStack Trove
Database as a Service
Advantages
Reduced database management costs
Faster provisioning and standardization
Easier administration
Scaling and efficiency
Trove
Architecture
Shared components
The message bus
MySQL/MariaDB
API
The task manager
The guest agent
The conductor
Terminology
Datastore
Datastore version
Instance
Configuration group
Flavor
Database
A multi-datastore scenario
Database software distribution support
Putting it all together
Use cases
Dev/test databases
Web application databases
Features
The Juno release
The Kilo release
The Liberty release
Summary
2. Setting up Trove with DevStack in a Box
Requirements
Operating system
Database
Messaging queue
Web server
Internet connection
Preparing the server
Minimum configuration required
Server configuration
Setting the IP address
Installing prerequisites
Adding a user
Installing packages
DevStack
Downloading the DevStack script
Using a proxy with GitHub
Understanding the DevStack files
stack.sh
unstack.sh
rejoin-stack.sh
run_test.sh
exercise.sh
clean.sh
local.sh
Configuring the DevStack installation
Step 1 – copy the local.conf file from the samples directory to the base directory
Step 2 – modify the localrc section
Step 3 – modify the local.conf to install Trove and Swift
Installing DevStack
Using a proxy server
Verifying the installation
Troubleshooting the install
Working with screen
Screen control key
Useful commands
DevStack and screen
Killing DevStack
Restarting DevStack services
Summary
3. Installing Trove in an Existing OpenStack Environment
Different methods of deploying OpenStack
Required OpenStack services
Planning the install
Where to install the Trove components
Take a backup
Installing Trove
Installing Trove from source
Installing with the Ubuntu OpenStack repository
Configuring Trove
Setting up the MySQL database
Keystone configuration
Modifying the configuration files
trove.conf
trove-taskmanager.conf and trove-conductor.conf
trove-guestagent.conf
Initializing the Trove database
Restarting the services
Summary
4. Preparing the Guest Images
Structure of a guest image
Instance creation using the guest image
Creating the Trove guest image
Installation using configuration management systems
Installation using templates
Disk Image Builder
Installing the DIB
Basic working of the DIB
Installing Trove-integration scripts and TripleO
SSH keys
Install Percona keys (only if using proxies)
Creating your own DIB elements (optional)
Creating images using the DIB
Exporting environment variables
Building the QCOW2 image
Red stack scripts
Uploading the Trove images
Modify QCOW2 images using guestfish
Installing guestfish
Loading the images
Modify the files on the image
Send commands
Example: Adding a user to the Ubuntu QCOW2 image
Summary
5. Provisioning Database Instances
Checking for prerequisites
Launching our first instance
Logging into the instance via SSH
Launching the instance using the GUI
Connect to the database instance
Instance operations
Resize
Terminate the Trove instances
Troubleshooting
Summary
6. Configuring the Trove Instances
Default datastore and version configuration
Modifying the instance configuration
Configuration groups
Defining configuration parameters
Uploading configuration parameters
Creating a configuration
Applying the configuration to an instance
Verification
Viewing the configuration
Patching the configuration
Updating the configuration
Removing the configuration
Verification
Adding a new parameter
Summary
7. Database Backup and Restore
Formulating a backup and recovery plan
Backing up/restoring in Trove
The concept of strategies in Trove
The backup/restore strategy in action
Configuring the backup strategies
Configuring the storage strategies
Backup prerequisites
Backups and restores
Full backup
Incremental backup
Viewing the backup
Restoring backups
Deleting backups
Summary
8. Advanced Database Features
Replication and clustering
Replication
Clustering
Replication in Trove
Supported data stores
Setting up replications
Creating a replicated pair
Verifying replication
Failover options
Promote to the replica master
Eject the master
Detach replica
Clustering in Trove
Supported data store
Creating and uploading the MongoDB image
Creating a cluster
Summary
Index

OpenStack Trove Essentials

OpenStack Trove Essentials

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 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: March 2016

Production reference: 1220316

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78528-561-5

www.packtpub.com

Credits

Authors

Alok Shrivastwa

Sunil Sarat

Reviewer

Denys Makogon

Commissioning Editor

Dipika Gaonkar

Acquisition Editor

Rahul Nair

Content Development Editor

Viranchi Shetty

Technical Editor

Nirant Carvalho

Copy Editors

Jonathan Todd

Madhusudan Uchil

Project Coordinator

Izzat Contractor

Proofreader

Safis Editing

Indexer

Hemangini Bari

Graphics

Kirk D'Penha

Production Coordinator

Shantanu N. Zagade

Cover Work

Shantanu N. Zagade

About the Authors

Alok Shrivastwa is a technologist from India, currently working as the director of cloud services for Microland Ltd. in their Center of Innovation. He has a keen interest in all things physical and metaphysical and is an innovator at heart. He has worked with multiple large- and medium-sized enterprises, designing and implementing their network security solutions, automation solutions, databases, VoIP environments, datacenter designs, public and private clouds, and integrations.

He has also created several tools and intellectual properties in the field of operationalization of emerging technologies. He has authored a book, Learning OpenStack, with Packt Publishing, and has authored several whitepapers and blogs on technology and metaphysical topics, in addition to writing poems in Hindi. Also, he has been a guest speaker for undergraduate engineering students in Chennai.

You can connect with him at https://in.linkedin.com/in/alokas or follow him on Twitter at @alok_as.

We are like the fire at the end of the matchstick, we appear when we are needed, and once our work here is completed, we disappear into the same nothingness we all came from. I thank that nothingness we all fondly call God. I thank my mother, Seema, for making me who I am today; my lovely sisters, Kawshiki and Abhabya; my beautiful wife, Priyanka, for tolerating the insanity; and my father for supporting me throughout.

I thank the reviewers who were patient in reviewing the work and shaped the flow of the book. I thank all the editors at Packt for being extremely helpful and understanding and finally Packt Publishing for allowing me to share whatever little I know.

Sunil Sarat is the vice president of cloud and mobility services at Microland Ltd., an India-based global hybrid IT infrastructure services provider.

He played a key role in setting up and running the emerging technologies practice, dealing with areas such as public/private cloud (AWS and Azure, VMware vCloud Suite, Microsoft, and OpenStack), hybrid IT (VMware vRealize automation/orchestration, Chef, and Puppet), enterprise mobility (Citrix Xenmobile and VMware Airwatch), VDI /app virtualization (VMware Horizon Suite, Citrix XenDesktop/XenApp, Microsoft RDS, and AppV), and associated transformation services.

He is a technologist and a business leader with expertise in creating new practices and service portfolios, building and managing high-performance teams, strategy definition, technological roadmaps, and 24/7 global remote infrastructure operations. He has varied experience in handling diverse functions such as innovation/technology, service delivery, transition, presales/solutions, and automation.

He has authored whitepapers, blogs, and articles on various technologies and service-related areas, is a speaker at cloud-related events, and reviews technical books. He has authored Learning OpenStack and reviewed Learning AirWatch and Mastering VMware Horizon 6, all by Packt Publishing.

He holds various industry certifications in the areas of compute, storage, and security and holds an MBA in marketing.

Besides technology and business, he is passionate about filmmaking and is a part-time filmmaker as well.

For more information, you can visit his LinkedIn profile at https://www.linkedin.com/in/sunilsarat or follow him on Twitter at @sunilsarat.

Firstly, I would like to thank the Existence for enabling me to write this book. I would like to thank my family—my mother, Ratna; wife, Abhaya; and my twins, Advika and Agnika—for supporting me throughout. Thanks to my friends Karthieyan K., Syed, Samina, and Mayank for their encouragement.

I thank Microland for all the exposure and support provided, which was instrumental for me to write this book. My gratitude to my co-author Alok Shrivastwa and, last but not least, to Packt Publishing for the opportunity and guidance.

About the Reviewer

Denys Makogon is a senior Python software engineer at EPAM and works in Kharkiv, Ukraine. He is a writer and developer by day and a reader by night. His passion is helping people bring their technical skills up to the next level along with developing skills that would become key features in obtaining a story of success for both sides—developers and customers. He is an IT "tough guy", cloud-native application developer, and has started work as a software architect in cloud-based solutions. He is the founder of the Project Invader open source organization, mainly focused on developing and designing platform and software as a service applications for OpenStack. He is a contributor to the OpenStack DBaaS and the CloudValidation open source framework. He is a founder and technical project lead of the BeeDB project. He has worked on OpenStack Cloud Applications Development (http://as.wiley.com/WileyCDA/WileyTitle/productCd-1119194318.html).

I would like to say thank you to the entire team that helped me get the work done in time and at an appropriate level and supported me within this project and to my family that helped me stay concentrated on this book.

www.PacktPub.com

eBooks, discount offers, and more

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 <[email protected]> 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.

https://www2.packtpub.com/books/subscription/packtlib

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why subscribe?

Fully searchable across every book published by PacktCopy and paste, print, and bookmark contentOn demand and accessible via a web browser

Preface

Database management has come a long way over the last decade or so. The process of provisioning databases used to start with racking and stacking a physical server, installing and configuring an operating system, and finally, installing and configuring a database management system. This entire process took weeks and, in some cases, months. Once the database is provisioned, you then of course have a whole host of things to be managed, including availability, backups, security, and performance. This provisioning and management consumed a lot of time and resources. During the evolution, we had two trends that have had a significant impact on the way databases were provisioned and managed. Automation eased the management aspect and virtualization eased the provisioning, at least up to the operating-system layer. Meanwhile, the other trend that we have seen is that enterprises are moving away from a single database technology model to a model which is fancily termed "polyglot persistence". This basically means adopting multiple database technologies with the intention of storing the data in a database that is best suited for that type of data. With multiple types of database technologies coming into play, enterprises are finding it difficult to manage this complexity while maintaining corporate standards and compliance.

Fortunately for us, over the last couple of years, cloud is the other trend that came to our rescue. With the advent of cloud, we have initially seen self-service based agile provisioning of infrastructure take off, which has been termed as Infrastructure as a Service and has automated a lot of aspects and made infrastructure management easier. Building on this a bit more, we now have self-service based agile provisioning of multiple types of databases, which is popularly known as Database as a Service (DBaaS). This has made things much easier for enterprises in terms of bringing in efficiencies and enforcing corporate standards and compliance. Enterprises can avail DBaaS from a public cloud such as Amazon Web Services or Microsoft Azure. Alternatively, they can build their own private cloud-based DBaaS and the need for this could be owing to various reasons such as data privacy and security. This is where OpenStack and Trove comes into the picture. OpenStack Trove is an open source implementation of DBaaS. While it has been in existence for a couple of years, it has started gaining momentum only recently with enterprises giving it a serious thought.

The benefits of DBaaS in general and OpenStack Trove in particular are obvious. The key challenge, however, is that beyond the documentation that is available from the OpenStack project itself, there is not much reading material out there to help potential DBAs and system/cloud administrators. This lack of skill and know-how is one of the potential inhibitors to OpenStack Trove adoption.

This book is an attempt to provide all the essential information that is necessary to kick-start your learning of OpenStack Trove and set up your own cloud-based DBaaS. In this book, the readers will be introduced to all major components of OpenStack Trove. Following this, the readers will get to understand how to set up Trove in both development and production environments, configuring it, and performing management activities such as backup and restore. Not to mention, it also deals with certain advanced database features, such as replication and clustering. This book takes a more practical approach to learning, as the learning from each chapter will contribute to the reader's ability to build his/her own private cloud-based DBaaS by the time he/she completes reading this book. We hope you will enjoy reading this book and, more importantly, find it useful in your journey towards learning and implementing DBaaS using OpenStack Trove.

What this book covers

Chapter 1, Introducing OpenStack Trove, introduces the concept of Database as a Service and its advantages, followed by a quick introduction to the OpenStack Trove project and its components.

Chapter 2, Setting up Trove with DevStack in a Box, provides a list of prerequisites for the book. This chapter also helps you understand DevStack and its components and then helps you set up Trove with DevStack.

Chapter 3, Installing Trove in an Existing OpenStack Environment, gives you an overview of the different available methods to deploy Trove. It deals a little bit more in detail with installing Trove from source and the Ubuntu repository.

Chapter 4, Preparing the Guest Images, as the name implies, details how to build production-ready images that will be required by Trove.

Chapter 5, Provisioning Database Instances, looks at creating and launching instances using both CLI and GUI.

Chapter 6, Configuring the Trove Instances, introduces you to configuring Trove instances and also how to make configuration changes to multiple Trove instances using configuration groups.

Chapter 7, Database Backup and Restore, introduces the concept of Strategies and provides an overview of how to back up and restore Trove instances.

Chapter 8, Advanced Database Features, deals with advanced features such as replication and clustering in Trove.

What you need for this book

For all the chapters, you will require Ubuntu system and DevStack installed.

Who this book is for

This book is intended for database administrators having experience with RDBMS and NoSQL databases wanting to offer DBaaS (short for Database as a Service) to the end users using OpenStack Trove. It assumes that the readers have experience in database administration with one or more databases, preferably with MySQL

This book will help any reader trying to build their skills in OpenStack Trove. We believe that this is the right kind of opportunity for all those of you who have embarked on a journey to build OpenStack Trove skills and enhance your career in the next generation cloud world

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We should be able to find the screen name using the screen –ls command."

A block of code is set as follows:

FLOATING_RANGE=192.168.1.0/27 FIXED_RANGE=10.1.10.0/24 FIXED_NETWORK_SIZE=256 FLAT_INTERFACE=eth0 ADMIN_PASSWORD=adm1npwd DATABASE_PASSWORD=dbr00tpwd RABBIT_PASSWORD=rabb1tpwd SERVICE_PASSWORD=oss3rvice SERVICE_TOKEN=x1y1z1token

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

export http_proxy=http://172.21.2.17:80export https_proxy=http://172.21.2.17:80export no_proxy=localhost,172.22.6.0/24

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Once you are able to log in, navigate to System | System Information."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions