tripleo-image-elements/elements/mysql-common
Julia Kreger 53e23a96b0 Add local_bind flag to my.cf
This change enables the MySQL configuration file's network socket
bind to be changed from 0.0.0.0, to the local-ipv4 address via
the heat template.

    mysql:
      local_bind: true

The absence of the option will result in the bind returning to
the default of 0.0.0.0. This change was implemented this way
so the changes to the heat template could land later.

Change-Id: Iac1274cc52014f25887d696261b32146afc926dd
2014-07-14 14:05:51 -04:00
..
install.d Switch from upstart to os-refresh-config for MySQL server-id's 2014-06-23 21:19:45 +01:00
os-apply-config/mnt/state Add local_bind flag to my.cf 2014-07-14 14:05:51 -04:00
os-refresh-config Merge "Switch from upstart to os-refresh-config for MySQL server-id's" 2014-06-24 17:12:50 +00:00
element-deps Sync mariadb cluster init with mysql element 2014-07-01 10:25:40 +02:00
README.md Adds mysql-common element 2014-03-26 21:22:30 +01:00

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.