OpenStack

Trove Dashboard Installation & Trove Installation for openSUSE & SUSE Linux Enterprise

From the title of today’s blog, you must have come to know that today we are going to discuss “OpenStack Database (Trove)” component and after that, we are going to continue our discussion with installation and configuration of it for openSUSE and SUSE Linux, and installation and configuration of Trove Dashboard. I guarantee you today’s blog will be really interesting and simple to understand!

Therefore without wasting our time, let’s start the discussion!

Overview of Database (Trove):

Trove is a Database which was constructed to work completely on the OpenStack, with an aim of letting the users swiftly and effortlessly make use of the characteristics of relational databases excluding the stress of managing the complicated administration processes. Thus we can say that Trove is a database like service for the OpenStack. Therefore it is possible for all the cloud users and administrators of the database to be able to provide as well as handle more than one database events as per the requirement.

First of all the Trove service focuses on supplying the isolation of resources with a top-level performance at the same time the complicated administration works can be automated along with the other processes like installation, constitution, taking backups, restoring data and resolving problems, regulating, etc.

Now our next discussion is about how to install and configure the database Trove service:

Installation and configuration of Database service:

Points to be considered:

  • Before starting, we are assuming that you have already installed the components like Compute, Image service and Identity on your system and thus you have already set up an OpenStack working environment.
  • Also, you may require Object Storage, in case if you want to take a backup of the data as well as restore the data and you may also require Block Storage if you are providing data storage on the volumes of block storage.
  • It is also important to note that, based on the distribution installed on your system, the installation and configuration will vary. There are different installations and configurations depending upon following 3 types of distributions:
  1. openSUSE and SUSE Linux Enterprise
  2. Red Hat Enterprise Linux and CentOS
  3. Ubuntu

Today, we are going to discuss the installation and configuration only for the openSUSE and SUSE Linux Enterprise distribution, and the process of installation and configuration for other two types of distributions will be discussed in the next blog.

Install and configure for openSUSE and SUSE Linux Enterprise

Now let’s first look at the points which we are going to consider for installing and configuring for the openSUSE and SUSE Linux Enterprise:

  1. First, we will look at the Prerequisites
  2. Then we will find out the components for installation and configuration.
  3. The last point will be finalizing the installation.

As mentioned earlier, we are going to describe the process of installation and configuration for the openSUSE Leap 42.2 and for SUSE Linux Enterprise Server 12 SP2.

  1. Let’s look at the Prerequisites for installation and configuration:

Before performing the installation and configuration of the database service, you should first create a database; also create credentials for the database and API endpoints.

  1. For creating the database, first, you are required to complete the following steps:
  2. Initially, take help of the database access client for connecting with the database server,  as a “root” user, enter the following command:

$ mysql -u root -p

  • Then create a “trove” database, as follows:

CREATE DATABASE trove;

  • As discussed earlier, grant the appropriate access to the “trove” database:

GRANT ALL PRIVILEGES ON trove.* TO ‘trove’@’localhost’ \

 IDENTIFIED BY ‘TROVE_DBPASS’;

GRANT ALL PRIVILEGES ON trove.* TO ‘trove’@’%’ \

 IDENTIFIED BY ‘TROVE_DBPASS’;

Then substitute the TROVE_DBPASS with an appropriate password.

  • Now, log out of the database access client.
  • For obtaining permission to use admin only command line interpreter commands, acquire the “admin” permission:

$ . admin-openrc

  • Complete the following steps for creating service permissions or credentials:
  • First of all create a “trove” user, as follows:

$ openstack user create –domain default –password-prompt trove

User Password:

Repeat User Password:

+———–+———————————–+

| Field     | Value                             |

+———–+———————————–+

| domain_id | default                           |

| enabled   | True                              |

| id        | ca2e175b851943349be29a328cc5e360  |

| name      | trove                             |

+———–+———————————–+

  • Then assign an “admin” role to that “trove user”, by using the following command:

$ openstack role add –project service –user trove admin

 Important Note:

It is important to keep in mind that, the above command does not provide any output.

  • Once the “admin” credential is assigned to a trove user, after that it’s time to create a “trove service entity”, as follows:

