-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt for MariaDB #43
Comments
Looks like we don't currently have a formula for MariaDB. If you want to modify this and create one let me know and I can create a MariaDB-formula repo. |
MySQL can still be installed using the community repo. |
For what it's worth, I was able to use this formula to install MariaDB 10.1. I'm on Debian and I haven't made this generic for other distros but here's what I have so far: https://gist.github.com/Cottser/bfcca66820717a466065 Note that the "unless" requisite is only available in 2014.7.0+ (Helium). Also included but (should be) optional is ignoring the my.cnf that the formula tries to write. I opted to use /etc/mysql/conf.d instead. |
How did you install from the mysql community repo? It looks like package names are prefixed with mysql-community. So this formula still wont pick 'em up :( |
@cottser I believe the above comment is aimed at you. |
@meatheadmike who are you asking? I didn't mention the MySQL community repo, the comment above me did though. We may need more info from you to be able to help. |
This comment was aimed at @nmadhok. I'm on cent 7, so the formula currently does not work for me. He seemed to indicate that this could work with the community repo. But because of the naming convention used it does not. Sorry for the confusion guys. |
@meatheadmike you're right that this formula won't pick the package names. We need to set the defaults for RHEL/Cent OS 7 in map.jinja. Could you submit a pull request for that? |
@cottser if you could please excuse my ignorance, I am completely new to SaltStack, but how should one proceed to use your sls files? From what I gather, I could just drop them in my |
@frnco you should use my sls files in conjunction with this formula, this formula already handles making sure the service is enabled. The files I provided are only useful when used in conjunction with this formula. Here's the documentation on setting up formulas: http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html Once you have the formula in place you need to reference a copy of the mariadb.sls file from my gist from your topfile (top.sls) in your salt directory (in your case So as a simple, bare-bones example, here's how the files would be set up: /srv/salt/top.sls:
/srv/salt/mysql/mariadb.sls - the contents of mariadb.sls from my gist. /srv/pillar/top.sls:
/srv/pillar/mysql/init.sls - the contents of pillar.sls from my gist. Hope that helps! |
As of RHEL 7 default database are MariaDB. You can use the follow workaround inside your
|
Can I overwrite configuration parameters also the same way as follows:
Tried but dosn't seem to work. I'm new to salt :) |
Try changing 'server_config' to 'config' and see if that works. On Fri, Apr 29, 2016 at 3:42 AM, litewhatever notifications@github.com
|
@vschum nop, dosn't help. Actually I worked around it by defining if-endif as follows.
|
OK. Does exists some formula specific for mariaDB? Or this one could be used by modifying the pillar? https://github.com/saltstack-formulas/mysql-formula/blob/master/pillar.example
server could become:
etc. Does it make sens or not? |
@Sylvain303, yes it should work this way but you must probably also modify mysql config to changes paths for log_error and pid_file (at least this is the case with CentOS 7). |
@litewhatever, thanks. I play with @cottser gits to have a look. I'm working with debian jessie so mariaDB is already available as a package. So you think we should not open a mariaDB specific formula, right? |
Yes but the parameters should perhaps be overwritable with lookup tables. |
Some information. I used @cottser gits above. under debian jessie.
debconf seems not correctly set for mariaDB from minion command line it can be accomplished by:
The password stay in debconf cache after salt has ran… Can be found with:
It can be handled by adding some properties in the pillar and hacking server.sls password still not purged. can be done by:
|
in progress suggestion here: https://github.com/opensource-expert/mysql-formula/tree/add-mariaDB-support How to install, is documented in README.rst. Feedback are welcome |
@Sylvain303 Do you want me to make a mariaDB formula repo? |
@gravyboat, After working on it, I don't think it needs a separate formula, doesn't it? MariaDB is working like mysql, such that command line tools are It does needs many more test, though. ;) |
I also think there is no need for a seperate git repo for maria db. Arch linux only supports mariadb and the formula does work quite nicely with it |
The branch linked by @Sylvain303 contains some commits that are not strictly related to MariaDB or whose function is not obvious to me. opensource-expert@ca6d624 While some of the code introduced in that branch might be useful, I don't necessarily think that we should make it part of this formula. I also don't like the introduction of the If it is I would rather remove I guess this would merit a bug report to Debian as the debconf interface should be roughly comparable for I'm also against creating a mariadb-formula as the adaptations to this formula should be minimal. |
@BABILEN don't attach too much importance of Coming back to the main topic, this the pillar, I wrote, splitting
Mainly to make it working for me, for now. mysql:
# […]
lookup:
server: mariadb-server
client: mariadb-client
debconf_package: mariadb-server-10.0
debconf: mysql-server
service: mysql
python: python-mysqldb As you noticed debconf entry must be in the form: We have a mix up between Could some value be moved to defaults.yaml? And have an alternative choice, for debian? Fedora:
server: mariadb-server
[…] We have in server.sls: (module.debconf.set code) |
The debconf situation is mirrored by the mysql packages, but they might implement it differently. Either way I'd rather not introduce a debconf_package key as I see that as an implementation detail. I guess the packaging situation should be investigated in detail and if MySQL and MariaDB implement the debconf keys differently it would probably be a better idea to ask users to simply install And, frankly, if there is such a significant incompatibility in the packaging, I'd also like to see this fixed in Debian. |
It would be nice if you could adapt this to work with MariaDB - especially since CentOS/RedHat has dropped MySQL in favor of MariaDB.
The text was updated successfully, but these errors were encountered: