Every couple of days, you see a newcomer to Trove encounter one of a few common challenges. This blog post is a summary of these and provides some simple time saving tips that will significantly improve the first experience with OpenStack Trove.
1. Start by running Trove in a virtual machine
On your first attempt at running Trove, it is much easier if you run it in a VM. For a beginner, I recommend just creating a new one with Ubuntu 14.04 using VMWare.
- Don’t use Virtual Box, it has a known bug that will make your experiments fail.
- When using VMWare, remember to enable VT-x and performance counters in the processor configuration tab.
- Snapshot often, it makes rolling back to a known state very easy.
2. Start with Red Stack or DevStack
- DevStack is a tool for setting up a complete development environment with OpenStack. It is a very versatile tool and can setup all projects including Trove. For this, you just need to enable the services trove, tr-api, tr-tmgr and tr-cond. You must also enable the plugins for trove and python-troveclient.
- If you aren’t already familiar with DevStack, using Red Stack may be easier.
- Red Stack is tool for setting up a complete development environment for Trove. It sets up all the basic OpenStack services and Trove in one simple and easy to use process.
- Using Red Stack is easy, start by cloning the trove-integration repository.
- Then run these commands:
- trove-integration/scripts/redstack install
- trove-integration/scripts/redstack kick-start mysql
- You will now have a completely installed Trove development environment and can launch a trove instance with the MySQL database. Replace MySQL above with another datastore if you prefer.
3. Get familiar with Trove before attempting to build your own guest images.
A lot of first-timers decide that they are going to begin by installing Trove and building their guest images. This usually doesn’t end well.
If you insist on doing this, at least use the reference elements provided in the trove-integration project for your first attempt.
A few people even decided to start using Trove and as part of their introduction to Trove they wanted to build a guest agent and images for a hitherto unsupported database. This did not go very well either.
4. Once you get your Red Stack or DevStack setup running, play with it – a lot.
Try out all the things you are interested in like replication, clustering, configuration groups, resizing instances, storage, and so on. Understanding these operations is a great way to learn about the many things that Trove can do for you.
Snapshots of your VM will prove to be an invaluable tool in this regard, you can quickly revert to a known-good configuration and continue to experiment.
5. Consider buying the book on Trove, “OpenStack Trove”.
Doug Shelley and I wrote this book with the beginner in mind and provided a detailed introduction including how to get OpenStack Trove installed and running. It proceeds to describe the inner workings in great detail, and explains how each of the various Trove capabilities is implemented. It explains the architecture of Trove and how each of the services (API, Task Manager, Conductor) and the Guest Agent deliver Database-as-a-Service capabilities for numerous databases.
6. Don’t use DevStack to build a production environment
The DevStack tool is intended strictly as a tool for building a development environment while it and Red Stack create an insecure environment that is ideally suited for software development, and debugging. It is entirely unsuitable for a production deployment.
Do you have any tips for newbies? Please leave a comment so we can share them with new users.