$ openstack service create –name trove \

  –description “Database” database

+————-+———————————–+

| Field       | Value                             |

+————-+———————————–+

| description | Database                          |

| enabled     | True                              |

| id          | 727841c6f5df4773baa4e8a5ae7d72eb  |

| name        | trove                             |

| type        | database                          |

+————-+———————————–+

  • Once the trove service entity is created, it’s time to create Database service API endpoints, as follows:

$ openstack endpoint create –region RegionOne \

  database public http://controller:8779/v1.0/%\(tenant_id\)s

+————–+———————————————-+

| Field        | Value                                        |

+————–+———————————————-+

| enabled      | True                                         |

| id           | 3f4dab34624e4be7b000265f25049609             |

| interface    | public                                       |

| region       | RegionOne                                    |

| region_id    | RegionOne                                    |

| service_id   | 727841c6f5df4773baa4e8a5ae7d72eb             |

| service_name | trove                                        |

| service_type | database                                     |

| url          | http://controller:8779/v1.0/%\(tenant_id\)s  |

+————–+———————————————-+

$ openstack endpoint create –region RegionOne \

  database internal http://controller:8779/v1.0/%\(tenant_id\)s

+————–+———————————————-+

| Field        | Value                                        |

+————–+———————————————-+

| enabled      | True                                         |

| id           | 9489f78e958e45cc85570fec7e836d98             |

| interface    | internal                                     |

| region       | RegionOne                                    |

| region_id    | RegionOne                                    |

| service_id   | 727841c6f5df4773baa4e8a5ae7d72eb             |

| service_name | trove                                        |

| service_type | database                                     |

| url          | http://controller:8779/v1.0/%\(tenant_id\)s  |

+————–+———————————————-+

$ openstack endpoint create –region RegionOne \

  database admin http://controller:8779/v1.0/%\(tenant_id\)s

+————–+———————————————-+

| Field        | Value                                        |

+————–+———————————————-+

| enabled      | True                                         |

| id           | 76091559514b40c6b7b38dde790efe99             |

| interface    | admin                                        |

| region       | RegionOne                                    |

| region_id    | RegionOne                                    |

| service_id   | 727841c6f5df4773baa4e8a5ae7d72eb             |

| service_name | trove                                        |

| service_type | database                                     |

| url          | http://controller:8779/v1.0/%\(tenant_id\)s  |

+————–+———————————————-+

  • As mentioned earlier, the second step is to look at the components required for the installation and configuration:
  • First of all, it is required to install the packages, like Python, use the following commands:

# zypper –quiet –non-interactive install python-oslo.db \

  python-MySQL-python

# zypper –quiet –non-interactive install openstack-trove-api \

  openstack-trove-taskmanager openstack-trove-conductor \

  openstack-trove-guestagent

  • Then modify the trove.conf, trove-taskmanager.conf and trove-conductor.conf files present in the /etc/trove directory, and then again complete the following steps:
  • For the following settings, assign proper values:

[DEFAULT]

log_dir = /var/log/trove

trove_auth_url = http://controller/identity/v2.0

nova_compute_url = http://controller:8774/v2

cinder_url = http://controller:8776/v1

swift_url = http://controller:8080/v1/AUTH_

[database]

connection = mysql+pymysql://trove:TROVE_DBPASS@controller/trove

  • For using the “RabbitMQ” message broker, configure the Database service, by setting up following options in each file:

[DEFAULT]

rpc_backend = rabbit

transport_url = rabbit://<rabbit_userid>:<rabbit_password>@<rabbit_host>:5672

  • Check whether the api-paste.ini file is present the in /etc/trove.

If the API-paste.ini file is not present in /etc/trove, then you can find it at the following location:

  • Edit the trove.conf file so for assigning the proper values to the following settings, it is required to modify the trove.conf file, as follows:

[DEFAULT]

auth_strategy = keystone

# Config option for showing the IP address that nova doles out

add_addresses = True

network_label_regex = ^NETWORK_LABEL$

api_paste_config = /etc/trove/api-paste.ini

[keystone_authtoken]

www_authenticate_uri = http://controller/identity

