This document provides a step-by-step guide for manual installation of Trove with an existing OpenStack environment for development purposes.
This document will not cover OpenStack setup for other services.
A running OpenStack environment installed on Ubuntu 16.04 or 18.04 LTS is required, including the following components:
Trove makes use of an “Management Network” that the controller uses to talk to trove instance and vice versa. All the trove instance that Trove deploys will have interfaces and IP addresses on this network. Therefore, it’s important that the subnet deployed on this network be sufficiently large to allow for the maximum number of trove instance and controllers likely to be deployed throughout the lifespan of the cloud installation.
You must also create a Neutron security group which will be applied to trove instance port created on the management network. The cloud admin has full control of the security group, e.g it can be helpful to allow SSH access to the trove instance from the controller for troubleshooting purposes (ie. TCP port 22), though this is not strictly necessary in production environments.
Finally, you need to add routing or interfaces to this network so that the Trove controller is able to communicate with Nova servers on this network.
List of packages to be installed:
$ sudo apt-get install -y build-essential python-dev libpython-dev \
python-setuptools libffi-dev libxslt1-dev libxml2-dev libyaml-dev \
libssl-dev zlib1g-dev mysql-client python-pymysql libmysqlclient-dev git
Install pip:
curl -SO# https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py pip==9.0.3 && rm -f get-pip.py
Install virtualenv, create Trove environment and activate it:
pip install virtualenv --user
virtualenv --system-site-packages trove_env
source trove_env/bin/activate
Obtain the Trove source components from OpenStack repositories:
cd ~
git clone https://opendev.org/openstack/trove.git
git clone https://opendev.org/openstack/python-troveclient.git
First, install the requirements:
cd ~/trove
sudo pip install -r requirements.txt -r test-requirements.txt
Then, install Trove:
sudo pip install -e .
Finally, install the Trove client:
cd ~/python-troveclient
sudo pip install -e .
cd ~
Other required OpenStack clients (python-novaclient, python-keystoneclient, etc.) should already be installed as part of the Trove requirements.
Note
You need to run the following commands using OpenStack admin credentials.
Create Trove service user with admin role in the service
project.
openstack user create trove --project service --password-prompt
openstack role add --user trove --project service admin
Register Trove in Keystone.
openstack service create --name trove --description "Database" database
openstack endpoint create --region RegionOne database public 'http://<EnvironmentPublicIP>:8779/v1.0/$(tenant_id)s'
openstack endpoint create --region RegionOne database admin 'http://<EnvironmentPublicIP>:8779/v1.0/$(tenant_id)s'
openstack endpoint create --region RegionOne database internal 'http://<EnvironmentPublicIP>:8779/v1.0/$(tenant_id)s'
Where <EnvironmentPublicIP> is the IP address of the server where Trove was installed. This IP should be reachable from any hosts that will be used to communicate with Trove.
There are several configuration files for Trove, you can find samples of the
config files in etc/trove/
of Trove repo:
<datastore_manager>.cloudinit
— Userdata for VMs during provisioningConfig service tenant model, change the values according to your own environment.
nova_proxy_admin_user = admin
nova_proxy_admin_pass = password
nova_proxy_admin_tenant_name = admin
nova_proxy_admin_tenant_id = f472127c03f6410899225e26a3c1d22c
nova_proxy_admin_user_domain_name = default
nova_proxy_admin_project_domain_name = default
remote_nova_client = trove.common.single_tenant_remote.nova_client_trove_admin
remote_cinder_client = trove.common.single_tenant_remote.cinder_client_trove_admin
remote_neutron_client = trove.common.single_tenant_remote.neutron_client_trove_admin
os_region_name = RegionOne
Management config options.
Trove management network ID list. Cloud admin needs to create the networks.
Security group IDs that applied to the management port in the trove instance. Cloud admin needs to create the security groups.
The Nova keypair used to create trove instance. Cloud admin needs to create the keypair.
The Cinder volume type name used to create volume that attached to the trove instance, otherwise, users need to provide the volume type when creating the instance.
Create the Trove database schema:
mysql+pymysql://<user>:<password>@<backend_host>:<backend_port>/<database_name>
Once the database for Trove is created, its structure needs to be populated.
$ trove-manage db_sync
To build Trove guest image, refer to Build guest agent image
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.