Adds mysql-common element

This element contains code shared by mysql and mariadb elements.

Change-Id: I5edc6c2cebfa36d16cf3dcd110c2fe1488c9c3ab
This commit is contained in:
Jan Provaznik
2014-03-26 04:02:59 -04:00
parent 5e52c4bcdf
commit 06668bb32c
13 changed files with 41 additions and 34 deletions

View File

@@ -0,0 +1,32 @@
This element contains code common for mysql and mariadb elements, make sure
you include once of them when including this element.
TODO: auto-tune settings based on host resources or metadata service.
Configuration
-------------
Users will be created if Heat Metadata is passed in under the
'mysql.create-users' section. For example:
mysql:
create-users:
- username: dbuser1
database: somedb
userhandle:
Ref: SomeWaitConditionHandle
This will cause mysql to create the user 'dbuser1' if it does not exist,
and grant it all privileges on somedb. It will have a random password
generated and passed to the WaitConditionHandle with the key of the
username, and password as the data. A password can also be given for
the user like this:
mysql:
create-users:
- username: dbuser2
database: somedb
password: abcdefg12345
If a userhandle is also given with the password, it will be passed to
the wait condition handle in the same manner.

View File

@@ -0,0 +1,4 @@
iptables
os-apply-config
os-refresh-config
use-ephemeral

View File

@@ -1,31 +1,5 @@
Set up a MySQL server install in the image.
Installs Percona Xtradb Cluster which is Mysql+HA solution
TODO: auto-tune settings based on host resources or metadata service.
Configuration
-------------
Users will be created if Heat Metadata is passed in under the
'mysql.create-users' section. For example:
mysql:
create-users:
- username: dbuser1
database: somedb
userhandle:
Ref: SomeWaitConditionHandle
This will cause mysql to create the user 'dbuser1' if it does not exist,
and grant it all privileges on somedb. It will have a random password
generated and passed to the WaitConditionHandle with the key of the
username, and password as the data. A password can also be given for
the user like this:
mysql:
create-users:
- username: dbuser2
database: somedb
password: abcdefg12345
If a userhandle is also given with the password, it will be passed to
the wait condition handle in the same manner.
Mysql and mariadb elements are very similar so both depend on mysql-common
element which contains shared logic. See mysql-common for more details about
mysql setup.

View File

@@ -1,4 +1 @@
iptables
os-apply-config
os-refresh-config
use-ephemeral
mysql-common