In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
The editor will share with you what Openstack Trove means. I hope you will get something after reading this article. Let's discuss it together.
Introduction to Trove
Openstack Trove is a database as a service (DBaaS) provided by openstack for users. The so-called DBaaS, that is, trove not only has the function of database management, but also has the advantages of cloud computing. With trove, users can:
Get the database server "on demand"
Configure the obtained database server or database server cluster
Automatic management of database servers or database server clusters
Dynamically scale the database server cluster according to the load of the database
Like other components of openstack, trove provides RESTful API and interacts with other components through RESTful API.
Trove architecture
The image above is the architecture diagram of trove. Trove API interacts with the user. When the Trove API receives the user's request, trove API will first call the API of Keystone to authenticate the user, and then perform the corresponding operation after the authentication is passed. Trove API will synchronize some requests with simple operations, while complex requests will be handed over to Task Manager through Message Queue (RabbitMQ). Task Manager listens to one of RabbitMQ's topic and processes the request when it is received. These requests are usually to allocate database instances, manage the lifecycle of database instances, manipulate databases, and so on. Like other components of openstack, Trove has an Infrastructure Database to store its own data, such as information about database instances. The main function of Trove conductor is to receive status update information from guest agent, which is stored in Infrastructure database or returned to other services as a result of the call. Usually these status updates include: guest agent heartbeat package, database backup status and so on. Guest Agent operates in the database server (virtual machine) and provides other components of trove with a set of other components of API,trove for internal use. Other components call these API,guest agent through Message Queue and execute the corresponding database operation after receiving the API call request.
For the installation and deployment of Trove, please refer to the official Openstack documentation (multi-pit caution):
Https://docs.openstack.org/project-install-guide/database/ocata/
The basic concept of Trove
Database instance (Instance): an openstack virtual machine that contains database programs. If a user creates a database instance, he actually creates an openstack virtual machine and starts the database service on that virtual machine.
Datastore: used to represent and store the type, version, virtual machine image and other information of the database. When a user creates a database instance, he or she needs to specify Datastore.
Configuration group (Configuration Group): collection of database parameters. Users can apply configuration groups to one or more database instances, thus avoiding a large number of repetitive operations.
Usage of Trove 0. Add Datastore
When creating a database instance, you need to specify Datastore to tell trove the mirror, database type, and version information you need to use. So before creating a database instance, you need to create Datastore. Net in the system.
Due to copyright issues, openstack officials do not provide downloadable images, users are required to go to build. Please refer to the documentation:
Https://docs.openstack.org/developer/trove/dev/building_guest_images.html
If Build is good for image, you need to upload it to glance service:
Ad@ltczhp11:~$ glance image-create-- name mysql-5.6-- disk-format=qcow2-- container-format=bare-- file=./mysql-5.6.qcow2-- visibility public ad@ltczhp11:~$ glance image-list+--+--+ | ID | | Name | +-+-+ | 31d60001-c2bf-496e-9f21-069bb411bd3b | CouchDB | | eaf27f1b-3a8a-4efb | -827c-697fa065933b | DB2 | | 60ca8bfc-28a7-418a-9422-ec6548f23d54 | DIB-Mongodb | | 51103b44-2618-4c15-8ded-4371bea8973a | DIB-Postgres | | 8bc1a6a2-6ec3-4f37-bb54-91134b903996 | mongodb-lsl | | c4c9a58f-bbe6-4640-8488-0c05b52028df | mysql-5.6 | | 5d800163-3660-467a-a433-e1827924a741 | PostgreSQL | | 38291f8f | -5af6-4338-82b7-3f18dc355cae | ubuntu16.04-server-s390x | +-
Use trove-manage to add Datastore:
Root@ltczhp11:~# trove-manage datastore_update mysql "" # create a datastoreroot@ltczhp11:~# trove-manage datastore_version_update mysql 5.6mysql c4c9a58f-bbe6-4640-8488-0c05b52028df "1 # create a dadastore version, a dadastore can have multiple versions root@ltczhp11:~# trove-manage datastore_update mysql 5.6 # specify the default datastore version 1. Basic database instance operation
List all database instances
$trove list
Create a database instance
$trove create vm1 2-size 3-datastore mysql
Restart a database instance
$trove restart vm1
Delete a database instance
$trove delete vm1
Force deletion of a database instance
$trove force-delete vm1
Adjust the specification of a database instance
$trove resize-volume vm1 4
$trove resize-instance vm1 3
2. Manage database users
List all database users
$trove user-list
Create a user
$trove user-create
Delete a user
$trove user-delete
Authorize a user to access a database
$trove user-grant-access
Revoke a user's access to a database
$trove user-revoke-access
Display user information
$trove user-show
Show the user's permissions
$trove user-show-access
3. Database management
Create a database in a database instance
$trove database-create
List all databases in a database instance
$trove database-list
Delete a database in a database instance
$trove database-delete
4. Copy management
Create a copy
$trove create-replica_of
Detach a copy from the source database
$trove detach-replica
Make a replica the source database in the replica collection
$trove promote-to-replica-source
Delete a dead source database
$trove eject-replica-source
Set replica affinity
$trove create-replica_of-locality affinity
$trove create-replica_of-locality anti-affinity
After reading this article, I believe you have a certain understanding of "what does Openstack Trove mean?" if you want to know more about it, you are welcome to follow the industry information channel. Thank you for your reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.