You are previewing OpenStack Trove Essentials.
O'Reilly logo
OpenStack Trove Essentials

Book Description

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.

    Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at If you purchased this book elsewhere, you can visit and register to have the code file.

    Table of Contents

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