39
OpenStack ® Summit Austin 2016 OpenStack ® Summit Austin 2016 Sadasiva Pillalamarri Rama Krishna Bhupathi

Configure, Debug and Install OpenStack Trove

Embed Size (px)

Citation preview

Page 1: Configure, Debug and Install OpenStack Trove

OpenStack® Summit Austin 2016OpenStack® Summit Austin 2016

Sadasiva PillalamarriRama Krishna Bhupathi

Page 2: Configure, Debug and Install OpenStack Trove

Configure, Debug and Install OpenStack Trove

2

Page 3: Configure, Debug and Install OpenStack Trove

Agenda – What is OpenStack Trove?

– Trove Architecture

– Installation

– Configuration

– Debugging

– Questions

3

Page 4: Configure, Debug and Install OpenStack Trove

4

What is Trove? Trove Mission Statement :

To provide scalable and reliable Cloud Database as a Service provisioning functionality for both relational and non-relational database engines, and to continue to improve its fully-featured and extensible open source framework.

Page 5: Configure, Debug and Install OpenStack Trove

5

Page 6: Configure, Debug and Install OpenStack Trove

6

Trove exposes RESTful public API and stores it’s persistent data in and infrastructure database

Trove public API

OpenStack Trove Services

Infrastructure Database

Page 7: Configure, Debug and Install OpenStack Trove

7

Trove API Services -- Exposes a Standard Contract, provides RESTful API

-- when receives the request, it authenticates the requester using one of the configured authentication mechanism

Page 8: Configure, Debug and Install OpenStack Trove

8

Trove Task Manager – Listens on message queue ( requester posts message to the task manager )

– Task Manager executes these requests by invoking the appropriate routines

– /etc/trove/trove-taskmanager.conf ( entry points )

– Handles operations such as : instances creation, deletion, interactions with other services like nova, cinder and swift

Page 9: Configure, Debug and Install OpenStack Trove

9

Trove Conductor Service – Receives updates various types of status updates from guest agent… some

cases updating the trove infrastructure database

– Listens to messaging queue for specific topics… guest agent heart beats and backup status.

– /etc/trove/trove-conductor.conf

Page 10: Configure, Debug and Install OpenStack Trove

10

Trove Strategies Strategies are design construct within Trove that allows developers to extend Trove by supporting new implementations

Page 11: Configure, Debug and Install OpenStack Trove

11

Trove Extensions – Trove supports some database-specific Operations ( called extensions )

– These includes commands like : – Database-list, database-create, database-delete, user-list, user-create, user-grant-

access and user-show-access

Page 12: Configure, Debug and Install OpenStack Trove

12

Custom Flavors – Flavors are a template for the Virtual Machine: provides basic hardware

configuration information

– Flavors can be customized– Amount of memory, disk space, number of virtual cpu, swap size, is_public, and etc.

Page 13: Configure, Debug and Install OpenStack Trove

13

Backup and Restore – Implements a framework… datastores can implement mechanism to take a

backup

– Trove does not perform Backup, datastore does

– Can launch a new instance from the backup

– Backup can be incremental

– /etc/trove/trove-guestagent.conf ( backup configurations )

Page 14: Configure, Debug and Install OpenStack Trove

14

Replication – Provides framework, does not perform replication

– Can configure and establishes the replication– Maintains information to help it identify the members in the replication set– Performs operations like failover if required

Ex: trove create <name of the instance> m2-mirror 2 –size 2 –replica <source-instance >

Page 15: Configure, Debug and Install OpenStack Trove

15

Configuration Groups – During the launch of a guest instance, the Task manager renders a

configuration file and provides to the guest

– Configuration group let user to set configuration options in bulk.

– A configuration group contains a comma-separated list of key-value pairs. Each pair consists of a configuration option and its value.

– A configuration group can be attached to the database instance

Page 16: Configure, Debug and Install OpenStack Trove

16

Configuration groups – Ex: trove list - get the instance id

– trove configuration-list - get the configuration group id

– Trove configuration-attach <instance ID, configuration_group_id>

– configuration group – NAME. The name you want to use for this group.– VALUES. The list of key-value pairs.– DATASTORE_NAME. The name of the associated data store.

Page 17: Configure, Debug and Install OpenStack Trove

17

Supported DataStores continues ……..

–MySQL, MongoDB, Redis ( single Instance + Cluster )–Apache Cassandra –Couchbase, Percona–PostgreSQL, Redis ,Maria DB

Page 18: Configure, Debug and Install OpenStack Trove

Installation – We will install Trove integrated with devstack

– Start off with a brand new Virtual Machine (VM).

– Install Ubuntu 14.04

– Follow the instruction here:– http://docs.openstack.org/developer/trove/dev/install.html– Follow the instructions all the way thru

18

Page 19: Configure, Debug and Install OpenStack Trove

