Abstract: August 31, the 18th version of OpenStack, the industry's Rocky, is officially released. Driven by users such as AI, machine learning, NFV and Edge Computing, the rocky version of OpenStack is more powerful than ever, bringing dozens of enhancements and supporting a variety of hardware architectures, including bare metal management services, which are well-equipped to meet the new needs of the infrastructure. OpenStack is striving to provide the industry with an open, complete, stable, fully functional and optimal solution. Today will be around the rocky version of the Trove project, the new features of the project to show, the industry needs to grasp the key points are here.
Trove Introduction
Trove is the official OpenStack Database-as-service project that provides the deployment, configuration, Backup, recovery, and monitoring of relational or non-relational databases, greatly simplifying operational processes. It is hatched in the OpenStack Havana version and is formally integrated in the OpenStack Icehouse version. The original sponsors of the project were HP and Rackspace, and the main contributors were tesora,rackspace,hp,ibm,redhat,ebay,mirantis.
Rocky version trove feature changes at a glance
In the latest release of the OpenStack Rocky release, Trove did not introduce new features, focusing more on fixing some bugs, such as:
1, MARIADB when the primary standby switch, if the old primary server is reactivated before attaching the replica to the new primary server, a new gtid may be created unexpectedly on the old primary server and synchronized to those replicas, from which the server cannot change to the primary server. The problem is resolved by attaching the replica to the new primary service first.
2. Cancel create volume from Nova, create volume directly through Cinderclient.
3. The peviously root Disable API returns an HTTP 200 response with no content, and now returns a more appropriate HTTP 204 response.
Trove Project Architecture
Figure 1 Trove System architecture diagram
Figure 1 shows the architecture of the Torve Project, which consists of the trove-api,trove-taskmanager,trove-conductor and trove-guestagent subsystems that communicate between subsystems through RPC. In these 4 subsystems:
1, TROVE-API provides the rest-style API, the completion of some data-level logic operations (direct operation of the DB), such as the acquisition of the instance list, cluster list, and so on, the complex asynchronous task to TaskManager to complete, such as the creation of virtual machines, volumes and other operations.
2, Trove-taskmanager and OpenStack core Components Nova, Cinder, neutron and other operations, complete the creation of database instances, delete and other resource operations.
3, Trove-guestagent integrated in the VM image, create, manage, backup database and so on, and through the periodic task, update the database status in real time.
4, Trove-conductor as the trove database access middleware, avoids the trove-guestagent direct access to trove database.
Trove abstracts the public infrastructure of the system and supports a variety of different types of databases through the development of infrastructure inheritance. This also allows users to operate different types of databases in a unified manner, reducing the difficulty of use. OpenStack trove currently supports Cassandra,couchbase,couchdb,datastax Enterprise,db2,mariadb,mongodb,mysql,oracle,percona Server,postgresql,redis and Vertica.
Trove Common operations
Figure 2 Trove Conceptual architecture diagram
Figure 2 shows the conceptual architecture diagram of the trove, and the main operations of trove are implemented around these concepts, instance operations, Datastore operations, backup operations, cluster operations, configuration operations, replica operations , user operations, and database operations. Some of their operations are shown below, and detailed operating parameters can be obtained by Trove--help.
- Instance operation
Instance represents a virtual machine running MySQL or MongoDB, the operation of instance can fall on the virtual machine, can also fall on MySQL, MongoDB.
? Trove Create: Creates a trove instance
? Trove Delete: Delete a trove instance
? Trove Resize-instance: Adjusting the flavor of a virtual machine
? Trove Resize-volume: Adjust the size of the disks such as MySQL or MongoDB
? Trove Restart: Restart a trove instance
? Trove Show: Displays detail information for a trove instance
? Trove Update: Updating information for a trove instance
? Trove list: Displays all trove under the current project instances
? Trove root-disable: Disable MySQL and other root access
? Trove root-enable: Run MySQL and get root privileges
- Datastore operation
Datastore maintains the database system version and corresponding image information that the current trove can support.
? Trove Datastore-list: Shows which datastore are trove
? Datastore-show: Displays detail information for a datastore
? Trove Datastore-version-list: Displays a datastore version list
? Trove Datastore-version-show: Displays detail information for a version of a datastore
- Backup operation
Trove provides backup of databases in MySQL or MongoDB to Swift, supporting full-scale and incremental backups.
? Trove Backup-create: Create a backup of a database
? Trove Backup-delete: Delete backup with the specified ID
? Trove Backup-list: Lists all the backups that are available
? Trove Backup-list-instance: Lists all available backups for the specified instance corresponding database
? Trove Backup-show: Detail information for backup that displays the specified ID
? Trove backup-copy: Generate a new backup from a backup copy
- Cluster operation
There are cluster concepts for some database systems, such as MongoDB.
? Trove Cluster-create: Create a new cluster
? Trove Cluster-delete: Delete a cluster
? Trove Cluster-instances: List all instances of a cluster
? Trove Cluster-list: List all the clusters
? Trove Cluster-show: Detail information for cluster that displays the specified ID
? Trove Cluster-grow: Add more instance to cluster
? Trove Cluster-shrink: remove instance from cluster
? Trove Cluster-seset_status: Set cluster task status to None
? Trove Cluster-upgrade: Upgrade cluster to a new datastore
- Configuration group Operations
Trove put forward the concept of configuration group, this is in order to be user can customize different instance database system configuration parameters, for different database system types, support configuration parameters are not the same, such as MySQL supported configuration parameters defined in: trove/templates/ Mysql/validation-rules.json. In addition, trove restricts only one configuration group per instance.
? Trove Configuration-create: Create a new configuration group
? Trove Configuration-delete: Deleting a configuration group
? Trove Configuration-attach:attach a configuration group to a trove instance
? Trove Configuration-detach:detach a configuration group on a trove instance
? Trove Configuration-default: Displays the default configuration group for a trove instance
? Trove Configuration-instances: Displays all trove that are bound to a configuration group instances
? Trove Configuration-list: Show All configuration group
? Trove Configuration-show: Displays detail information for a configuration group
? Trove Configuration-parameter-list: List configuration parameters for Datastore support for the specified version
? Trove Configuration-parameter-show: Displays details of one of the configuration's configurations that are supported by the datastore of the specified version
? Trove Configuration-patch: Putting new <values> patches into a configuration group
? Trove Configuration-update: Update information for a configuration group
- Replica operation
To support the high availability of the database, trove can dynamically add or remove a instance copy.
? Trove Create [--replica_of <source_instance>] [--replica_count <count>]: Add a new copy for a instance
? Trove Detach-replica: Removing a copy of a instance
- User Action
Trove supports the creation of the user of the database system and supports the ability to grant/reclaim user access to the database system.
? Trove User-create: Create a user of a database system
? Trove User-delete: Delete user of a database system
? Trove user-grant-access: Grant user access to database (can specify multiple at the same time)
? Trove user-revoke-access: Recover user access to database
? Trove User-list:list All users of a database system
? Trove User-show: Displays detail information for the specified user in a database system
? Trove user-show-access: Displays the permission information for the specified user Access database in a DB system
- Database operation
Trove supports the creation of multiple databases on a database system;
? Trove Database-create: Creating a database on a DB system
? Trove Database-delete: Deleting a database on a DB system
? Trove Database-list: Enumerate all databases on a database system
In addition to these operations, trove also for security group, metadata, log, etc., these operations make the TROVE function is very powerful, to meet the needs of users.
Rocky version Problems and solutions
Currently, trove injects guestagent configuration files into a virtual machine, such as through the personality parameter in the Nova API, but this parameter has been enabled from the OpenStack Queens version and will be removed from the Nova code in the future. In the future, trove will use the--user-data parameter in the Nova API for file injection, as follows:
1. Reconstruct the Get_injected_file function in trove.instance.models.BaseIntance to get the content, path, owner and permission of the injected file, generate Injectedfile object, Please return all files that need to be injected into the Injectedfile list.
2, adjust the _prepare_userdata function in Trove.taskmanger.models.FreshIntanceTask, build Cloud-config script based on Injectfile object. If a datastore_manager cloudinit script exists in trove, the Cloudinit script will be instrumented and then converted into a MIME cloud-config part file type script. To prevent the data type that is passed to Cloud-init is greater than one.
3, the use of-user-data transfer parameters to the Nova API, when the virtual machine starts, cloud-init by executing a script to complete the file injection.
Future communication between trove server and Trove guest agent will be based on the Octaviad network architecture pattern.
Reference Links:
Https://github.com/openstack/trove
Https://wiki.openstack.org/wiki/Trove
https://docs.openstack.org/developer/trove/
Https://docs.openstack.org/releasenotes/trove/rocky.html
A big event.
On the occasion of the release of the rocky release, the Kyushu Cloud will release the world's first rocky version of the seventh generation of the new open source cloud management platform--animbus on October 10 10:00. 7.0 Series products.
October 10 10 o'clock, invites the industry colleagues to explore together.
Rocky version of the new feature highlights: Trove