[puppet] How to disable installation of mysql::server and only create databases?
Hey openstack-discuss, is there any intended way of using e.g cinder::db::mysql (which is using puppet-openstacklib) to create databases, but not also run / include mysql::server which apparently happens at https://github.com/openstack/puppet-openstacklib/blob/33fb90326fadd59759d4a6... ? In short I already have a running database server and only want the databases to be created. Thanks, Christian
I'm afraid no. As you mentioned the openstacklib::db::mysql defined type includes the mysql::server, which triggers installation and configuration of mysql. This is basically because the implementation uses some resources like mysql_user imported from puppetlabs-mysql and these resources are designed to work in the node where mysql is deployed by mysql::server. (Especially the ~/.my.cnf file created). Technically speaking you can remove that include as long as you can prepare all of the required resources with these resources but that'd be quite tricky. On Tue, Apr 12, 2022 at 11:42 PM Christian Rohmann < christian.rohmann@inovex.de> wrote:
Hey openstack-discuss,
is there any intended way of using e.g cinder::db::mysql (which is using puppet-openstacklib) to create databases, but not also run / include mysql::server which apparently happens at
https://github.com/openstack/puppet-openstacklib/blob/33fb90326fadd59759d4a6... ?
In short I already have a running database server and only want the databases to be created.
Thanks,
Christian
Hey Takashi, On 13/04/2022 16:01, Takashi Kajinami wrote:
This is basically because the implementation uses some resources like mysql_user imported from puppetlabs-mysql and these resources are designed to work in the node where mysql is deployed by mysql::server. (Especially the ~/.my.cnf file created).
Technically speaking you can remove that include as long as you can prepare all of the required resources with these resources but that'd be quite tricky.
Thanks for the quick and thorough response. I worked around the issue by just using the mysql::db class directly. It's actually clearly documented on how to use it on an existing server and without installing or managing it: * https://forge.puppet.com/modules/puppetlabs/mysql#work-with-an-existing-serv... Regards and thanks again! Christian
participants (2)
-
Christian Rohmann
-
Takashi Kajinami