OXS007
2012-Aug-29 06:14 UTC
[Puppet Users] minor change in inkling/postgresql – PostgreSQL
Hi, When running the Postgresql module the database installed by default is 8.4 what we need is 9.1 where do i define the version to be installed by puppet. If i edit the params,pp like; $client_package_name = ''postgresql91'' $server_package_name = ''postgresql91'' The 9.1 is being installed but i get some errors like these; Execution of ''/sbin/service postgresql start'' returned 1 Thanks in forward for you help. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/2456wjmHE2oJ. 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.
OXS007
2012-Aug-29 06:52 UTC
[Puppet Users] Re: minor change in inkling/postgresql – PostgreSQL
On more thing the postgresql-9.1 is installed but when you run service postgresql-9.1 start you get /var/lib/pgsql/9.1/data is missing, Use "service postgresql-9.1.4 initdb" to initialize the cluster first. Any idea ? Op woensdag 29 augustus 2012 02:14:54 UTC-4 schreef OXS007 het volgende:> > Hi, > > When running the Postgresql module the database installed by default is > 8.4 what we need is 9.1 where do i define the version to be installed by > puppet. > > If i edit the params,pp like; > > $client_package_name = ''postgresql91'' > $server_package_name = ''postgresql91'' > > The 9.1 is being installed but i get some errors like these; > > Execution of ''/sbin/service postgresql start'' returned 1 > > Thanks in forward for you help. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/nUDK3yg3Mb0J. 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.
OXS007
2012-Aug-29 07:15 UTC
[Puppet Users] Re: minor change in inkling/postgresql – PostgreSQL
I think i figured it out in the Postgresql module edit the params.pp so that it looks like this; case $::osfamily { ''RedHat'': { $service_name = ''postgresql-9.1'' $client_package_name = ''postgresql91'' $server_package_name = ''postgresql91-server'' $needs_initdb = true $initdb_path = ''/usr/pgsql-9.1/bin/initdb'' $createdb_path = ''/usr/pgsql-9.1/bin/createdb'' $psql_path = ''/usr/pgsql-9.1/bin/psql'' $datadir = ''/var/lib/pgsql/9.1/data/'' $pg_hba_conf_path = ''/var/lib/pgsql/9.1/data/pg_hba.conf'' $postgresql_conf_path = ''/var/lib/pgsql/9.1/data/postgresql.conf'' $firewall_supported = true $persist_firewall_command = ''/sbin/iptables-save > /etc/sysconfig/iptables'' } Op woensdag 29 augustus 2012 02:14:54 UTC-4 schreef OXS007 het volgende:> > Hi, > > When running the Postgresql module the database installed by default is > 8.4 what we need is 9.1 where do i define the version to be installed by > puppet. > > If i edit the params,pp like; > > $client_package_name = ''postgresql91'' > $server_package_name = ''postgresql91'' > > The 9.1 is being installed but i get some errors like these; > > Execution of ''/sbin/service postgresql start'' returned 1 > > Thanks in forward for you help. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/0oZAJXRvTRgJ. 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.
Chris Price
2012-Aug-29 16:43 UTC
[Puppet Users] Re: minor change in inkling/postgresql – PostgreSQL
Hello OSX007, You are on the right track, for sure. The goal of the params.pp is to set default values for those things and allow you to override them in your own manifests. It''s definitely OK for you to edit params.pp directly if you know for sure that the settings you''ve specified will always be the ones that you want, but otherwise you should be able to override them in your own manifests and pass them in without modifying the module''s params.pp directly. This would allow you to potentially use the module to manage both 8.x and 9.x instances. I''d love to put together a "test" manifest that illustrates how to do what you''re doing w/o modifying params.pp directly, and submit a pull request to the module so that it will be easier for other folks to figure out how to do it in the future. I''d also love to provide a single parameter like "postgres_version" that you could just set to "9.1" and then add code to the module that would switch all of those path variables to the correct values for you. I hope to continue submitting pull requests with features like that over time, but if you have any such submissions you''d like to make yourself, I''m sure they''d be welcomed! On Wednesday, August 29, 2012 12:15:13 AM UTC-7, OXS007 wrote:> > I think i figured it out in the Postgresql module edit the params.pp so > that it looks like this; > > case $::osfamily { > > ''RedHat'': { > > $service_name = ''postgresql-9.1'' > > $client_package_name = ''postgresql91'' > > $server_package_name = ''postgresql91-server'' > > $needs_initdb = true > > $initdb_path = ''/usr/pgsql-9.1/bin/initdb'' > > $createdb_path = ''/usr/pgsql-9.1/bin/createdb'' > > $psql_path = ''/usr/pgsql-9.1/bin/psql'' > > $datadir = ''/var/lib/pgsql/9.1/data/'' > > $pg_hba_conf_path = ''/var/lib/pgsql/9.1/data/pg_hba.conf'' > > $postgresql_conf_path = ''/var/lib/pgsql/9.1/data/postgresql.conf'' > > $firewall_supported = true > > $persist_firewall_command = ''/sbin/iptables-save > > /etc/sysconfig/iptables'' > } > > > > > Op woensdag 29 augustus 2012 02:14:54 UTC-4 schreef OXS007 het volgende: >> >> Hi, >> >> When running the Postgresql module the database installed by default is >> 8.4 what we need is 9.1 where do i define the version to be installed by >> puppet. >> >> If i edit the params,pp like; >> >> $client_package_name = ''postgresql91'' >> $server_package_name = ''postgresql91'' >> >> The 9.1 is being installed but i get some errors like these; >> >> Execution of ''/sbin/service postgresql start'' returned 1 >> >> Thanks in forward for you help. >> >>-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ewViWOoG3kIJ. 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.
Jeremy Kitchen
2012-Sep-06 04:31 UTC
Re: [Puppet Users] Re: minor change in inkling/postgresql – PostgreSQL
On Wed, Aug 29, 2012 at 09:43:49AM -0700, Chris Price wrote:> I''d love to put together a "test" manifest that illustrates how to do what > you''re doing w/o modifying params.pp directly,I''d love to see this, myself, for educational purposes. I''m still pretty new to puppet and the variable scoping scares me a bit, so I''d like to see some good examples of how people are doing overridable defaults like this! -Jeremy
Chris Price
2012-Sep-06 17:21 UTC
Re: [Puppet Users] Re: minor change in inkling/postgresql – PostgreSQL
Thanks or the feedback, Jeremy. Knowing that there are folks out there who would find it useful helps me to prioritize :) I still have this on my to-do list, and hope to get a chance to work on it sometime in the next week or so. I''ll send another response to this thread as soon as I do. On Wednesday, September 5, 2012 9:31:42 PM UTC-7, Jeremy Kitchen wrote:> > On Wed, Aug 29, 2012 at 09:43:49AM -0700, Chris Price wrote: > > I''d love to put together a "test" manifest that illustrates how to do > what > > you''re doing w/o modifying params.pp directly, > > I''d love to see this, myself, for educational purposes. I''m still pretty > new to puppet and the variable scoping scares me a bit, so I''d like to > see some good examples of how people are doing overridable defaults like > this! > > -Jeremy >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/6OCT9012ReoJ. 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.