Sushil Kumar
c61a3bf5f9
Implement clustering for Vertica datastore
A specification for this change was submitted for review in https://review.openstack.org/#/c/151279 - HP Vertica Community Edition supports upto a 3-node cluster. - HP Vertica requires a minimum of 3 nodes to achieve fault tolerance. - This patchset provides ability to launch HP Vertica 3-node cluster. - The cluster-show API, would also list the IPs of underlying instances. Code Added: - Added API strategy, taskmanager strategy, and guestagent strategy. - Included unit tests. Workflow for building Vertica cluster is as follows: - Guest instances are booted using new API strategy which then sends control to taskmanager strategy for further communication and guestagent API execution. - Once the guest instances are active in nova, they receive "prepare" message and following steps are performed: - Mount the data disk on device_path. - Check if vertica packages have been installed, install_if_needed(). - Run Vertica pre-install test, prepare_for_install_vertica(). - Get to a status BUILD_PENDING. - Cluster-Taskmanager strategy waits for all the instances in cluster to get to BUILD_PENDING state. - Once all instances in a cluster get to BUILD_PENDING state, taskmanager first, configures passwordless ssh for os-users(root, dbadmin) with the help of guestagent APIs get_keys and authroize_keys. - Once passwordless ssh has been configured, the taskmanager calls install_cluster guestagent API, which installs cluster on member instances and creates a database on the cluster. - Once this method finishes its job then taskmanager calls another guestagent API cluster_complete to notify cluster member of completion of cluster creation. New Files: - A new directory, vertica, has been created, for api, taskmanager, guestagent strategies under trove/common/strategies/cluster/experimental. - Unit-tests for cluster-controller, api and taskmanager code. DocImpact Change-Id: Ide30d1d2a136c7e638532a115db5ff5ab2a75e72 Implements: blueprint implement-vertica-cluster
Trove
Trove is Database as a Service for Open Stack.
Usage for integration testing
If you'd like to start up a fake Trove API daemon for integration testing with your own tool, run:
Stop the server with:
Tests
To run all tests and PEP8, run tox, like so:
To run just the tests for Python 2.7, run:
To run just PEP8, run:
To generate a coverage report,run:
(note: on some boxes, the results may not be accurate unless you run it twice)
If you want to run only the tests in one file you can use testtools e.g.
Description
Languages
Python
95%
Shell
4.9%