Installation… – Make configuration changes to your machine as outlined in the document

– Clone the trove repository.– git clone https://git.openstack.org/openstack/trove-integration.git

– The above will download the required scripts for Trove and Devstack

– Depending on your configuration make changes to the trove repo.

19

Page 20: Configure, Debug and Install OpenStack Trove

Installation…. Some suggestions in configuration before you install: – Make sure you set the proxies correctly (in case you are required to go thru

proxies)

– if git protocol does not work for you, change it to https – Go to ~/trove-integration/scripts. Edit redstack.rc

– Change GIT_BASE=${GIT_BASE:-git://git.openstack.org}– To GIT_BASE=${GIT_BASE:-https://git.openstack.org}

20

Page 21: Configure, Debug and Install OpenStack Trove

Installation…. Run ./redstack install – This brings up trove (tr-api tr-tmgr tr-cond) and initializes the trove database.

21

Page 22: Configure, Debug and Install OpenStack Trove

Installation…. – Kick start the build/test-init/build-image commands. Add mysql as a parameter

to set build and add the mysql guest image.

– redstack kick-start myql

22

Page 23: Configure, Debug and Install OpenStack Trove

Installation…. – What if you run into errors ?

– Fix the errors' (may need to change file/directory permissions etc)– Go to devstack directory and

– run ./unstack.sh– run ./clean.sh

– Proceed with rerunning your previous command.

23

Page 24: Configure, Debug and Install OpenStack Trove

Validation Make sure the Trove installation is successful – Access the devstack directory (cd ~devstack)

– Run source openrc admin admin 3de4922d8b6ac5a1aad9– The password should be in the redstack.rc

– Run trove list

24

Page 25: Configure, Debug and Install OpenStack Trove

Validation… Make sure the Trove installation is successful – Make sure the trove endpoints are created.

– openstack catalog list and make sure trove endpoints are listed.

25

Page 26: Configure, Debug and Install OpenStack Trove

Validation… Let us create a database instance. – trove create myinstance 2 --size 2

26

Page 27: Configure, Debug and Install OpenStack Trove

Validation… Check the status of your database instance. – trove show 85a05fde-39f2-4870-970a-762a3204c814

27

Page 28: Configure, Debug and Install OpenStack Trove

Validation… Let us create a database and a user to connect to. – trove database-create 85a05fde-39f2-4870-970a-762a3204c814

myfirstdatabase

– trove user-create 85a05fde-39f2-4870-970a-762a3204c814 demo password --databases myfirstdatabase

28

Page 29: Configure, Debug and Install OpenStack Trove

Validation… Let us connect to the database. – mysql -u demo -ppassword -h 10.0.0.4

29

Page 30: Configure, Debug and Install OpenStack Trove

Configuration – trove-conductor.conf

– the configuration for the Trove conductor service.

– trove.conf – the general configuration for the Trove API service.

– trove-taskmanager.conf – the configuration options for the Trove Task Manager service.

– trove-guestagent.conf– Not used by the host. This is passed on to the guest image.

30

Page 31: Configure, Debug and Install OpenStack Trove

Choosing Neutron for Trove – By default devstack configures the system using Nova Networking.

– If you want to use Neutron instead of Nova, the following changes are needed in the local.conf – ENABLED_SERVICES+=,neutron,q-svc,q-agt,q-dhcp,q-l3,q-meta– disable_service n-net

31

Page 32: Configure, Debug and Install OpenStack Trove

Debugging and Troubleshooting – Access Log files on the trove controller node

– cd /opt/stack/logs– tr-api.log– tr-tmgr.log– tr-cond.log

– Run your trove commands with –debug option

32

Page 33: Configure, Debug and Install OpenStack Trove

Debugging and Troubleshooting… Access the logs on the controller node.

33

Page 34: Configure, Debug and Install OpenStack Trove

Debugging and Troubleshooting… – You can also access the logs in the guest node

– ssh 10.0.0.4– Access /var/log/trove

– Check for error messages in the trove-guestagent.log

– Errors before launching the guest agent are in /var/log/upstart/trove-guest.log

34

Page 35: Configure, Debug and Install OpenStack Trove

Debugging and Troubleshooting…

35

Page 36: Configure, Debug and Install OpenStack Trove

Debugging and Troubleshooting…

36

– You can also access the nova console logs for the vm corresponding to the database instance.– nova console-log f65ab59f-e7e1-4daa-bc4e-0a7fcb325294

Page 37: Configure, Debug and Install OpenStack Trove

More Information

37

https://wiki.openstack.org/wiki/Trove

Page 38: Configure, Debug and Install OpenStack Trove

Questions?

38

Rama Krishna ([email protected])Sadasiva P ([email protected])

Page 39: Configure, Debug and Install OpenStack Trove

Thank you

39