auth_url = http://controller/identity_admin

auth_type = password

project_domain_name = default

user_domain_name = default

project_name = service

username = trove

password = TROVE_PASS

  • Now, modify the trove-taskmanager.conf file so that it consists of the required settings for connecting with the OpenStack Compute service as shown below. Also try to include the ConfigDrive settings there by the configuration is inserted into the Guest Virtual Machine. And finally, if you are using Nova Network, then set the network driver name and also the regex which permits the projects or tasks to introduce the guests on any type of their networks.

[DEFAULT]

# Configuration options for talking to nova via the novaclient.

# These options are for an admin user in your keystone config.

# It proxy’s the token received from the user to send to nova

# via this admin users creds,

# basically acting like the client via that proxy token.

nova_proxy_admin_user = admin

nova_proxy_admin_pass = ADMIN_PASS

nova_proxy_admin_tenant_name = service

taskmanager_manager = trove.taskmanager.manager.Manager

# Inject configuration into guest via ConfigDrive

use_nova_server_config_drive = True

# Set these if using Neutron Networking

network_driver=trove.network.neutron.NeutronDriver

network_label_regex=.*

  • Again modify the /etc/trove/trove-guestagent.conf file there by the future trove guests are able to relate to your OpenStack environment, as follows:

rabbit_host = controller

rabbit_password = RABBIT_PASS

trove_auth_url = http://controller/identity_admin/v2.0

  • Fill in the values in the trove database that you have created earlier in this procedure:

# su -s /bin/sh -c “trove-manage db_sync” trove

  …

  2016-04-06 22:00:17.771 10706 INFO trove.db.sqlalchemy.migration [-]

  Upgrading mysql+pymysql://trove:dbaasdb@controller/trove to version latest

Important Note:

Always ignore any messages related to minimization in this output.

  • Finalizing the installation:

For finalizing the installation, first of all enable the Database services and then configure them such that they will enable when the system boots:

# systemctl enable openstack-trove-api.service \

  openstack-trove-taskmanager.service \

  openstack-trove-conductor. Service

# systemctl start openstack-trove-api.service \

  openstack-trove-taskmanager.service \

  openstack-trove-conductor.service

Up to here we saw overview of the database trove service and how to install and configure it for the openSUSE and SUSE Linux Enterprise. I hope you understand these topics. Now we are moving on to another section, which is about how to install and configure the trove dashboard:

Installation and configuration of the Trove dashboard:

  • The Installation and configuration of the Trove dashboard is direct and it is better to install Trove dashboard through pip as follows:

# pip install trove-dashboard

  • The above command will install the latest version of the Trove Dashboard that is appropriate only if you are running the latest Trove and if you are running an older version of Trove, then you may require mentioning a version of trove-dashboard which is compatible.
  • Once the pip installs Trove dashboard, find the trove-dashboard directory and copy the entire content present in the enabled/ directory to your horizon openstack_dashboard/local/enabled/ directory.
  • Finally, refresh Apache to renew the changes to Horizon.

That’s all for today! I hope you find this information helpful. Please do not forget to leave a comment in the comment section below. Thank you for reading the blog! See you soon with another interesting blog!

People also read:


Vishwajit Kale
Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostripples, a company that aims to provide affordable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.

View Comments

Recent Posts

The Ultimate Showdown: Linux vs Windows for VPS Hosting

As the demand for virtual private servers (VPS) continues to grow, businesses and individuals are faced with a crucial decision:…

2 weeks ago

Questions to Ask Your Web Hosting Support Team

Web hosting is a large industry, as many other factors help any web hosting provider to form a company. The…

2 weeks ago

How to Secure Your WordPress Site in 2025

Welcome to the complete guide to WordPress security best practices in 2024. As technology evolves rapidly, implementing strong security measures…

3 weeks ago

Unlocking the Secrets of Hosting: Essential Questions to Ask Hostripples

Hey, wanted to learn about web hosting? Or do you want to start a new website and need hosting? Questions…

3 weeks ago

DDoS Attacks: What You Need to Know for Protection

In today's digital world, the threat of DDoS attacks has become increasingly prevalent. These types of attacks have the power…

1 month ago