Hi guys I have 2 types of clients(developers, users) connecting to my puppet server, puppet installs mysql on both the machines but I want that when its user machine connecting to server the mysql root user is disabled and a user account should be made with a custom password and for developers machine puppet makes a root user with an option to select a password(right now puppet just installs mysql with root user and without asking for any root password), developers should also be able to make a non root account through puppet on mysql. Is this possible with puppet, please help. Thanks -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Gabriel Filion
2011-Jul-10 05:54 UTC
Re: [Puppet Users] use puppet to manage user accounts on mysql
On 11-07-10 12:48 AM, newguy wrote:> I have 2 types of clients(developers, users) connecting to my puppet > server, puppet installs mysql on both the machines but I want that > when its user machine connecting to server the mysql root user is > disabled and a user account should be made with a custom password and > for developers machine puppet makes a root user with an option to > select a password(right now puppet just installs mysql with root user > and without asking for any root password), developers should also be > able to make a non root account through puppet on mysql. > > Is this possible with puppet, please help.I''m not entirely sure what the long sentence is asking about, but yes I guess it should be possible. the following module includes custom resource types that could help you out (Mysql_database, Mysql_user, Mysql_grant): https://labs.riseup.net/code/projects/shared-mysql check out ''lib/puppet/type'' -- Gabriel Filion -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
newguy
2011-Jul-10 10:27 UTC
[Puppet Users] Re: use puppet to manage user accounts on mysql
Hey I will try to write again what I wanted to say in the first message: Is it possible through puppet that I install mysql and define what would be mysql username, password for that client and also I want to disable root user through puppet, can this be achieved. Thanks On Jul 9, 10:54 pm, Gabriel Filion <lelu...@gmail.com> wrote:> On 11-07-10 12:48 AM, newguy wrote: > > > I have 2 types of clients(developers, users) connecting to my puppet > > server, puppet installs mysql on both the machines but I want that > > when its user machine connecting to server the mysql root user is > > disabled and a user account should be made with a custom password and > > for developers machine puppet makes a root user with an option to > > select a password(right now puppet just installs mysql with root user > > and without asking for any root password), developers should also be > > able to make a non root account through puppet on mysql. > > > Is this possible with puppet, please help. > > I''m not entirely sure what the long sentence is asking about, but yes I > guess it should be possible. > > the following module includes custom resource types that could help you > out (Mysql_database, Mysql_user, Mysql_grant): > > https://labs.riseup.net/code/projects/shared-mysql > > check out ''lib/puppet/type'' > > -- > Gabriel Filion-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Andrew Thompson
2011-Jul-10 10:49 UTC
Re: [Puppet Users] Re: use puppet to manage user accounts on mysql
Take a look at example42''s mysql module. I use it to change the root password and create users for each of my applications. Look at this specifically: https://github.com/example42/puppet-modules/blob/master/mysql/manifests/grant.pp There is also a "query" define so you can run any query that is possible from the mysql client. -Andrew On Jul 10, 2011 6:27 AM, "newguy" <aimanparvaiz@gmail.com> wrote:> Hey > I will try to write again what I wanted to say in the first message: > Is it possible through puppet that I install mysql and define what > would be mysql username, password for that client and also I want to > disable root user through puppet, can this be achieved. > > Thanks > > > On Jul 9, 10:54 pm, Gabriel Filion <lelu...@gmail.com> wrote: >> On 11-07-10 12:48 AM, newguy wrote: >> >> > I have 2 types of clients(developers, users) connecting to my puppet >> > server, puppet installs mysql on both the machines but I want that >> > when its user machine connecting to server the mysql root user is >> > disabled and a user account should be made with a custom password and >> > for developers machine puppet makes a root user with an option to >> > select a password(right now puppet just installs mysql with root user >> > and without asking for any root password), developers should also be >> > able to make a non root account through puppet on mysql. >> >> > Is this possible with puppet, please help. >> >> I''m not entirely sure what the long sentence is asking about, but yes I >> guess it should be possible. >> >> the following module includes custom resource types that could help you >> out (Mysql_database, Mysql_user, Mysql_grant): >> >> https://labs.riseup.net/code/projects/shared-mysql >> >> check out ''lib/puppet/type'' >> >> -- >> Gabriel Filion > > -- > You received this message because you are subscribed to the Google Groups"Puppet Users" group.> To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email topuppet-users+unsubscribe@googlegroups.com.> For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en.>-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nigel Kersten
2011-Jul-10 16:43 UTC
Re: [Puppet Users] Re: use puppet to manage user accounts on mysql
On Sun, Jul 10, 2011 at 3:27 AM, newguy <aimanparvaiz@gmail.com> wrote:> Hey > I will try to write again what I wanted to say in the first message: > Is it possible through puppet that I install mysql and define what > would be mysql username, password for that client and also I want to > disable root user through puppet, can this be achieved. >Yes. The riseup mysql puppet module that Gabriel pointed at will let you do this. Once you''ve installed the module in your modulepath, you should be able to do: mysql_user { "username@host": ensure => present, password_hash => "your_password_hash", } and mysql_user { "root@host": ensure => absent, }> > Thanks > > > On Jul 9, 10:54 pm, Gabriel Filion <lelu...@gmail.com> wrote: > > On 11-07-10 12:48 AM, newguy wrote: > > > > > I have 2 types of clients(developers, users) connecting to my puppet > > > server, puppet installs mysql on both the machines but I want that > > > when its user machine connecting to server the mysql root user is > > > disabled and a user account should be made with a custom password and > > > for developers machine puppet makes a root user with an option to > > > select a password(right now puppet just installs mysql with root user > > > and without asking for any root password), developers should also be > > > able to make a non root account through puppet on mysql. > > > > > Is this possible with puppet, please help. > > > > I''m not entirely sure what the long sentence is asking about, but yes I > > guess it should be possible. > > > > the following module includes custom resource types that could help you > > out (Mysql_database, Mysql_user, Mysql_grant): > > > > https://labs.riseup.net/code/projects/shared-mysql > > > > check out ''lib/puppet/type'' > > > > -- > > Gabriel Filion > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- Nigel Kersten Product Manager, Puppet Labs Twitter: @nigelkersten *Join us for **PuppetConf *<http://www.bit.ly/puppetconfsig> September 22nd and 23rd in Portland, Oregon, USA. * * -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nigel Kersten
2011-Jul-10 17:13 UTC
Re: [Puppet Users] Re: use puppet to manage user accounts on mysql
This looks like a good opportunity for the various mysql module authors to all get together and produce one single awesome module :) On Sun, Jul 10, 2011 at 3:49 AM, Andrew Thompson <netengr2009@gmail.com>wrote:> Take a look at example42''s mysql module. I use it to change the root > password and create users for each of my applications. Look at this > specifically: > > https://github.com/example42/puppet-modules/blob/master/mysql/manifests/grant.pp > > There is also a "query" define so you can run any query that is possible > from the mysql client. > > -Andrew > On Jul 10, 2011 6:27 AM, "newguy" <aimanparvaiz@gmail.com> wrote: > > Hey > > I will try to write again what I wanted to say in the first message: > > Is it possible through puppet that I install mysql and define what > > would be mysql username, password for that client and also I want to > > disable root user through puppet, can this be achieved. > > > > Thanks > > > > > > On Jul 9, 10:54 pm, Gabriel Filion <lelu...@gmail.com> wrote: > >> On 11-07-10 12:48 AM, newguy wrote: > >> > >> > I have 2 types of clients(developers, users) connecting to my puppet > >> > server, puppet installs mysql on both the machines but I want that > >> > when its user machine connecting to server the mysql root user is > >> > disabled and a user account should be made with a custom password and > >> > for developers machine puppet makes a root user with an option to > >> > select a password(right now puppet just installs mysql with root user > >> > and without asking for any root password), developers should also be > >> > able to make a non root account through puppet on mysql. > >> > >> > Is this possible with puppet, please help. > >> > >> I''m not entirely sure what the long sentence is asking about, but yes I > >> guess it should be possible. > >> > >> the following module includes custom resource types that could help you > >> out (Mysql_database, Mysql_user, Mysql_grant): > >> > >> https://labs.riseup.net/code/projects/shared-mysql > >> > >> check out ''lib/puppet/type'' > >> > >> -- > >> Gabriel Filion > > > > -- > > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- Nigel Kersten Product Manager, Puppet Labs Twitter: @nigelkersten *Join us for **PuppetConf *<http://www.bit.ly/puppetconfsig> September 22nd and 23rd in Portland, Oregon, USA. * * -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
++1 On Jul 10, 7:13 pm, Nigel Kersten <ni...@puppetlabs.com> wrote:> This looks like a good opportunity for the various mysql module authors to > all get together and produce one single awesome module :) > > On Sun, Jul 10, 2011 at 3:49 AM, Andrew Thompson <netengr2...@gmail.com>wrote: > > > > > > > Take a look at example42''s mysql module. I use it to change the root > > password and create users for each of my applications. Look at this > > specifically: > > >https://github.com/example42/puppet-modules/blob/master/mysql/manifes... > > > There is also a "query" define so you can run any query that is possible > > from the mysql client. > > > -Andrew > > On Jul 10, 2011 6:27 AM, "newguy" <aimanparv...@gmail.com> wrote: > > > Hey > > > I will try to write again what I wanted to say in the first message: > > > Is it possible through puppet that I install mysql and define what > > > would be mysql username, password for that client and also I want to > > > disable root user through puppet, can this be achieved. > > > > Thanks > > > > On Jul 9, 10:54 pm, Gabriel Filion <lelu...@gmail.com> wrote: > > >> On 11-07-10 12:48 AM, newguy wrote: > > > >> > I have 2 types of clients(developers, users) connecting to my puppet > > >> > server, puppet installs mysql on both the machines but I want that > > >> > when its user machine connecting to server the mysql root user is > > >> > disabled and a user account should be made with a custom password and > > >> > for developers machine puppet makes a root user with an option to > > >> > select a password(right now puppet just installs mysql with root user > > >> > and without asking for any root password), developers should also be > > >> > able to make a non root account through puppet on mysql. > > > >> > Is this possible with puppet, please help. > > > >> I''m not entirely sure what the long sentence is asking about, but yes I > > >> guess it should be possible. > > > >> the following module includes custom resource types that could help you > > >> out (Mysql_database, Mysql_user, Mysql_grant): > > > >>https://labs.riseup.net/code/projects/shared-mysql > > > >> check out ''lib/puppet/type'' > > > >> -- > > >> Gabriel Filion > > > > -- > > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > > To post to this group, send email to puppet-users@googlegroups.com. > > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@googlegroups.com. > > > For more options, visit this group at > >http://groups.google.com/group/puppet-users?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > To post to this group, send email to puppet-users@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/puppet-users?hl=en. > > -- > Nigel Kersten > Product Manager, Puppet Labs > Twitter: @nigelkersten > > *Join us for **PuppetConf *<http://www.bit.ly/puppetconfsig> > September 22nd and 23rd in Portland, Oregon, USA. > * > *-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
newguy
2011-Jul-11 20:43 UTC
[Puppet Users] Re: use puppet to manage user accounts on mysql
Hey Guys Thanks for this help but I am stuck at a point which might sound lame but is creating problem, I got the above stated mysql puppet riseup module in my module path but I fail to understand where should I write this: mysql_user { "username@host": ensure => present, password_hash => "your_password_hash", } This is my nodes.pp node ''puppetclient.local.loc''{ include vim, haproxy, lighttpd, mysql } I made a directory in modules named mysql and put the rise up module in there and I included this module in the nodes.pp Please help On Jul 11, 6:18 am, ew <erhard.w...@gmail.com> wrote:> ++1 > > On Jul 10, 7:13 pm, Nigel Kersten <ni...@puppetlabs.com> wrote: > > > > > > > > > This looks like a good opportunity for the various mysql module authors to > > all get together and produce one single awesome module :) > > > On Sun, Jul 10, 2011 at 3:49 AM, Andrew Thompson <netengr2...@gmail.com>wrote: > > > > Take a look at example42''s mysql module. I use it to change the root > > > password and create users for each of my applications. Look at this > > > specifically: > > > >https://github.com/example42/puppet-modules/blob/master/mysql/manifes... > > > > There is also a "query" define so you can run any query that is possible > > > from the mysql client. > > > > -Andrew > > > On Jul 10, 2011 6:27 AM, "newguy" <aimanparv...@gmail.com> wrote: > > > > Hey > > > > I will try to write again what I wanted to say in the first message: > > > > Is it possible through puppet that I install mysql and define what > > > > would be mysql username, password for that client and also I want to > > > > disable root user through puppet, can this be achieved. > > > > > Thanks > > > > > On Jul 9, 10:54 pm, Gabriel Filion <lelu...@gmail.com> wrote: > > > >> On 11-07-10 12:48 AM, newguy wrote: > > > > >> > I have 2 types of clients(developers, users) connecting to my puppet > > > >> > server, puppet installs mysql on both the machines but I want that > > > >> > when its user machine connecting to server the mysql root user is > > > >> > disabled and a user account should be made with a custom password and > > > >> > for developers machine puppet makes a root user with an option to > > > >> > select a password(right now puppet just installs mysql with root user > > > >> > and without asking for any root password), developers should also be > > > >> > able to make a non root account through puppet on mysql. > > > > >> > Is this possible with puppet, please help. > > > > >> I''m not entirely sure what the long sentence is asking about, but yes I > > > >> guess it should be possible. > > > > >> the following module includes custom resource types that could help you > > > >> out (Mysql_database, Mysql_user, Mysql_grant): > > > > >>https://labs.riseup.net/code/projects/shared-mysql > > > > >> check out ''lib/puppet/type'' > > > > >> -- > > > >> Gabriel Filion > > > > > -- > > > > You received this message because you are subscribed to the Google Groups > > > "Puppet Users" group. > > > > To post to this group, send email to puppet-users@googlegroups.com. > > > > To unsubscribe from this group, send email to > > > puppet-users+unsubscribe@googlegroups.com. > > > > For more options, visit this group at > > >http://groups.google.com/group/puppet-users?hl=en. > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Puppet Users" group. > > > To post to this group, send email to puppet-users@googlegroups.com. > > > To unsubscribe from this group, send email to > > > puppet-users+unsubscribe@googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/puppet-users?hl=en. > > > -- > > Nigel Kersten > > Product Manager, Puppet Labs > > Twitter: @nigelkersten > > > *Join us for **PuppetConf *<http://www.bit.ly/puppetconfsig> > > September 22nd and 23rd in Portland, Oregon, USA. > > * > > *-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Gabriel Filion
2011-Jul-12 01:26 UTC
Re: [Puppet Users] Re: use puppet to manage user accounts on mysql
On 11-07-11 04:43 PM, newguy wrote:> I made a directory in modules named mysql and put the rise up module > in there and I included this module in the nodes.ppthat sounds about right. You should be able to create mysql users by adding the first part into the desired nodes (think of it as a resource that each interesting node should have): node ''puppetclient'' { include mysql mysql_user { "user@host": ensure => present, password_hash => mysql_password("your_password"), require => Package[mysql], } mysql_grant { "user@host/database": privileges => "all", require => Mysql_user["user@host"], } } of course, change the values so that the username, password, hostname and database correspond to real values. you could also ensure the presence of the database by adding something like the following inside your node: mysql_database { "database": ensure => present, } (and in this case, you could add the database in the list of requirements for the grants)> On Jul 11, 6:18 am, ew <erhard.w...@gmail.com> wrote: >> ++1 >> >> On Jul 10, 7:13 pm, Nigel Kersten <ni...@puppetlabs.com> wrote: >>> This looks like a good opportunity for the various mysql module authors to >>> all get together and produce one single awesome module :)I suggested collaboration to the others in the group working on the shared modules hosted at riseup''s. I think it should indeed be a great opportunity :) -- Gabriel Filion -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.