Jump to: navigation, search

Trove/Configurations

< Trove
Revision as of 21:35, 26 February 2013 by Jrodom (talk | contribs)

Overview

The MySQL configuration management capability will allow users of Red Dwarf to override the default MySQL configuration settings provided by the operator of the Red Dwarf service. This is implemented by leveraging MySQL’s includedir directive, which is already pre-defined to point to /etc/mysql/conf.d. The configuration files stored (or symlinked) into this directory will be interpreted by MySQL at startup and values with supersede the any value defined in the my.cnf file or MySQL’s default directives.

To implement this management capability, a database instance may be optionally associated to a configuration when the instance is created or through associating a configuration to the instance after it has been created.

A configuration is a collection of key / value pairs where the valid key/values are defined in the MySQL manual at http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html. Some directives are capable of being applied dynamically, while other directives require a server restart to take effect.

When a configuration is modified either by way of adding a new key/value pair or modifying an existing key/value pair, the service will update the overrides.cnf file for every instance that is associated to the configuration and attempt to dynamically update running MySQL instances if the value is allowed to be modified dynamically.

The MySQL configuration management feature will integrate with the quotas capability defined in the following blueprint that has been approved https://blueprints.launchpad.net/reddwarf/+spec/quotas. There should be two quotas established (1) maximum number of configuration groups per tenant and (2) maximum number of values per configuration group.

The system allows for the operator to configure the validation rules for key/value pairs that can be assigned to a configuration group. These rules can be retrieved by the user from the API through the configuration-parameters resource as described in the API documentation below. These validation rules are defined in the configuration-validation.conf file.

API Resources

Two new resources, configurations and configuration-parameters will be exposed as part of the Red Dwarf API.

The configurations resource will allow users to create a new configuration group, which contains a user-defined name, description, and set of key value pairs that will be written to the overrides.cnf file for MySQL.

The configurations resource provides the following data:

  • id – A system-defined UUID assigned to the configuration group when it is created for the first time.
  • name – A user-defined name for the configuration group.
  • description – A user-defined description for the configuration group.
  • values – A list of key/value pairs assigned to the configuration group.
  • instances - A list of instances (if applicable) associated to the configuration group.

The configuration-parameters resource is used to provide the user with metadata that includes the following information:

  • name – Name of the key.
  • description – A description of the option/setting
  • default - The default value of the key as supplied by MySQL. The service provider may choose to override certain MySQL defaults based on the size of the instance or the configuration of the infrastructure. The default will represent the MySQL default.
  • configurable – a boolean value to indicate whether or not the service provider allows for the value to be tuned. True indicates that a configuration is permitted to override the value.
  • dynamic – a boolean value to indicate whether a value can be applied or updated while MySQL is running.
  • type – Identifies what type of data is expected for the value of the key (Boolean, String, Integer)