Trove Project Onboarding Final2
Trove Project Onboarding Final2
Trove Project Onboarding Final2
2018
Schema Backup
Datastore Type Provisioning Resizing Replication Clustering
management and restore
MySQL ✓ ✓ ✓ ✓ ✓ ✓
MariaDB ✓ ✓ ✓ ✓ ✓ ✓
PostgreSQL Relational ✓ ✓ ✓ ✓ ✓ ✗
Percona ✓ ✓ ✓ ✓ ✓ ✓
DB2 ✓ ✓ ✓ ✓ ✗ ✗
Redis Key-value ✓ - ✓ ✓ ✓ ✓
Cassandra ✓ ✓ ✓ ✓ - ✓
Column
Vertica ✓ ✓ ✗ ✓ - ✓
MongoDB ✓ ✓ ✓ ✓ - ✓
Document
CouchDB ✓ ✓ ✓ ✓ - ✗
Couchbase Multi-model ✓ ✗ ✓ ✓ - ✗
Let’s dive into the internals
Deliverables
Trove
DynamoDB RedShift
RDBMS NoSQL
RDS Elasticache DW
DatabaseService
● prepare()
● list_databases()
● create_database()
● list_users()
● create_user()
● get_status()
● fetch_logs()
ClusteringStrategy
● create_cluster()
● grow_cluster()
● shrink_cluster()
● upgrade_cluster()
Strategy configuration
How do I get started?
Development environment setup: Devstack
● Download Devstack
git clone git://git.openstack.org/openstack-dev/devstack.git && cd devstack
● Edit local.conf
[[local|localrc]]
...
enable_plugin trove git://git.openstack.org/openstack/trove
LIBS_FROM_GIT=python-troveclient
● Run Devstack utility
./stack.sh
● Trove sources reside in Useful documentation:
/opt/stack/trove ❏ https://github.com/openstack/trove/tree/master/devstack
❏ https://docs.openstack.org/devstack/latest/configuration.html
Development environment setup: Kolla Ansible
● Install Kolla Ansible: https://docs.openstack.org/kolla-ansible/latest/user/quickstart.html
● Edit /etc/kolla/globals.yaml
enable_trove: "yes"
enable_cinder: "yes"
enable_cinder_backend_lvm: "yes" # required setting LVM volumes group
trove_dev_mode: "yes"
● Run deployment
kolla-ansible -i all-in-one prechecks
kolla-ansible -i all-in-one deploy
● Trove sources reside in /opt/stack/trove
Building guest images
● Install Disk Image Builder:
https://docs.openstack.org/diskimage-builder/latest/user_guide/installation.html
● Clone Trove repository
git clone https://github.com/openstack/trove.git
● Run build-image command
./trove/integration/scripts/trovestack build-image mysql
● Guest image will be built into $HOME/images directory
Useful documentation:
❏ https://docs.openstack.org/trove/latest/admin/building_guest_images.html
Load images into Trove
● Upload image to Glance
openstack image create --file $HOME/images/<image-name>.qcow2 \
--disk-format qcow2 --public ubuntu_mysql
● Setup datastore in Trove
trove-manage datastore_update mysql ""
trove-manage datastore_version_update mysql 5.7 mysql <glance-image-id> "" 1
trove-manage datastore_update mysql 5.7
trove-manage db_load_datastore_config_parameters \
mysql 5.7 \
./trove/trove/templates/$DATASTORE_TYPE/validation-rules.json
Cloudinit scripts
● Allow to customize VM on the first boot
● Each datastore defines its own <datastore-name>.cloudinit script in
/etc/trove/cloudinit directory
● Task Manager collects cloudinit content and injects it into VM via user data
● Example use cases
○ Setting authorized keys for connection from the host
○ Synchronizing guest code with host or external repository
○ Configuring monitoring agents
○ Running Ansible playbooks
Where contribution
is needed?
Appealing work awaiting
● Python 3 support
● Aligning OpenStack CLI with Trove CLI
● Cluster management
(backups, rolling upgrades, flavor resizing)
● Datastore support enhancement
(Oracle, SQL Server, HBase, Druid, etc.)
● Cluster status monitoring
● Backup encryption