Re: [Puppet Users] Locally Written Puppet Module Does Not Dislay Version Number With: puppet module list
Try changing the Mdoulfile instread of the metadata file. On 19 Sep 2014 04:35, Allen Santora allen.sant...@gmail.com wrote: Greetings, (puppet-server-3.5.1 on CentOS 6.4) I'm writing my own nodejs manager in Puppet and I want to enforce a version number I have generated the module skeleton with the command: # puppet module generate company-nodejs in /etc/puppet/modules I then created /etc/puppet/modules/company-nodejs/metadata,json with the basic content found at the URL: https://docs.puppetlabs.com/puppet/latest/reference/modules_publishing.html#write-a-metadatajson-file (... with appropriate local edits to metadata.json including... version: 0.0.1, ) I then check the module with the command below but I am not getting a version number # puppet module list | grep node company-nodejs (???) Does anyone know why I am not getting a version number? Thanks in advance. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3655002c-3caf-49f6-8ef2-491cad1f88ce%40googlegroups.com https://groups.google.com/d/msgid/puppet-users/3655002c-3caf-49f6-8ef2-491cad1f88ce%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAE6LtPVYWR3mmk%3D1UTF2i3hmnhUoEPc-%2BEztJPdxY0q2MaxVBQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] PuppetDB 2.1.0 final now available
On Tue, Jul 08, 2014 at 06:38:53PM +0100, Ken Barber wrote: ** Final Release ** PuppetDB 2.1.0 final - July 8th, 2014. PuppetDB 2.1.0 Downloads Available in native package format in the release repositories at: http://yum.puppetlabs.com and http://apt.puppetlabs.com For information on how to enable the Puppet Labs repos, see: http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html#open-source-repositories Blog: http://puppetlabs.com/blog/introducing-puppetdb-2.1.0 Binary tarball: http://downloads.puppetlabs.com/puppetdb/ Source: http://github.com/puppetlabs/puppetdb Please report feedback via the Puppet Labs tickets site, using an affected PuppetDB version of 2.1.0: https://tickets.puppetlabs.com/browse/PDB Documentation: http://docs.puppetlabs.com/puppetdb/2.1/ Puppet module: http://forge.puppetlabs.com/puppetlabs/puppetdb PuppetDB 2.1.0 Release Notes PuppetDB 2.1.0 is a feature release focusing on new query capabilities, streaming JSON support on all endpoints and a new report status field for determining if a Puppet run has failed. Note that this release is backward compatible with 2.0.0, but users must upgrade PuppetDB terminus to 2.1.0 when upgrading the PuppetDB instance to 2.1.0. Things to take note of before upgrading: * There is a known issue in Puppet 3.4.0, 3.4.1 and 3.4.2 with duplicate failed events here: https://tickets.puppetlabs.com/browse/PUP-1524. We recommend upgrading to Puppet 3.4.3 or greater. * If you receive the error “Could not open /etc/puppet/log4j.properties”, this is because we have changed the packaged config.ini to point at a new logging configuration file: logback.xml. However during package installation some package managers will cowardly refuse to just update config.ini, this in particular affects RPM. After upgrading you should ensure any .rpmnew files are reviewed and that changes to our vendored version are now merged with your version of config.ini on disk. See this ticket for more information: https://tickets.puppetlabs.com/browse/PDB-656 Nice to see you switch to logback. I have found it to be much better(more than most people actually expect) :) * Make sure all your PuppetDB instances are shut down and only upgrade one at a time. * As usual, don’t forget to upgrade your puppetdb-terminus package also (on the host where your Puppet Master lives), and restart your master service. New Features: * (PDB-660) Switch all query endpoints to stream JSON results The following endpoints have been switched over to streaming: - event-counts - reports - nodes - environments - events Using 'event-query-limit' is now deprecated, use the normal paging/streaming functionality to achieve the same results. * (PDB-658, PDB-697) Implement new query engine for v4 This rewrite of the v4 API query infrastructure unifies query operators across all endpoints. Each endpoint now supports all operators appropriate for the given field of that type. As an example, any string field can now be searched by regular expression. All dates can be search with inequality operators like or for searching via date ranges. There are also many new queryable fields. Below summarizes the new features of the switch to this query engine events endpoint - Added configuration-version as a queryable field - Added containment-path as a queryable field (queryable in a way similar to tags) nodes endpoint - Added facts-timestamp, catalog-timestamp, report-timestamp as a queryable field reports endpoint - Added puppet-version, report-format, configuration-version, start-time, end-time, receive-time, transaction-uuid as queryable fields null? operator - new operator that checks for the presence or absence of a value Some endpoints previously returned NULL values when using a not query such as [not, [=, line, 10]]. The query engine follows SQL semantics, so if you want NULL values, you should explicty ask for it like: [or, [not, [=, line, 10]] [null?, line true]] * (PDB-162) Add regexp support to resource parameter queries The query engine supported this, but the existing rewrite rule, to go from the shorthand parameter syntax to the nested resource query didn't recognize ~. That is fixed with this commit, so regexps will now work on parameters. * (PDB-601) Do not require query operator on reports endpoint With this pull request, hitting the reports endpoint without a query argument will return the full reports collection. This behavior is consistent with that of the nodes, facts, and resources endpoints. * (PDB-651) Allow the web app URL prefix to be configurable Previously PuppetDB always used the context root /, meaning all queries etc would be something like
Re: [Puppet Users] Extracting gzipped sql archive, importing and finally deleting
On Fri, Jun 06, 2014 at 07:30:56AM -0700, Richie wrote: I'm a little stuck with a puppet manifest due to the declarative nature of things and it's taking some time for the concept to fully sink in so could someone guide me in the right direction here (if this is the correct route of course). At the moment the setup is using vagrant, puppet and modules from puppet forge. The site manifest declares your typical LAMP stack which in it's most basic form works fine using the puppet modules and configuring accordingly. Currently I have a 'files/mysql/backup.sql.gz' structure inside Vagrantfile root dir and unfortunately the gz won't extract to /tmp/ using the /vagrant/files/mysql/back.sql.gz path as it's not recognised even though ssh'ing in reveals it - at a guess shares aren't active whilst provisioning? Following the successful extraction of the sql backup I'd like to import it then remove all traces of it so I guess the big question here would be is a routine task like this of scope for puppet and if not what approach should one taken given you can't declare the same resource twice (e.g. file { '/tmp/backup.sql':... ), one to ensure it exists and the other to ensure it's deleted. Thanks, any help appreciated. Here is something that works for us: define omysql::do($source=undef, $db, $content=undef) { include omysql include mysql::params $script = ${omysql::sql_snippets}/${name}.sql file { $script: mode= '0600', source = $source, content = $content, } exec {mysql-import-${name}: path= ['/bin', '/sbin', '/usr/bin'], command = mysql --defaults-file=/root/.my.cnf -A ${db} ${script} touch ${script}.semaphore, creates = ${script}.semaphore, require = [File[$script],Package[$mysql::params::server_package_name]], timeout = '0', } } Basically this creates a semaphore file to indicate if the file was already imported. This was used on a simple project to do migrations and initial data imports. Note that it requireds the puppetlabs module and adds our sane defaults in omysql. A basic usage would be: omysql::do{'my_cool_migration': source = 'puppet:///modules/myproject/data.sql' } or omysql::do{'my_cool_migration': content = 'alter table ...' } This won't delete the data sql neither the 'alter table'. Not sure how you would do that... Note that for more complex requirements I would write a provider. Tell us if you do so, I would be glad to use it(the define is just a little hacky for this) -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/707c54cc-6c07-424c-a12a-617516d4aee7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140611165539.GA7247%40nikolavp-desktop. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Problem using Vagrant + Puppet
On Tue, May 20, 2014 at 07:06:20AM -0700, Rafaella Keury wrote: Hello, I'm using Vagrant and i'm trying to use Puppet as a tool for provisioning one of my virtual machines. I created a folder named 'manifests' in the same directory of my VagrantFile. Inside the 'manifests' folder I created a file named db.pp with the following content: exec { apt-update: command = /usr/bin/apt-get update } package { mysql-server: ensure = installed, require = Exec[apt-update], } You will need to wrap that in node default { } The file that you give as manifest_file to vagrant should be a manifest with node definitions My VagrantFile looks like this: VAGRANTFILE_API_VERSION = 2 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = hashicorp/precise32 config.vm.define :db do |db_config| db_config.vm.network :private_network, :ip = 192.168.33.10 db_config.vm.provision puppet do |puppet| puppet.manifest_file = db.pp end end But when I type vagrant up db on command line, I receive the following error message: The configured puppet manifest is missing. Please specify a path to an existing manifest Does anyone know what is it? My OS is Windows 7. Thanks a lot! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/40e0040c-7634-4f6c-865c-f31357ff8cb3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140521144229.GB26275%40nikolavp-desktop. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Slides TDD with puppet - puppetcamp paris yesterday
On Tue, Apr 15, 2014 at 06:46:21AM -0700, Alexander Fortin wrote: On Tuesday, April 15, 2014 1:10:05 PM UTC+2, Felix.Frank wrote: On 04/15/2014 09:25 AM, Nikola Petrov wrote: I haven't used catalog-diff but I am suspecting that it might be a substitute for the rspec tests. Tell me No. rspec allows you to implement unit tests to catch certain regression bugs. catalog-diff is rather concerned with integration testing (although you can use rspec for that as well). I think with catalog-diff we're catching regression bugs too, meaning that if the module interface is broken in the proposed commit, it will show up as an error (unless no node is actually including the refactored module). Hmm I am suspecting that sadly we are talking about sort of different things here. In my company we have reusable puppet modules between different teams - those are build by experts and require major testing because we don't want to break things in incremental versions. The thing is that those modules are not applied as is but are mostly reused in different project specific modules(i.e. site modules) I can see catalog-diff valuable for our site modules because it is actually testing the end result - what will be applied to a given host. In most cases the reusable modules are used in different ways with different parameters - let's say a tomcat module that is responsible for deploying war files and what not but cannot be used standalone(you have to wrap it in some way) does it provide the following: * Automatic runs through guard/rake/whatever on every commit to verify that I am not breaking things like permissions on files You could do that, but compiling each of your nodes' catalog on every commit would be excessive. I don't see it as such a big problem. You can always put more resources on your CI server to make that possible which leads me to my next question - have you guys automated this in some way. I would be glad to catch regressions from catalog-diff on all my hosts but automatically - let's say through rspec or some other srcipt. Shameless plug: I have been doing a more mature approval port for java lately https://github.com/nikolavp/approval and although it is not ready, there is a good looking thing for ruby here https://github.com/kytrinyx/approvals. The idea is that you approve the output of master compile the first time the test is run and then(on further runs) if there are differences(detected through catalog-diff) you are prompted(let's say in your editor). This allows you to approve the differences if you know that they won't do any harm but in a more automatic way. I agree it can be overkill for many environments, I guess depends on what you actually want to test, or better, what kind of confidence you want to have that your committed code is not actually breaking anything. To me seems that the catalog-diff approach is catching a broad variety of problems, also some that (I think) can't be easily catch by expressions in rspec. For example, somewhere in a random manifest I'm just changing declaration style for a class, from 'include myclass' to class {'myclass': }, leading to possible declaration dependency order / duplicated declarations problems: Node A (which I am currently working on) is including only one declaration, but node B was evaluating that class declaration two times, hence the duplicate declaration only on node B. Can rspec-puppet catch also this kind of problems? More in general, I'd like to know if rspec-puppet can give me the confidence that, given a node resource, the new version of the catalog will compile for that node. Actually no - that's what we use staging for. You push your modules up there and see if they run properly on real machines. We also use the modules through vagrant on every developer machines - so they are constantly tested. Of course we want to start using beaker for those kind of tests so we don't push crap on the bear metal(although it is not metal most of the time) -- Alex -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/826f278e-1b69-4721-9e35-7028627c44fa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140417070617.GD24790%40nikolavp-desktop. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Slides TDD with puppet - puppetcamp paris yesterday
:D. Too fast for da bears. On Thu, Apr 17, 2014 at 09:46:18AM +0200, Felix Frank wrote: On 04/17/2014 09:06 AM, Nikola Petrov wrote: Of course we want to start using beaker for those kind of tests so we don't push crap on the bear metal(although it is not metal most of the time) ...but usually just bears. ;-D (Yeah I know. Sorry. It is just such a cute typo that I couldn't resist.) -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/534F86CA.2030408%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140417075931.GE24790%40nikolavp-desktop. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Slides TDD with puppet - puppetcamp paris yesterday
On Mon, Apr 14, 2014 at 07:05:49AM -0700, Alexander Fortin wrote: On Sunday, April 13, 2014 11:57:19 AM UTC+2, Johan De Wit wrote: I still am so surprised when asking who is doing some kind of 'testing', almost nobody raises is hand . Most people just don't' see the sense of doing rspec unit tests - why writing the same code twice ? Well, I think there is still a lot of talking to do Hi Johan, sorry for the missed presentation at Puppet User Group Berlin, I'll make it one day or another and I'll share the slides at least ;) I'll be very happy to discuss further the testing topic, because testing is also very important to us. Actually we do lots of testing on our manifests (but not with rspec) and catalogs, and precisely I think that puppet catalog-diff [1] is the key piece in the pipeline for us, because it shows us for real what's actually changing with every commit we push to our manifests, plus the noop runs before merging to prod give us the final safe net to be sure we don't get any unexpected change in production. For the last 8 months or so it's been working surprisingly well for us and I'm really willing to share our experience with the community and also getting and suggestions about how to improve it even further. By the way, I'm another one that's not so convinced about the rspec tests value, to me seems that the unit tests themselves are much less relevant for a declarative-like language like Puppet. I mean, there's no 'design' that has to emerge by the unit tests getting green, in our team we already share a defined design for module structure, and, say, if the coder write the spec for a file to be there, I don't see why I should trust that more than a definition of that same thing in the manifest itself, hence the feeling of code duplication with no real value added. I see the value of using rspec in TDD just because I can then go back and refactor the manifests properly. I haven't used catalog-diff but I am suspecting that it might be a substitute for the rspec tests. Tell me does it provide the following: * Automatic runs through guard/rake/whatever on every commit to verify that I am not breaking things like permissions on files * Does it work on the catalog semantic level or syntactic level - what I mean by that is that if I have defined 4 files in a class each with the same user/group/mode and I move those into default parameters for the File resource in the scope - will it detect that I am not changing anything? * Will I be able to test that things haven't changed once I move to another puppet version - let's say the default mode for directories change in the next major puppet version? What I can see very clearly for normal software development, those values coming from TDD, I can't see easily for Puppet manifests writing. Something like Beaker [2] is what we'd like to add to our testing pipeline, i.e. running tests for the full stack in a VM, but again, stil more then willing to change my mind about rspec-puppet ;) Beaker with http://serverspec.org/ is quite nice - note that I am still not using it long enough to complain(waiting it to happen :)) [1] https://github.com/ripienaar/puppet-catalog-diff [2] https://github.com/puppetlabs/beaker/wiki/Overview -- http://about.me/alexanderfortin -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140415072556.GB24790%40nikolavp-desktop. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Books and resources for Test Driven Development for Puppet?
Check out rspec-puppet home page then just get https://github.com/garethr/puppet-module-skeleton and you should be ready to go. The thing that was hidden at least for me were the resource testing types from http://serverspec.org/resource_types.html so look there too(some of them are used in the skeleton so your setup should be ready) :) For the skeleton just run bundle install bundle exec guard -c in one terminal(a second monitor helps) and then start coding in another window(in the first monitor). This is basically my setup at the moment for new modules :) -- Nikola On Mon, Mar 24, 2014 at 10:24:35AM -0700, Alex Scoble wrote: Hi All, Was wondering if anyone knew of any good books or resources for learning Test Driven Development of Puppet including puppet-rspec, beaker and Jenkins. Yes, I know that beaker is more for acceptance testing than unit testing, but I still see it as part of the testing tool chain that Puppet pros should ultimately know how to use. I'm looking for resources that really start with the basics for each subject and then help people ramp up to more advanced usage. Yes, I know there's this http://puppetlabs.com/blog/test-driven-development-with-puppet and some other blog posts, but they don't really start basic enough or go deep enough. What I'm looking for are resources that help me build our testing tool chain and also show how to use the tool chain once it's built. Thanks, Alex -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b1fd7384-dbb8-49d4-b85f-a39602f1b06a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140328161121.GA29957%40nikolavp-desktop. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] versioncmp.rb example
Create a custom fact for the java version installed. There are some suggestions here https://groups.google.com/forum/#!topic/puppet-users/W67dvqS-GdU then you do something like the following: $new_version = versioncmp($::java_version, '1.5.0.3') ? { 1 = '1.7.1', default = $::java_version } package { 'jdk': ensure = $new_version } note that this is not tested ;) -- Nikola On Tue, Mar 11, 2014 at 09:01:46PM -0400, samra40...@aim.com wrote: I looked at versioncmp example available out of box. It is like strcmp. I have a need to write a manifest to check for the existence of java version. If it is 1.5.0.3 or less, upgrade to 1.7.1. This should be done on 10 nodes. Appreciate any example to accomplish this task. thanks -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8D10BA5C66CB3D1-318-35AA7%40webmail-m260.sysops.aol.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140321091147.GB3582%40nikolavp-desktop. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Announce: puppetdb-stencil 0.0.1
This looks nice. Although I think that for the usecase you are presenting with nagios resources it will be much easier to use puppetdbquery[1]. The script you wrote might have other usecases. Nice work again :) -- Nikola On Thu, Mar 13, 2014 at 02:56:18PM -0700, Daniele Sluijters wrote: Good news everyone, After about 4hrs of food, beer and code Ewoud Kohl van Wijngaarden (ekohl on Github) and I are intoxicated to release puppetdb-stencil. Puppetdb-stencil is designed to render resource types based on a template. The canonical example of this is the nagios types in Puppet: $ cd examples python ../puppetdb-stencil.py nagios_host nagios_hostgroup define host { host_name node1.example.com hostgroups +mysql use mysql alias MySQL Cluster node node1.example.com address node1.example.com } [..] define hostgroup { hostgroup_name mysql alias MySQL Cluster 1 } [..] On a PuppetDB with 600+ machines and 900+ host groups generating the files for these types takes about 1s in total. Because of the templating this principle can be applied to any resource available through PuppetDB as long as a template is created for that type. Templating is done with the Jinja2 library allowing for inheritance and many other advanced templating features. This work has been inspired by the work done by eBay/Marktplaats and Github. You can find puppetdb-stencil at: https://github.com/daenney/puppetdb-stencil. We expect to shortly add: * packaging and availability through PyPi * additional configuration switches to fully configure connecting to PuppetDB * allow for an arbitrary query to be passed in to the resource request * allow to specify a file to which the output will be written instead of stdout * tests, Travis integration and the works -- Daniele Sluijters -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/bcfd1735-42f5-40ca-8d33-959ebcd8e1cd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140320164700.GA3582%40nikolavp-desktop. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] when a puppet exec resource contains several single commands, puppet exec only fails if the last exec command fails
Actually you can emulate what you want if you join the commands with . Something like the following: $command = /bin/ls /doesnotexit; /bin/echo hello exec { 'cool': command = join(split($command, '; '), ), } Note1: you will need https://github.com/puppetlabs/puppetlabs-stdlib for this. Although I suppose you already have it. Note2: this is not tested but it should work. Of course it written in a generic way so you can wrap it in a define let's say. Note3: the error messages from this can be cryptic... P.S. Hate using execs.. -- Nikola On Mon, Mar 10, 2014 at 12:57:13PM -0700, David Portabella wrote: I don't agree with this statement. in bash, for example, if you type set -e first, bash will stop and fail as soon as a concatenated command fails. (i agree that this behaviour is unfortunatelly not enabled by default in bash scripts) If you need to control each of the return codes just use different exec resources If you, the problem is that there are many puppet modules which use concatenated commands, without realising about this problem. to be safe, I am suggesting that puppet should enable that behavior by default. need to control each of the return codes i don't suggest executing every concatenated command and control each return control. i am suggesting failing as soon as a concatenated command fails. (as in bash set -e) just use different exec resources as a side note, another improvement about puppet exec would be that the exec command can be an array of strings, executed in order as long as none fails. Regards, David On Monday, March 10, 2014 6:46:32 PM UTC+1, Jose Luis Ledesma wrote: When you use concatenated commands any shell will only return the last command return code by design, and this is what puppet receives. So its a ' works at a expected' If you need to control each of the return codes just use different exec resources Regards, El 10/03/2014 16:02, David Portabella david.po...@gmail.comjavascript: escribió: exec {'test': command = /bin/ls /doesnotexit, } fails as expected: Error: /bin/ls /doesnotexit returned 1 instead of one of [0] Error: /Stage[main]//Exec[test]/returns: change from notrun to 0 failed: /bin/ls /doesnotexit returned 1 instead of one of [0] However, exec {'test': command = /bin/ls /doesnotexit; /bin/echo hello, } does not fail, because the last command did not return an error! that's a problem, because there are many puppet modules which concatenate several commands in one puppet exec, and they do not explicitly handle the errors. (inserting set -e at the head of the command line does not work, as it is bash script specific) *I think that, by default, the puppet exec resource should fail if any of the single commands fail (as * *in the second example). and if it is not by default, at least there should be an option in puppet exec to do so (equivalent to set -e in bash)* (tested on puppet 3.3.2) -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/fc8a32ca-1e7b-4376-ace7-a1c36dd665c3%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/fc8a32ca-1e7b-4376-ace7-a1c36dd665c3%40googlegroups.com?utm_medium=emailutm_source=footer . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/73dbd33c-4d80-4631-97b9-b860eddc5f37%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140311095614.GC934%40nikolavp-desktop. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Any Puppet Labs alternatives to test-kitchen
Look at https://github.com/puppetlabs/beaker although I am not using it myself so I cannot tell you if it is stable enough. -- Nikolavp On Sun, Mar 09, 2014 at 10:35:53AM -0700, Louis wrote: Any Puppet Labs alternatives for ... https://github.com/test-kitchen/test-kitchen -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/64db5228-05b6-4438-abe4-632183dafc1d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140310140113.GA934%40nikolavp-desktop. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Versioned Deployment of Modules?
Look at http://docs.puppetlabs.com/guides/environment.html especially this part http://docs.puppetlabs.com/guides/environment.html#configuring-environments-on-the-puppet-master. You can specify different modules directories based on the environment and then put different version of base.pp depending on the environment variable. -- Nikola On Sat, Mar 08, 2014 at 10:35:17PM -0800, Atom Powers wrote: I have, I think, a fairly modern setup of Puppet 3, hiera, ENC for external facts, role/stack meta-module etc. I have a single puppetmaster and I'm not inclined to do any kind of master-less puppet. I am implementing a new monitoring system and it is a pretty big change. I don't want to deploy that to every host in my infrastructure at the same time. I want to be able to deploy a different version of my meta-module to different hosts. What is the best way to deploy different version of a module to different hosts? I expect I could do something with environments but I'm not sure what that looks like? Simple host description ENC data for host.domain.tld: role=webserver environment=production webserver.yaml classes: - base - nginx base.pp v1 include nagios base.pp v2 include pandorafms -- Perfection is just a word I use occasionally with mustard. --Atom Powers-- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAF-H%3DO%3DoF4u%3DaCRMEsw3QuC1PS58j1bv01p1zAA73ZMu2dPMxg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140310140513.GB934%40nikolavp-desktop. For more options, visit https://groups.google.com/d/optout.
Re: [Puppet Users] Condition on class existence on agent
On Thu, Feb 27, 2014 at 03:12:53AM -0800, zerozerouno...@gmail.com wrote: On Thursday, February 27, 2014 8:52:04 AM UTC+1, nikolavp wrote: A specific example I think will be of much help. Some ideas: 1) Is role B just a more specific role A or they aren't so much related. You can use inheritance if they are and change the file/define Yes, B is some sort of more specific A. Not easy to explain because they use custom apps, services, and files (and I don't even fully know how they work), but maybe this example will fit: - role A is web server - role B is secure web server - the same set of resources (packages, users, files, configuration edits...) is applied for both roles, but role A sets some permissions in httpd.conf while role B needs more strict permissions for the same web paths, so they need to use different parameters for the same line in the same file. Maybe inheritance is the way to go? I can put my resource (and related ones) in a separate class with a parameter for the value to be inserted in the conf file, and then create two different classes for roles A and B which inherit the class and override the resource attribute through the parameter. Is that right? With inheritance you get the following: class webA { ... file { '/etc/myapp/config.properties': content = template('my-default-template') } ... } class webB inherits webA { File['/etc/myapp/config.properties'] { # note the capital File and the same resource name as above content = template('my-custom-template'), } } More can be found in http://docs.puppetlabs.com/puppet/latest/reference/lang_classes.html#inheritance look at the Overriding Resource Attributes section. Although I don't like inheritance as you describe it if roleB is a secure web server and roleA is a web server I would go for it. Other ways to do this would be to just propagate the parameter for the change to both role A and role B with default values. What do you mean? Something like class webA ( port = '8080' # this is the default ) { ... } class webB ( port = '8081' # this is the default ) { ... } now at this point if you want to declare them both you just use another definition... class mynewrole { class { 'webA': port = '8081', } class { 'webB': port = '8081', } } sadly this way the augeas or the way you do the change will be fired two times :( I am not sure if understood the idea. I am not saying that you have to create a dependant fact but just to set a fact with the value you want to change. So let's say you want to have a database connection URI. Role A sets it to something by default and Role B sets it to something else. You can specify the wanted connection URI on the host with custom fact. Ok, but how can I create this custom fact on the hosts? I'm provisioning the hosts through Foreman, I need the installation and configuration of the hosts to be automated, based on the classes/roles selected in the Foreman GUI. I do not want to create the custom fact by hand on each host. That's why I was thinking about checking the classes applied to the host, as a way to automatically detect the value to be assigned to the fact. Ok so the fact is not an option ;) N.B. Can you also tell us how do you assign the roles for each host because that might help us be more specific with a solution. I assign puppet classes to the hosts using the Foreman web GUI; either specific classes during tests, or by associating the classes to different host groups and then assigning hosts to groups. Thank you very much. Marco -- Nikola -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140227161643.GB23232%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Condition on class existence on agent
Hmm not sure what but there is something smelly here going on... What is the reason for the definition of those classes on the same host? Can't it just be a single class with a parameter moved to hiera or something else? My other suggestion would be to create a fact that changes the setting on the machine based on the fact value. -- Nikola On Wed, Feb 26, 2014 at 05:25:39AM -0800, zerozerouno...@gmail.com wrote: Hi, how can I create a condition based on the presence of a specific puppet class on the host? I'm using Foreman, some hosts have myclass_a applied, while others have myclass_a AND myclass_b. Resources in myclass_b are applied after resources in myclass_a. Both classes change a parameter inside a configuration file, using augeas. But this causes two changes in the file on each puppet run (from state b to a, and then from state a to b again). So I'm trying to do something like this, to prevent myclass_a from applying the modification if also myclass_b is present: class myname::myclass_a { if defined(myname::myclass_b) { $confchanges = [ 'set anotherpath_b anothervalue_b', # if class B is present, I only apply my specific edits ] } else { $confchanges = [ 'set anotherpath_b anothervalue_b', 'set mypath myvalue_a', # if class B is absent, I also apply the conflicting edit ] } augeas { 'myconffile_a': lens= 'Puppet.lns', incl= '/etc/myconf.conf', changes = $confchanges, } } class myname::myclass_b { augeas { 'myconffile_b': lens= 'Puppet.lns', incl= '/etc/myconf.conf', changes = 'set mypath myvalue_b', } } ...but this does not work, it never gets to the else section. Probably because the defined function is evaluated on the puppet master, where the class always exists. I cannot use a condition on the existence of the myconffile_b resource, because this is parse order dependent and would always return false when evaluated inside myclass_a. Any suggestions? I'm looking into alternatives like virtual resources or defined types, but I cannot see anything better suited at the moment. Thanks. Marco -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6d3c91d0-f70a-45dc-8dfe-d9309570425c%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140226134732.GK26036%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Condition on class existence on agent
On Wed, Feb 26, 2014 at 07:12:19AM -0800, zerozerouno...@gmail.com wrote: On Wednesday, February 26, 2014 2:47:32 PM UTC+1, nikolavp wrote: What is the reason for the definition of those classes on the same host? That's because I have some more general role A to which some hosts belong, but I also have role B which is some sort of further specification of role A, and host B belongs to it and thus needs a more specific configuration file. A specific example I think will be of much help. Some ideas: 1) Is role B just a more specific role A or they aren't so much related. You can use inheritance if they are and change the file/define you are interested in. Although inheritance is almost always abused in this setup it is OK. Can't it just be a single class with a parameter moved to hiera or Er... I never used hiera until now. I had a look at the doc but it seemed to me a bit overkill for this requirement. Other ways to do this would be to just propagate the parameter for the change to both role A and role B with default values. something else? My other suggestion would be to create a fact that changes the setting on the machine based on the fact value. Would be a good idea, but can a fact be created with a value which depends on puppet classes assigned to the host? Uhm... maybe assign the fact value based on the output of a command like puppet resource user someuser_created_only_on_host_b? I'm afraid the result would be based on existence on the master again, not on the agent. I am not sure if understood the idea. I am not saying that you have to create a dependant fact but just to set a fact with the value you want to change. So let's say you want to have a database connection URI. Role A sets it to something by default and Role B sets it to something else. You can specify the wanted connection URI on the host with custom fact. N.B. Can you also tell us how do you assign the roles for each host because that might help us be more specific with a solution. -- Nikola -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140227075204.GA23232%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Let puppet configure your monitoring (here: nimsoft)
I am not familiar with nimsoft but I will try to help anyways here - sorry if I am missing something but you can correct me. Let's say you want to monitor the oracle instance: First you specify the nimsoft_oracle_connection you already have written(as I saw from the readme in github) and then on the actual server that is checking each host in your network you will have build the configuration with something like https://github.com/dalen/puppet-puppetdbquery. For that you will surely need a puppetDB configuration setup that is connected to your puppet master. Something like the following should then work(WARNING not tested code): class nimsoft::server { $hosts = query_nodes('Nimsoft_oracle_connection[PROD]') file { '/etc/nimsoft-config-file': template('template-that-interpolates-hosts variable') } } Hope this helps at least a little -- Nikola On Sun, Feb 23, 2014 at 11:01:10PM +0100, Stefan Schulte wrote: Hi puppet users, just wanted to know if there are any puppet users who are using nimsoft as a monitoring tool? We are currently switching to nimsoft at $work and I noticed that for a proper monitoring configuration I need information that is already written down in our puppet manifests. E.g. to correctly set up logfile monitoring I need to know if the server is running an oralce database and if so I need to know the configured oracle instances and the location of the alertlog files. Since we install the oracle software and instances through puppet, puppet already has all the info. I created a few custom types to modify the nimsoft agent's configuration [1] and would love to get some feedback from other nimsoft users or just share your experience with nimsoft and puppet and how you automate things. If you use a different monitoring tool: How much is your monitoring puppetized? Do you configure your monitoring by hand? Is your monitoring system so smart that it does not need a lot of manual configuration, or do you use tools like puppet to automatically create configurations? -Stefan [1] https://github.com/stschulte/puppet-nimsoft -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/530A6FA6.6070904%40taunusstein.net. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140225083238.GC26036%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Best practices: client/server VS Git
On Thu, Feb 20, 2014 at 07:15:50AM -0800, Julien Deloubes wrote: Hello there, i'm actually learning Puppet in order to pass the exam. I have no professional experience on the product yet, and wanting some feedback from you professional devops. For the moment i see 2 ways for Puppet to synchronize nodes: -Puppet client/server way with a puppetmaster node This is the approach we are currently taking and it allows you to use virtual resources. This is the only thing which should drive you to this setup - the other is much simpler in my opinion. Of course there might be a way to use a central PuppetDB service in masterless setup but at least I am unaware of how to do this. -Decentralized way, with node pull their configuration from a Git repo and make a puppet apply on their own. This is the thing that we were doing until there were some needs for hosts to configure them selfs based on configuration on other hosts(virtual resources) Can you told me what is the pro/cons for this two methods? And for a large scale of node which is the preferred one? Thanks for your help. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140225090149.GD26036%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet module template mentioned at contributor summit
On Wed, Feb 05, 2014 at 06:38:24PM +0100, Gareth Rushgrove wrote: This came up in discussion a couple of times at the Puppet contributor summit at Config Management Camp in Gent over the last couple of days so I thought I'd write up. A while ago I put together a pretty complete/opinionated skeleton for puppet modules. Especially if you're not too familiar with ruby or the ruby ecosystem, or just getting started with testing it should be a useful starting point. https://github.com/garethr/puppet-module-skeleton Damn! I have to confess that I have used your module and I have a Guardfile that also checks the templates. Maybe it's time I send a pull request (shame) :). Just know that there are people out there that are using this! I've added a bunch more features (including a Guardfile, resource coverage and support for Beaker integration tests) and got round to writing up a blog post about what and why: http://www.morethanseven.net/2014/02/05/a-template-for-puppet-modules/ Hopefully it's useful to a few people. Any features or issues let me know. Gareth -- Gareth Rushgrove @garethr devopsweekly.com morethanseven.net garethrushgrove.com -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAFi_6y%2BiRQPPKk8yTLBMiHCNOsLdNFYeaPO8oTCCcuaASj6SaQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140225133511.GF26036%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Use the same resource in two dependent classes
Hi Marco, On Mon, Feb 17, 2014 at 03:41:14AM -0800, zerozerouno...@gmail.com wrote: Hi, I have this situation: Class A: contains a File resource, and a Service resource which requires the File resource (the service needs to be restarted when the file changes). Class B: will be applied only on a subset of machines where class A is applied, and it requires class A - resources belonging to class B must be applied only after resources from class A have been applied. Class B also contains some File resources, and after they are applied also the _same_ service from class A needs to be restarted. class A { service {'myservice': ensure = 'started', } file { '/etc/default/myservice.conf': ensure = present, notify = Service['myservice'], template = '...', } } class B { file { '/etc/default/myservice.conf1': notify = Service['myservice'], # note that this is sort of global template = '...', } Class['A'] - Class['B'] } How do you deal with this situation? I cannot declare the same Service resource again in class B. And I cannot declare the Service in class A as dependent from the File in class B. Why do you need this? You can just use the name of the service which will be sort of global to the catalog. Thanks for any suggestions. Marco Sorry If I am missing something... -- Nikola -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140218121115.GD5244%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Use the same resource in two dependent classes
On Tue, Feb 18, 2014 at 04:25:43AM -0800, zerozerouno...@gmail.com wrote: On Tuesday, February 18, 2014 1:11:15 PM UTC+1, nikolavp wrote: class A { service {'myservice': ensure = 'started', } file { '/etc/default/myservice.conf': ensure = present, notify = Service['myservice'], template = '...', } } class B { file { '/etc/default/myservice.conf1': notify = Service['myservice'], # note that this is sort of global template = '...', } Class['A'] - Class['B'] } Uhm, I expected the notify parameter to create a File ~ Service dependency, and so a Class['B'] - Class ['A'] dependency which would create a loop with the other one, according to http://docs.puppetlabs.com/references/latest/metaparameter.html#notify : […notify…] it creates a dependency relationship like before. Hmm (shame) good point. Haven't tried the code. In that case I would move the service(thingy) in a separate module with a define for a config file with proper relationships there. Then A and B will both have dependencies on that module and it(the new module) will handle the order and dependencies. I find this pattern far cleaner and when you think about it services are just separate things so giving each of them a module makes sense. -- Nikola Does it work instead? Maybe I should just try it. But time's up for today. Thanks. Marco -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/8ee53a6d-539b-4a2d-b023-a49ccd3c4961%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140218124734.GE5244%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Code coverage for puppet resources
Bah!! I am waiting for this from months. Thanks so much! Now I will be able to actually measure my coverage and not blindly rely on proper TDD. -- Nikola On Sun, Jan 26, 2014 at 12:50:44PM +, Gareth Rushgrove wrote: For anyone else who likes writing tests for their puppet manifests, I've just added basic code coverage to rspec-puppet: A blog post here about how to use it: http://www.morethanseven.net/2014/01/25/code-coverage-for-puppet-modules/ I'd be interested in any feedback on how to improve or add to this. Cheers Gareth -- Gareth Rushgrove @garethr devopsweekly.com morethanseven.net garethrushgrove.com -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAFi_6yLzEYJ4vbMh28PwoHoYwtGGTnfpra16TnoGrFuGqyGuSg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140205162326.GB7101%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Dynamic Nagios Hostgroup members via collected resources?
On Tue, Jan 14, 2014 at 08:57:08AM -0800, smalderma wrote: Greetings All, I've referenced a few older discussions about nagios hostgroups and the nagios_hostgroup resource. I admit I'm somewhat new to this game, so please excuse my ignorance on the complexities. I'm looking for a way that puppet can use collections / exported resources to create nagios host groups. For instance, I'd like a hostgroups for osfamilies, puppet environments, domains, and perhaps virtual or hardware platform. It seems like using @@nagios_hostgroup on the nodes, and collecting the resources on the Nagios server is not sufficient, when what I'm looking for is one hostgroup named RedHat with members of this osfamily, and another hostgroup named Solaris whose members are of the solaris osfamily. I've not had much success writing this into puppet, so is this just not possible? Would I be better served creating custom resource(s) that simply collect lists of node names by the facts I'm interested and then the Nagios server uses those collections as data to populate its set of nagios_hostgroup resources? Thanks for your thoughts and wisdom. I think that the only real way to do this properly is to not realize nagios resources in the standard way. Check https://github.com/dalen/puppet-puppetdbquery out and see if you can do your nagios configuration with it. This is currently on my TODO list as I am feeling the same pain(currently I am defining those in a big hiera list...) -- Nikola -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3bf39a40-53c1-4de7-8e22-22ab45121927%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140115100640.GF3682%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: logstash module to control service
Not that it is related to puppet but you should check their wiki for example proper init scripts. I can remember there were systemd, upstart and normal systemv scripts for logstash. Also is there a reason why you are not using the official module. It suits our needs more than good and it is always up to date with different plugins. -- Nikola On Tue, Jan 14, 2014 at 06:17:05AM -0800, jcbollinger wrote: On Tuesday, January 14, 2014 5:05:34 AM UTC-6, Dick Davies wrote: Are you sure that 'service logstash status' is working properly? That's what puppet is using to confirm logstash is running. Indeed, the debug output suggests that 'service logstash status' is *not*working as Puppet expects it to do. It shows puppet running that command (to determine whether logstash is running) and then not following up with anything. That shows that Service['logstash'] is indeed in the catalog, and that Puppet thinks it is already in the desired target state. On second reading I observe at least one strange thing about the initscript's 'status' command: it relies on a variable $PID that seems nowhere initialized. I can't immediately explain why that would lead to the observed behavior, but it's certainly erroneous. John -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/c05c01f8-4cda-4609-95c7-66eaad3ae95e%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20140114144523.GD3682%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Unpleasant puppetlabs experience
On Sat, Dec 07, 2013 at 10:11:24AM +1300, xav wrote: On Fri, 2013-12-06 at 11:31 -0500, Jerald Sheets wrote: Please note that the exact same documentation is expected to be used for either and people spending crap-tons of money are expected to put up with the same issues. This is not a licensed/open source argument. This is a do a better job of documentation argument. I shouldn't have to go hunt down other admins in my town to learn things with/from because none of us can make sense of the documentation...or its wrong... or it ignores systems or development best practices, or whatever your particular gripe may be. Puppet is the best there is, but it (and its docs) can be better. This feels like it's a very negative discussion and I wanted to highlight my own experiences with Puppetlabs. Puppetlabs make their money in part from their excellent additions to the open source version (which makes deployment a bunch easier), but also from paid support engagements - if someone wants to pay them to update the docs for the open source parts, they will. If not then we either wait for them to get the time to do so, or we submit a pull request. We're not talking about a company the size of Google here, Puppetlabs doesn't have large bunches of cash to throw around, and my overall experience of the Puppet documentation has been excellent. The particular page in the bug report was extremely helpful when I started out with Puppet. I'd be keen to see more examples and helpful tutorials, but that's not core product documentation - the actual reference documentation on the puppetlabs site is bang up to date, complete, and way beyond the level of documentation available for many other products that sell for big money. And even better, if that's not enough the source is very readable and well commented. There are several areas in the documentation where gaps exist, and I commend Puppetlabs for highlighting these and over time filling them in. The product is still in active development and over time just gets better and better. Exactly my thoughts on the subject. Basically if you don't like the documentation you can research the problem(in this case custom providers) and then just populate the missing gaps in the documentation. This is how most of the open source projects out there improve their documentation. If for some reason your pull request is REJECTED then this is a different topic and is one I will be mad about(if at all possible) The fact is that the puppet project has one of the best documentations I have seen out there. Maybe it's just me but I find my around REALLY FAST these days. -- Nikola -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1386364284.6023.33.camel%40debian.my.home. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20131212170232.GD17003%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Create array from node facts
Hi, take a look at this :). It should do exactly what you want. https://github.com/dalen/puppet-puppetdbquery -- Nikola On Thu, Nov 21, 2013 at 02:15:15PM -0800, JamieC wrote: I'm looking of a way to create an array of IPs of puppet clients which are currently assigned a certain class\module. Would anyone be able to tell me if this would be possible and if so, point me in the right direction of implementing it? I'm using puppetdb so assume the details could be pulled from there somehow? Or perhaps directly from the latest catalog? Thank you in advanced. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d1d00195-4368-4e1a-97f8-1ed35b9708f8%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20131122143021.GA9003%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Monitoring services
You better use another tool for this that will provision your process. There are many examples for this: http://smarden.org/runit/ http://upstart.ubuntu.com/cookbook/ http://mmonit.com/monit/ maybe more. I am currently using upstart and it is maybe one of the easiest to setup and integrates with the puppet service type -- Nikola On Fri, Nov 01, 2013 at 08:41:43AM -0700, Yasha Zislin wrote: Hello, I have multiple instances of a service running on linux server. This service has status, restart, start and stop init scripts. One of the instances keeps dying for unknown reasons (probably network related). I have puppet configured to monitor the service but it doesnt consider it to be down when one of the instances dies. Is there a way to configure puppet to initiate restart when one of the instances dies? Here is my current config class myApp::service { service { myService: ensure = running, hasstatus = true, hasrestart = true, enable = true, } } Thanks. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/5de0eace-4117-4ac1-8cd2-23e6efc17237%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20131101164046.GE28337%40nikolavp-desktop. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] puppet for deployment of Java apps
I can only recommend a push based solution(puppet is a pull based). I like python so I use fabric[1] but I know that other shops(ruby based) use capistrano. If the DB will be the only precondition it might be ok to do this with puppet but for something more distributed a push based solution is far better. [1]http://docs.fabfile.org/en/1.7/ -- Nikola On Tue, Aug 27, 2013 at 04:47:03AM -0700, Bhuwan wrote: Hello, Is Puppet a good choice to deploy JAVA applications (Tomcat) where there exists a cross-system dependency (i.e. the database should be deployed before the web app)? If not, any suggestions for alternatives? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet, Yum, Cassandra, openjdk and --nodeps
This is rather unfortunate. The only way that I can think of is to change the deb/rpm package and serve that on your own. We are using cassandra on some deployment too but force JAVA_HOME explicitly in configuration files to the oracle jdk -- Nikola On Wed, Jul 24, 2013 at 02:29:44PM -0700, Paul Pham wrote: Hello, puppet n00b here. Trying to install cassandra via puppet. Works great, only caveat is cassandra (dsc12 package) lists openjdk as a dependency. Ironically enough, the datastax guys themselves recommend using Oracle JRE instead of openjdk, and there is even a bug https://bugzilla.redhat.com/show_bug.cgi?id=907485that prevents cassandra from starting if it's using openjdk. Anyway, I fixed it by adding an exec to my puppet-java module that sets the Oracle JRE runtime as the defaults via alternatives, and it works fine. However, I still end up with two different java runtimes installed which I find to be a bit unclean. The root of the problem to me, though, is that by having puppet install dsc12, I lose visibility into what all those dependencies were that got installed along with it (I didn't realize openjdk was even installing until I started investigating why cassandra wasn't starting). So what I'd prefer to do is add each individual package dependency into my cassandra module itself, thereby explicitly installing only what I intend to install, and nothing else. The only way this works, though, is if I can somehow pass the --nodeps option into yum during puppet apply time. Otherwise, regardless of whether I already installed Oracle JRE, using yum to install dsc12 will automatically install openjdk. How have you guys handled scenarios like this? I tried searching through the topics here for yum nodeps but it seems people found different ways of solving their individual problems rather than sending flags to the yum provider itself. I also noticed this puppet feature requesthttps://projects.puppetlabs.com/issues/4976which unfortunately has remained open(?) for 3 years. I've also seen people suggest that nodeps should never be used with yum since the purpose of yum is to handle dependencies... but we also like some of the other features of yum, like being able to pull packages down by name automatically from our yum repo (which we manage in-house). Anyway, any insights would be great! Thanks, Paul -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet Nagios resources
You can set Nagios_host { target = /etc/nagios/conf.d/${::fqdn}.cfg, } somewhere in site.pp file; just make sure it is in the global scope. This is just defining a default parameter for the resource. Note that this is a bad practice as everything global -- Nikola On Mon, Jul 22, 2013 at 03:08:49PM +0100, Jonathan Gazeley wrote: Hi all, We've been using Puppet to write out our Nagios configs for ages. I think I understand it pretty well. Recently we've had reason to set 'target' on all Nagios resources, based on the fqdn of the monitored host. However I don't want to have to set 'target' by hand on all Nagios resources (nor remember to set it on all future ones). So my question is: what's the easiest way to bulk-set the 'target' parameter according to the fqdn? So far I tried setting it on the Nagios server, which didn't work because $::fqdn is always the name of the Nagios server, not the monitored host Nagios_host | | { notify = Service['nagios'], target = /etc/nagios/conf.d/${::fqdn}.cfg, } I also tried including this on the monitored host, which didn't work because it attempts to realise all Nagios_host resources on the monitored host, not the Nagios server. Nagios_host | | { target = /etc/nagios/conf.d/${::fqdn}.cfg, } Is there an easy way to easily making all nagios_* resources have a fqdn-specific target? Thanks, Jonathan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Welcome Cloudsmith to Puppet Labs!
Glad to hear this is coming. I am currently not using Geppetto for speed considerations but I think that tools are lacking and Cloudsmith can really change that! -- Nikola On Wed, Jul 17, 2013 at 07:05:53PM -0700, Nigel Kersten wrote: Some of you will already be familiar with Cloudsmith products such as Geppetto, an IDE for Puppet modules, and some of you may be familiar with the excellent work Cloudsmith folks like Henrik have done in areas like the Puppet core parser. We've been working together for a while now, and today we're thrilled to announce the acquisition of Cloudsmith into the Puppet Labs family. There is more about the acquisition on our blog: https://puppetlabs.com/blog/cloudsmith-joins-puppet-labs/ For more info about the Puppet Module IDE Geppetto: Geppetto: A Puppet IDE (blog) http://bit.ly/12VlbCf Geppetto 3.0 Overview (video) http://bit.ly/12wsqR8 Geppetto, A Puppet IDE and Your Favorite Backseat Driver (podcast) http://bit.ly/12Kz0SW cheers, Nigel Kersten -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Delegation of responsability for SOME things
Why don't you use some other tool for application deployment? This will make your life a lot easier! In my experience puppet is not the best option for application deployment because it uses pull based changes. In some usecases this is just not possible and a push based solution is far better. Tools like fabric or capistrano are examples of push based solutions for deployment In the best scenario you declare what needs to be installed on each system for the application to run properly and then let the users deploy/redeploy their systems. -- Nikola On Thu, Jul 11, 2013 at 10:06:27AM -0700, Philip Brown wrote: Howdy folks, we the sysadmins at $DAYJOB, are liking puppet for our OS setups. Now we are interested in something that's going to make application deployment and config easier. Trouble is, we're a large shop. So we have a separate application support group, whom we dont particularly want to give out root access to. Is there some best practices method to allow some non-root-blessed group, to have *partial* access to puppet, for purposes of application deployment only? And/or is there some other tool that is better suited for this sort of thing? In some ways, we'd prefer to keep the appdevelopers off our puppetmaster machine entirely, since we wouldnt want them to accidentally get access to some machine because we forgot to chmod some directory that is not their responsability, that also has passwords or public keys in it. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Fwd: [Module team] Much ado about modules
On Tue, Jul 09, 2013 at 09:23:39AM -0700, jcbollinger wrote: On Monday, July 8, 2013 11:02:25 AM UTC-5, Ashley Penney wrote: This is definitely something we want to do and need to do. I've been a little hesitant to wade down into the whole these are the specific parameter names we want to use and building out a huge set of guidelines, but I do have a straightforward question for the list along these lines: We're refactoring the ntp module to try and be a little bit of a better design rather than one giant class. We've been having some discussions in the PR about the right way to name the following options: manage_service ensure_package package_enable I was leaning towards: ensure_package enable_package ensure_service. But it's been proposed that: service_ensure package_enable Makes better sense in terms of being able to scan for things. Does anyone reading this have strong preferences either way? Now is the time for us to slowly start renaming parameters across the modules as we work on bringing in PRs, so speak up now. :) In an abstract sense, I think I prefer component_ensure over ensure_component, on the principle that the most-significant name component should come first. It's not really about scanning for things for me, but rather about grouping related things together. That carries advantages for visual scanning, but the grouping aspect is more fundamental. +1 In a more concrete sense, if you are naming parameters of a class, then the datum we abstractly refer to as component_ensure might more sensibly be named something else in that context. For example, in a class ntp::service, I would certainly choose the parameter name ensure over service_ensure. There is therefore some dependency on module structure and intended use. +1 NB: I can't remember the last time I agreed with someone on everything that he says. -- Nikola -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Parameterizing puppet agent --test with 'puppet agent $svn_branch --test
Now sure what you want to achieve here?!?!? If those are different modules or something you can move that as a variable in facter and then run the puppet agent by overriding the fact at runtime Something like this FACTER_MYENVPROPERTY=7.3 puppet agent -t FACTER_MYENVPROPERTY=trunk puppet agent -t FACTER_MYENVPROPERTY=RC puppet agent -t then you can have conditional code around the global myenvproperty as a variable. But please give more info for your particular usecase so we can better help you. -- Nikola On Mon, Jul 08, 2013 at 05:54:22AM -0700, Kamal Ahmed wrote: Hi, how can i parameterize puppet command line run, to be able to use the same host, and have multiple subversion branches being updated / managed by the same puppet agent, depending on what i specify on the command line as an argument so i can have 3 subversion branches: 1. 7.3 2. trunk 3. RC currently each one is hardcoded , what i would like to do is to be able to : puppet agent 7.3 --test - to update 7.3 puppet agent trunk --test - to update trunk puppet agent RC --test - to update trunk Thanks, -Kamal. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppetmaster performance optimization/best practices?
Start by setting up passenger. I am always amazed why people even start with mongrel for anything but debugging. The packages from puppetlabs are there and are stable. They will setup the whole thing for you - you just apt-get install or yum install them. Also I am not sure if you will get better memory usage from puppetdb but it will be much faster for exported resources. Migration to puppet3 might also help although I will start with the others first. -- Nikola On Tue, Jul 02, 2013 at 10:09:42PM -0400, Jeff Zellner wrote: I've recently started to have a problem with my puppetmaster using more and more memory over a few days, and eventually hitting swap. Restarting the puppetmaster services puts things back to normal for a bit. (see: http://i.imgur.com/E8xPYqn.png) I'm running 2.7.11 on distro-standard ruby 1.8.7, with 4 mongrel puppetmaster processes, on a pretty standard Ubuntu 12.04 VM, puppetmasters are behind nginx. Nginx handles the files (ala: http://www.masterzen.fr/2010/03/21/more-puppet-offloading/). Running foreman on the same machine, though it's not used for much. Puppet is setup to use a remote MySQL db. We have ~200 servers in a single environment running against this puppetmaster, which doesn't seem like it should be a seriously taxing load, so having to restart the service occasionally seems like an indication I'm doing something wrong. What am I missing? Should I be using Unicorn? Should I be using a different Ruby? What should I be tuning or optimizing? Is there a good resource for puppetmaster setup best practices? Thanks! -Jeff -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] variables inside variable names
I think that you are having a problem here because $java is not expanded/interpolated as a variable and the template solves it. You can safely use the fully qualified name and this should work: $java_home = ${java::jdk_1_7_u10::home} Of course if you want to use $java as a variable you will have to use a templates. If you tell us more about your usecase and setup - there are often better ways to do what you want - hiera comes mind first; also java::params class comes second with the home set as parameter for different setups -- Nikola On Tue, Jul 02, 2013 at 05:53:24PM -0700, Schofield wrote: Given class java::jdk_1_7_u10{ home=/usr/java/jdk-1.7.0-10 } $java = jdk_1_7_u10 $java_home = ${java::$java::home} I would like $java_home to be equal to /usr/java/jdk-1.7.0-10. Is there an elegant way to make this work? We currently use an inline template to make it work. java_home = inline_template(%=scope.lookupvar('java::${java}::home')%), But this has always felt like a hack to me so I am curious to know if there is a better way? Currently running puppet 3.0.0. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet for Cassandra cluster automation
I like to use fabric[1] for this. I always think that some things are better done with push tools like fabric instead of pull tools like puppet. Of course there are other tools that solve the same problem and are based on other languages - I just like python [1] http://docs.fabfile.org/en/latest/ -- Nikola On Tue, Jul 02, 2013 at 04:56:57PM -0700, Jingyan Wang wrote: Hi, I am using Puppet to set up (and later resize) a Cassandra cluster, where I would like to have the configuration changes applied immediately instead of after a certain time interval. Is MCollective the only method to push configuration changes from master to clients (since puppet kick is deprecated)? What are the possible ways to achieve this Cassandra deployment? Thanks! -Jingyan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re-create my.cnf when using Puppet MySQL module
You can use custom settings that will be put in /etc/mysq/conf.d/ and will be included in you setup by overriding any setting in my.cnf. Here is an example from our setup: mysql::server::config{ 'my-cool-settings': settings = { 'mysqld'= { 'max_connections' = '400', #the maximum number of open connections 'max_connect_errors' = '1000', # sane value because the default is 10 which is not enough at all! 'character-set-server'= 'utf8', #use utf8 by default 'innodb_buffer_pool_size' = $innodb_buffer_pool_size, #innodb buffer size } } } -- Nikola On Tue, Jul 02, 2013 at 04:42:56AM -0700, dusan.dorde...@clavistechnology.com wrote: Hi, I am using Puppet MySQL module from forge and everything works as expected. It downloaded and installed mysql, created database, set pass, etc. I wanted to make few configuration changes, so I changed mysql/templates/my.cnf.erb but it seems Puppet did not detected that change. What be the best way to trigger re-creation of my.cnf file ? Thanks, Dusan -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: trying to get a 32-bit JVM on a 64-bit platform with Package provider
Package['jdk'] { name = 'jdk.i1586' } will be a better option. Note that I wouldn't use inheritance here but a simple parameter for the package name and move that somewhere else like hiera(although I see that you are using puppet2.7) Inheritance is almost always not the right answer. -- Nikola On Fri, Jun 21, 2013 at 12:31:23PM +0100, Dick Davies wrote: Ah cracked it! class jdk::32bit inherits jdk { Package['jdk'] { ensure = undef } package { jdk.i586: ensure = present } } On 21 June 2013 12:15, Dick Davies rasput...@hellooperator.net wrote: i was hoping I could do this with the right ensure parameter on Package, but I'm hitting a wall. We've got 64-bit servers running tomcats on RHEL that need to be 32-bit (external vendor, JNI, funny story). 2.7 Puppetmaster and the yum repo hosts the Oracle JDKs. Currently we just push out what we want with: class jdk { package { jdk: ensure = present } } which essentially does 'yum install jdk' (some other bits too, but they're not relevant). I was hoping to include something like class jdk::32bit inherits jdk { Package['jdk'] { ensure = 1586 } } for these servers, but that seems to run the equivalent of : yum install jdk-i586 Is there a way to coerce the resource to install the right thing, or am I going to have to go with an Exec ? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] puppet node deactivate
Hi, What is the storage engine behind puppetdb? Can you please provide the hostname for the machine that wasn't deactivated. I can remember that I had some problems with hostnames that contained uppercase characters. -- Nikola On Thu, Jun 20, 2013 at 04:28:40PM -0700, David Kerr wrote: Hello, I'm in the process of upgrading my puppet from 2x to 3.2.1. During my testing i found that it appears that puppet node deactivate isn't removing nodes from storeconfigs. Specifically: On my puppet server: puppet node deactivate hub15.mydomain.com Submitted 'deactivate node' for hub15.mydomain.com with UUID 3f698c7a-dd1e-49a4-8fdd-941e5bc01970 followed by: On my haproxy: puppet agent --test --noop backend b1 balance roundrobin @@ -72,15 +65,16 @@ option httpclose option forwardfor server hub01 192.168.0.218:80 check - server hub02 192.168.4.181:80 check server hub03 192.168.0.19:80 check server hub04 192.168.4.62:80 check - server hub10 192.168.0.48:80 check - server hub15 192.168.0.110:80 check + server hub05 192.168.0.151:80 check + server hub12 192.168.0.33:80 check + server hub14 192.168.4.27:80 check + server hub15 192.168.0.163:80 check I usually do puppet node clean/puppet node deactivate. Any ideas? Thanks -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Set environment variable that is visible to package installation
You can get the environment variable from puppet.conf or if it is another variable, you can use facter. As long as you are controlling your packages you can check those after that. -- Nikola On Wed, Jun 19, 2013 at 10:08:46AM -0700, Kevin Lange wrote: We have RPMs which requires an environment variable to be set prior to installation (contains conf information). What is the best way to do this? I'd like to avoid setting this environment var in each systems' profile. It would be nice to have an option to do this within the package type, but I think that's not very likely. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: installing carbon / passing PYTHONPATH to pip package provider?
I also have some packages that were produced with fpm. Here is the script that I am using - https://gist.github.com/nikolavp/5755563 which was borrowed from a blog post I found on the net. You can of course change the versions if you want. Feel free to add dependency metadata to fpm when building the packages and please comment on the gist if you end up with something useful ;) -- Nikola On Thu, Jun 06, 2013 at 03:32:35PM -0700, Amos Shapira wrote: Thanks. This is similar to a solution suggested in https://github.com/graphite-project/carbon/issues/86#issuecomment-16200739 (there he adds a symlink instead of providing a copy). What I don't like about these (practical) solutions is that they are fragile - either the symlink target could change (newer version, for instance) or the content of the copied file could change (and the change could be lost). In the meantime I'm exploring a different direction - there are .deb packages for the version I want in later versions of Ubuntu than 12.04. They install cleanly on 12.04 (I assume this is because they are pure Python) and even if they didn't, I could rebuild them for 12.04 from source-deb. I intend to make them available on our internal repository and install them with the apt provider instead. Cheers, --Amos On Thursday, 6 June 2013 23:23:21 UTC+10, Ben Whaley wrote: Yep, I ran in to this as well, both with carbon and graphite-web. I solved it by adding the Python metadata in the appropriate location on my system. Check this gist for the code https://gist.github.com/bwhaley/5721421 Hope this helps. - Ben On Wednesday, June 5, 2013 9:30:56 PM UTC-7, Amos Shapira wrote: My environment: Ubuntu LTS 12.04, carbon ( https://github.com/graphite-project/carbon) 0.9.9 installed using pip. I just learned why when I run pip freeze on a system I don't see the carbon package even when it installed successfully - I should run it with PYTHONPATH=/opt/graphite/lib/ pip freeze. (ref: https://github.com/graphite-project/carbon/issues/86) This causes Puppet to re-install the package on every run (and reload dependant servers), even though it's already installed and there is nothing that really needs to be done. I guess this is the package's fault, but it made me hit once more a limitation in Puppet i.e. that I don't have a way to pass options or environment variables to pip. Apparently there are already a couple of issues and pull requests for this in https://github.com/puppetlabs/puppet/pull/1507 and https://projects.puppetlabs.com/issues/18029, but they don't seem likely to be accepted. Alternatively - can anyone point me to how they solved the carbon package (or a similar) issue? i.e. that it doesn't get re-installed on every Puppet run? Thanks, --Amos -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Grouping hosts within environments
Yes you can just tag them from there: accounts::users::accounts: sysadmin: ensure: present home: /home/sysadmin managehome: true shell: /bin/bash uid: 4000 gid: sysadmin comment: Systems Admin tags aren't special in any way - they are just a metaparameter that each resource in puppet can have - http://docs.puppetlabs.com/references/latest/metaparameter.html#tag If you don't want to repeat yourself and can deduce the user team(group) from the yaml file or something, you can use the third parameter for create_resource which is just the default parameters. So you would have something like this: $tags = { tag = 'app1' } create_resource(user, $myhash, $tags) -- Nikola On Thu, May 30, 2013 at 09:51:48AM -0700, przemol wrote: This approach requires to keep all the users in *.pp files. Currently we keep users in yaml file: accounts::users::accounts: sysadmin: ensure: present home: /home/sysadmin managehome: true shell: /bin/bash uid: 4000 gid: sysadmin comment: Systems Admin etc and create them using create_resource. Is it possible to use hiera to associate all the users to particular servers ? On Thursday, May 30, 2013 4:39:02 PM UTC+1, nikolavp wrote: You can always use tags with virtual resources of some sort. Let's say that user1 is in group app1, user2 and user3 are in group app2. You can tag those user accounts with that: user{'user1' ... tag = 'app1', } user {['user2', 'user3']: ... tag = 'app2', } now in your hiera configurations or somewhere else(like ENC) you can specify which user accounts belong to that host by realizing only those that you need. node node10,node20 { User| tag == 'app1' | } I would also introduce a fact that exposes the fact that user accounts of 'app1' belong to a particular host On Thu, May 30, 2013 at 08:02:34AM -0700, przemol wrote: Hello, we have been using puppet 3 with hiera based config and several (usually typical) environments: test predev dev preprod prod ... Basically we apply the puppet config to test, then predev, then dev, etc But within each environment we have quite a large number of hosts (20/50/100/300/...). We would like to group them into sort of subgroups. For example dev hosts are for developers from different applications teams: app1, app2, app3, appN. We need to create accounts (user accounts are just an example - there are other similar tasks) on all servers from dev environments: user accounts for dev team app1 don't need to be on all dev servers - just on the following nodes: node10 - node20 user accounts for dev team app2 should be just on the following nodes: node35 - node88 etc (and I can't use any regular expressions to select nodes - the same servers in each group could have quite different FQDN) Can you recommend what puppet/hiera feature could I use to group servers ? It would be good if I could use it just on central puppet master server and not need to login to every node and assign it locally to a group. Regards -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com javascript:. To post to this group, send email to puppet...@googlegroups.comjavascript:. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Grouping hosts within environments
You can always use tags with virtual resources of some sort. Let's say that user1 is in group app1, user2 and user3 are in group app2. You can tag those user accounts with that: user{'user1' ... tag = 'app1', } user {['user2', 'user3']: ... tag = 'app2', } now in your hiera configurations or somewhere else(like ENC) you can specify which user accounts belong to that host by realizing only those that you need. node node10,node20 { User| tag == 'app1' | } I would also introduce a fact that exposes the fact that user accounts of 'app1' belong to a particular host On Thu, May 30, 2013 at 08:02:34AM -0700, przemol wrote: Hello, we have been using puppet 3 with hiera based config and several (usually typical) environments: test predev dev preprod prod ... Basically we apply the puppet config to test, then predev, then dev, etc But within each environment we have quite a large number of hosts (20/50/100/300/...). We would like to group them into sort of subgroups. For example dev hosts are for developers from different applications teams: app1, app2, app3, appN. We need to create accounts (user accounts are just an example - there are other similar tasks) on all servers from dev environments: user accounts for dev team app1 don't need to be on all dev servers - just on the following nodes: node10 - node20 user accounts for dev team app2 should be just on the following nodes: node35 - node88 etc (and I can't use any regular expressions to select nodes - the same servers in each group could have quite different FQDN) Can you recommend what puppet/hiera feature could I use to group servers ? It would be good if I could use it just on central puppet master server and not need to login to every node and assign it locally to a group. Regards -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] How to trace an order of all execs ?
Well you can run echo with the parameters in a wrapper script. I am not sure if puppet has support for this. Of course you can watch the order with --trace --debug but it might not give you the whole command parameter but just the exec title. If you can make those to match you will be ok with that method. -- Nikola On Thu, May 23, 2013 at 01:05:56AM -0700, przemol wrote: Hello, I have some class which has quite a lot of execs with notify etc. Since puppet is not required to run them in the order they are in a file is it possible to monitor an order of all execs including parameters/arguments for each exec ? Regards -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] if word1 match so I replaced it with word2
Hi On Wed, May 22, 2013 at 01:43:23PM -0700, Stan wrote: Hi I would like to replace a word with another in a config file if word1 match so I replaced it with word2 I looked augeas but it does not seem to. Can you please tell us the specific configuration format and maybe an example word1, word2 pattern. Augeas will most likely work here as long as it is a known format. you would have a different track? you can always use sed if you feel powered enough(I don't) thank you regards -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] module namespace?
Well we had that problem in the past. I now name my modules with a prefix for the company first letter so if I was working for puppetlabs then I would name the module pmysql. The thing is that most of the time I want convenient wrappers for the mysql module provided by puppetlabs or some third party. This also ensures that if they change the interface I have stable defines/classes. The other way arround this is to put all those things in a single module named site or custom for example. -- Nikola On Thu, May 16, 2013 at 05:10:44PM -0500, Matt Zagrabelny wrote: Greetings, When writing modules are people namespacing them to avoid collisions with puppetlabs' modules? I wrote some (very simple) modules: mysql postgresql that now have namespace conflicts when I am trying to install the puppetlabs modules of the same name. Is there a best practice or style guide that people follow when namespacing their in-house modules? For instance: site::umn::duluth::postgresql ?? Thanks for any hints or feedback! -mz -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Rhel based distro and multiple package version installed
You should really build packages of java/tomcat with fpm. It will save you so much time and hassle in the end. Want different versions of the same package you just have to name them with the package version - no problem. Let's assume that extract the java distribution in a directory named java-$(VERSION), just run the following: fpm -s dir -t deb -n java-$(VERSION) -v $(VERSION) -a x86_64 --prefix /opt --provides java-runtime,java2-runtime,java5-runtime,java6-runtime,java7-runtime,java7-runtime-headless java-$(VERSION) and you should be good to go. Change this as needed(like architecture, deb/rpm prefix and the provides) -- Nikola On Sat, May 18, 2013 at 01:38:47AM -0700, Luca Gervasi wrote: Hello, i'm starting using Puppet on my personal lab. There I'd like to reproduce a multi base tomcat installation as follows: * Multiple jdk installations (multiple 1.6.x, multiple 1.7.x) * Multiple tomcat installations (multiple 6.0.x, multiple 7.0.x) Here is the problem: using the Package definition, i'm unable to have multiple jdk version (as 1.6.4 supersedes 1.6.3, leaving only the last one installed correctly), so I created a custom define that uses a File definition to copy multiple directories (/opt/java/jdk-$version) from my puppetmaster (recurse + purge) and used this as follows: tomcat::home { 6.0.37: version = 6.0.37} jdk::home { 1.6.24: version = 1.6.24} but i'm unable to create a simple check on my tomcat istances like a require tomcat-6.0.37. How can i accomplish what i need? Thanks in advance. Luca Gervasi -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] puppet in an appliance model?
Hi, Using puppet in standalone mode with puppet apply from a cronjob will work without problems. The only thing that will be missing are exported resources. But you won't need those if this is a single machine. -- Nikola On Fri, May 17, 2013 at 03:52:11PM -0700, Vince Taluskie wrote: Hey Folks, I am looking at using puppet to help manage/coordinate system integration among several teams collaborating on an appliance product.This is a little different than other environments where I've used puppet for managing large numbers of systems. In the appliance case, we need to build manage only a single system so a puppetmaster becomes extra baggage that is not really needed - what features will not work without one tho? Will erb templates still work? Will modules also function without a puppet master? i'm wondering if anyone has already shared their experiences with the group using puppet in this kind of mode. If so, please share and I will summarize. Thanks, Vince -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Using puppet to install puppet modules
I can second that. Not sure why puppetlabs decided to invent yet another package system with it's own problems and metadata definition and updates specifics -- Nikola On Fri, Apr 26, 2013 at 09:02:53AM -0400, Trevor Vaughan wrote: I usually package the modules that I want in the native package manager of the system. Much easier to track and the 'package' statement works just fine. Trevor On Fri, Apr 26, 2013 at 6:19 AM, Jonathan Gazeley jonathan.gaze...@bristol.ac.uk wrote: Hi people, I use puppet forge to install various modules on my puppetmaster. I'm thinking about the build process if I build a new puppetmaster. Manually reinstalling the modules is prone to error if I forget which modules I used to have. I looked at this module[1] as a way of making puppet automatically install its own modules. But then I realised - if I am building a puppetmaster from scratch then it won't have the ability to use this module to install itself... chicken and egg. How have other people handled this? Cheers, Jonathan [1] https://forge.puppetlabs.com/rcoleman/puppet_module -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] What do YOU do to catch undefined variables
I/We currently have 32 modules - some of these are of course third party so they don't count. One of the modules is for our biggest project which consists of different components and their configuration based on different environment setups. That module currently contains 36 *.pp files. If you think vim can't scale I can assure you that it can. Lately I've been using https://github.com/santana/puppet-cleaner to clean my pp files and while it is still possible with eclipse to do the same it feels so unnatural. Maybe eclipse can give many more features like variable checking in the current scope but I found that you also pay a price for that integration. There is no free lunch. -- Nikola On Fri, May 10, 2013 at 10:43:43PM +0200, David Schmitt wrote: On 10.05.2013 17:08, Nikola Petrov wrote: +1 The vim plugin is the best you can find if you are already proficient in vim somewhat. I use it in conjuction with https://github.com/SirVer/ultisnips and it can't be better. I found the eclipse too heavy for my needs(although I use it for java development where it shines) Please satisfy my curiosity: how many puppet modules and/or .pp files do you currently have? Regards, David -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Using Puppet to trigger a script when error occurs on log file
You shouldn't search support for this in puppet but in something like monit, upstart or nagios handlers. Puppet isn't suitable for this task although it might be possible it will be hacky. -- Nikola On Tue, May 07, 2013 at 08:19:04AM -0700, Nicola Zanetti wrote: Hello everyone, I'm using Puppet on my Ubuntu servers and I would like it to restart a process whenever an error occurs while running an application. The error can be detected looking at the logs of the application of course, but I don't want to parse the log file to detect it. Is there a way using Puppet, to trigger a script when something happens in a log file without having to parse it ? Many thanks for your support, Best, Nicola -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] What do YOU do to catch undefined variables
+1 The vim plugin is the best you can find if you are already proficient in vim somewhat. I use it in conjuction with https://github.com/SirVer/ultisnips and it can't be better. I found the eclipse too heavy for my needs(although I use it for java development where it shines) -- Nikola On Tue, May 07, 2013 at 08:41:42AM +1000, Peter Brown wrote: On 3 May 2013 06:43, Larry Fast lfast1...@gmail.com wrote: I'm still a puppet newbie and these days I'm struggling with undefined variables. At least once a week I hit an error message like this: Error: Failed to apply catalog: '' is not qualified and no path was specified. Please qualify the command or specify a path. IMO, the core issue is that Puppet has no mechanism for reporting read attempts on undefined variables. So my question to the community is, what do YOU do to catch undefined variables? If anyone has a first class solution I'd love to hear it. But I'm also happy to consider ANY means to detect undefined variables. I may resort to explicitly listing all my variables and checking them with a custom ruby function. I use vim with vim-puppet (and a bunch of other vim plugins). It does syntax highlighting and does syntax and a few other check on saving a file and lets you know if something is amiss. I tried Gepetto but I can't us that over an ssh connection to a server if I need to. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] How to indicate multiple dependency?
Are those packages defined in different files? If they are in the same file you can just do the following package {['pgk1', 'pkg2']: ensure = 'installed', } - file { 'file1': ... } If they are in different files you maybe will be able to hack something with the spaceship operator but it will hard and might brake in the future because of circular dependencies :( -- Nikola On Wed, May 08, 2013 at 03:52:44AM -0700, Bret Wortman wrote: What's the right/best way to indicate that a particular entry in a manifest (a file in this case) depends on successful installation of over 30 packages, all indicated in the same manifest? I could do this, but it seems cumbersome: package { 'pkg1': } Package['pkg1'] - File['file1'] package { 'pkg2': } Package['pkg2'] - File['file2'] : : file { 'file2': path = '/path/to/file2', : } There must be a better way that I'm just not seeing. Thanks! Bret Wortman -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] [ANN] puppet-cleaner 0.2.0
Looks good to me. I will try to integrate this with the vim puppet support. Nice work -- Nikolavp On Tue, Apr 30, 2013 at 5:51 PM, Gerardo Santana Gómez Garrido gerardo.sant...@gmail.com wrote: Hi Chris, you're right. I've fixed the README.md. Thanks! El lunes, 29 de abril de 2013 22:58:50 UTC-5, Chris Hirsch escribió: On 4/29/13 7:43 PM, Gerardo Santana G�mez Garrido wrote: This release was tested successfully with puppet 3. If I understand correctly this should be compatible with puppet 3 so you may want to update your Requirements as it says it's 2.7.11 only. Thank for the work I'll be checking this out tomorrow! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] install multiple versions with gem provider
Yes it is possible with defines. You also should include the version number in the name of the gem that is produced. This will allow you to install multiple version of the same package. If you give more info about your setup we might help you even more -- Nikola On Tue, Apr 09, 2013 at 07:03:36AM -0700, Marc Genou wrote: We usually run apps with a couple of versions of the same gem. Is it possible to do that with an only manifest? PS: I am a little noob with puppet yet -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Coding style best practise
Strangely enough, I lately started to move my params out of params classes and into the init class. I really prefer to have example::param1 in my hiera instead of the example::params::param1. Will be glad to hear what the params class actually buys you as a pattern. For me the params class makes more sense when you don't have hiera or ENC in place. I remember using it because it was used as a standard and I found it as a nice pattern on the internet. Will be glad to hear more on this one too so +1 -- Nikola On Thu, Apr 04, 2013 at 12:38:47PM +0200, Thomas Bendler wrote: Hi @all, I've started rewriting some of my modules to achieve separation of logic and data. So I did some standard layout with init.pp and params.pp for default values and parametrized classes for individual configuration like this: class example ( $parameter1 = hiera('example::parameter1', $example::params::parameter1), $parameter2 = hiera('example::parameter2', $example::params::parameter2)) inherits example::params { # Some coding } I s this approach generic enough or will a different coding style be a better approach with more use cases in mind? What do you think, any suggestions? Regards Thomas -- Linux ... enjoy the ride! -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] calling_module vs module_name ?
Calling module can serve you well if you have a reusable define that is defined in module that is not the same from the one that it is used in. I hope this makes sense... Most of the time I won't recommend this for a hierarchy as it can be hard to reason about it... Best, Nikola On Tue, Apr 02, 2013 at 09:51:17PM -0700, Kubes wrote: In using Hiera, what is the difference between calling_module and module_name? Which is should be used? :hierarchy: - %{environment}/%{calling_module}/common - %{environment}/%{module_name}/common Thanks -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] before and after not being honoured
I think that this is because classes are not applied but are declared. Check the anchor pattern and declare that an puppet::start is declared before the file. I can give you more info when you actually give us the puppet class itself. You can find more info about the anchor pattern here http://projects.puppetlabs.com/issues/8040 and https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/lib/puppet/type/anchor.rb -- Nikola On Tue, Apr 02, 2013 at 09:13:23AM -0700, Dave Bell wrote: Hi, I'm running puppet 3.1.1 I have something similar to the following configuration. class my_roles::puppet_master { file { '/etc/default/puppetmaster': ensure = present, source = 'puppet:///modules/my_roles/puppetmaster/etc/default/puppetmaster', #before = Class['puppet'], } class {'puppet' : require = File['/etc/default/puppetmaster'], } } I would expect that the file type gets applied before the class type further down. I've tried both the before, and the require keywords, but no matter what, they never get honoured. I could use the stage's to force the puppet class into a stage after main, but that really shouldn't be necessary here. Does anyone have any ideas about what I'm doing wrong? Regards, Dave -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Ruby (Rack) application could not be started
Yep. Sometimes I even wonder why are people considering other options. By default I installed the packages from puppetlabs and I have forgotten about it. P.S. I even think that puppetDB should install with postgresql by default. It scales better debugging is much better and maintenance too. Best, Nikola On Tue, Apr 02, 2013 at 01:08:29PM +0100, Ken Barber wrote: This is me installing a puppetmaster for Ubuntu with the bog-standard apt repos the other day - took less than 5 minutes: https://gist.github.com/kbarber/5209267 As you can see it was pretty straight-forward (apt-get install puppetmaster-passenger, more or less) - note this was a clean Ubuntu 12.04 installation, so do start fresh as Felix suggests. I haven't got a gist of an installation with the puppetlabs repos recently, but it should be similar - only include the Puppetlabs repos first: http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html#for-debian-and-ubuntu The puppetlabs repos will give you the latest version of Puppet which is probably the way to go. Note I never: * Installed passenger from brightbox * Installed using any gems * Made any manual changes (at least not with my basic setup, your mileage may vary) So either use the stuff hosted by Ubuntu, or by PL and you should be good. Let us know how you go. ken. On Tue, Apr 2, 2013 at 12:54 PM, Felix Frank felix.fr...@alumni.tu-berlin.de wrote: Hi, On 03/26/2013 08:11 PM, thinkwell wrote: Puppet runs always generating scads of errors http://thinkwelldesigns.com/errors2.html.Is Passenger enabled? Well, the error is titled with Passanger so I'd say yes ;) The error also advises to check the webservers's logfiles. Have you? If apache logs aren't helpful, there may be something on the puppet side of things. Rack applications may do some logging of their own. This. Is. Getting. To. Be. One. *S**crming.*Pain. Dude. Thanks for your help Ramin, but why oh why can't we have up-to-date documentation that gives correct step-by-step installation directions? How esoteric does this have to be? I've found that ruby applications can be made to be very portable, but the more so if you do *everything* the intended ruby way. With the different OS environments, there are lots of half-assed compromises (e.g. install some software through packages, others through gems etc.) and the howto's will often reflect the respective author's personal preference with regards to the respective details. Also, they want to keep things simple between differen OS releases. Long story short, I concur that in Debian (Ubuntu propably the same), getting Passenger via packages is a better choice than gems. I cannot comment on 3.x vs. 2.x, but I've seen good mileage with the stock Debian packages for apache/passenger (not tried a 3.x master yet, though). Sadly that won't match the docs exactly, but I think this should be painless enough: - start from scratch - get the components via apt - apply the configs from the howto as best you can - clean up the leftover errors from the discrepancies HTH, Felix -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Confirming nodes and assigning classes in puppet dashboard
You can look into foreman. I think that this is the best you can get for newbie maintenance support. -- Nikola ;) On Thu, Mar 28, 2013 at 05:18:55PM +0400, Max Lapshin wrote: I want to setup puppet or chef, or whatever else to help deploy system to a person, that doesn't know how to write that strange words in command line. So I want to have a proper copy-paste that should be launched as a root on target machine and web interface where configuration will happen. I understand that I must edit some recipes by hands, no problems, but after this I want admin to be able to confirm certificate requests on one click and assign nodes. Is it possible with dashboard? -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Rake tests for hiera
This seems like a good idea and something I should look at. The problem is that there are third party modules which use hiera and I should redefine parameters and pass them along in my classes. But it this is indeed doable ;) -- Nikola On Thu, Mar 28, 2013 at 04:36:55PM +, Wolf Noble wrote: What we've been doing here is trying to make all our hiera calls as class parameter default values. This allows us to set param values in the unit tests, thus bypassing hiera. This has required some refactoring, but it has the advantage of being a simpler test collection to implement. Does this paradigm not work for you? On Mar 27, 2013, at 7:13 AM, Nikola Petrov nikol...@gmail.com wrote: +1 Last time I tried writing tests, I just gave up because we started using hiera -- Nikola On Fri, Mar 22, 2013 at 06:26:09PM +0100, Maarten Thibaut (mthibaut) wrote: Hi, I'm having a hard time figuring out how to make rake spec tests work correctly with hiera and puppet 3. Should I just give up for now until the various gems work with puppet 3? -- maarten -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Augeas lens dependency on valid config file parsing
I think that this is mostly because of lens that are written this way. We shouldn't blame them that this is poorly written in my opinion. It is just more restrictive. Lens that I have written accept a regular expression as an identifier instead of listing them. Best, Nikola On Fri, Mar 22, 2013 at 03:02:51PM +1100, Gonzalo Servat wrote: Hi All, I just ran into a frustrating Augeas problem, which I thought I'd share with you all. We run a cron every morning to fetch the latest RPMs (for the packages we're interested in) from various places such as rpmforge, EPEL, etc. This morning I tried to build a VM and it failed. What happened was that last night, a new version of nagios-nrpe was downloaded so the VM that was built had this latest version. The RPM includes nrpe.cfg which had a new option added to it: allow_bash_command_substitution=0 In the manifest, I have an augeas block to modify the allowed_hosts line in the nrpe.cfg file. Puppet was failing giving a Save failed error message, so I went in via augtool to see what's going on. I noticed that it could not parse nrpe.cfg (i.e. ls /files/etc/nagios returned nothing). I had the previous config file saved for NRPE somewhere, so I diff'ed them and noticed the only new option is the option I mentioned above. After removing this new option, augtool could parse the file again and Puppet was happy. After having a quick read of the nrpe.lns file inside augeas-libs, I noticed it actually lists each of the options that it will recognise from the config file, and evidently fails if it finds new options that it doesn't recognise. Anyway, it hit me that there is quite a big dependency between config files and augeas lenses. A change in one config file can affect Augeas which affects Puppet runs. Or is this just a poorly written lens? - Gonzalo -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Discover SO of my nodes
You have two options(that I am aware of): 1) https://puppetlabs.com/mcollective/introduction/ 2) you can query your storeconfig option(in my case puppetdb + postgre). -- Nikola On Tue, Mar 05, 2013 at 07:06:03AM -0800, Tiago Cruz wrote: Hello all! Using puppet 2.7.9 and Dashboard, I can see the hostname of my nodes. With some selects against MySQL, I can also discover their IP address. But that is any way to discover more details, like, with OS is running on that node? Thanks a lot!! Tiago C. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet MySQL Module
You can use the database_grant resource type. Here is an example: database_grant { ${user}@${::hostname}/${db}: privileges = ['select'], # anything you want require= Database_user[${user}@${::hostname}], } set the $user and $db variables to what you want ;) More information can be found on the github README file for module. -- Nikola On Tue, Mar 05, 2013 at 09:21:28AM +0100, Arnau Bria wrote: Hi all, I'm using the MySQL module https://forge.puppetlabs.com/puppetlabs/mysql and I can't find the way to give certain permission to a secondary user over an already created DB (which has it own user): mysql::db { 'galaxy': user = 'galaxy', password = 'XX', host = 'localhost', grant= ['all'], } Now I would like to give select privileges on galaxy DB to user arnau, but I can't find the way for doing so. Could someone give a hand? TIA, Arnau -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Glassfish automatic installation in Puppet
Not sure if this will help you at all but you can try the yes[1] command. Try to change your exec to: exec { 'glassfishInstaExe': command = '/usr/bin/yes | /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar', cwd = '/gx/mnt/software/Vidispine/Components', } [1] http://en.wikipedia.org/wiki/Yes_(Unix) -- Nikola On Tue, Feb 26, 2013 at 12:22:18AM -0800, Jithin Xavier wrote: Hi All, Can any one help to install my jar file automatically, When I tried to install /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar,its is asking for confirmation like Accept or Decline? [A,D,a,d]. So how can I pass answer with command. Please find my puppet code below exec { 'glassfishInstaExe': command = /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar, cwd = /gx/mnt/software/Vidispine/Components, } Thanks, Jxavier -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Glassfish automatic installation in Puppet
Please run the command outside of puppet or run puppet with --debug --trace to see what failed. Error status code of 1 can be anything on earth ;) -- Nikola On Tue, Feb 26, 2013 at 02:56:18PM +0530, Jithin Xavier wrote: Thanks Nikola, for some reason its not working.. I am getting this error now err: /Stage[main]/Vidispine/Exec[glassfishInstaExe]/returns: change from notrun to 0 failed: /usr/bin/yes | /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar returned 1 instead of one of [0] at /etc/puppetlabs/puppet/modules/vidispine/manifests/init.pp:17. Thanks, Jithin On Tue, Feb 26, 2013 at 2:04 PM, Nikola Petrov nikol...@gmail.com wrote: Not sure if this will help you at all but you can try the yes[1] command. Try to change your exec to: exec { 'glassfishInstaExe': command = '/usr/bin/yes | /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar', cwd = '/gx/mnt/software/Vidispine/Components', } [1] http://en.wikipedia.org/wiki/Yes_(Unix) -- Nikola On Tue, Feb 26, 2013 at 12:22:18AM -0800, Jithin Xavier wrote: Hi All, Can any one help to install my jar file automatically, When I tried to install /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar,its is asking for confirmation like Accept or Decline? [A,D,a,d]. So how can I pass answer with command. Please find my puppet code below exec { 'glassfishInstaExe': command = /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar, cwd = /gx/mnt/software/Vidispine/Components, } Thanks, Jxavier -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- -Regards Jithin Xavier +91-9739505163 Skype- jithinxavi in.linkedin.com/in/jithinxavier/ -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Glassfish automatic installation in Puppet
Well check the same command (yes) and it's man page yes A | shell-script should give you what you want -- Nikola On Tue, Feb 26, 2013 at 03:37:50PM +0530, Jithin Xavier wrote: This command /usr/bin/yes | /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar --debug --trace not giving me any useful information. Glassfish installation is asking for, *Accept or Decline? [A,D,a,d]*.. So we wanted to answer this question. is there anyway to answer for this through command line? Thanks, Jithin On Tue, Feb 26, 2013 at 3:01 PM, Nikola Petrov nikol...@gmail.com wrote: Please run the command outside of puppet or run puppet with --debug --trace to see what failed. Error status code of 1 can be anything on earth ;) -- Nikola On Tue, Feb 26, 2013 at 02:56:18PM +0530, Jithin Xavier wrote: Thanks Nikola, for some reason its not working.. I am getting this error now err: /Stage[main]/Vidispine/Exec[glassfishInstaExe]/returns: change from notrun to 0 failed: /usr/bin/yes | /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar returned 1 instead of one of [0] at /etc/puppetlabs/puppet/modules/vidispine/manifests/init.pp:17. Thanks, Jithin On Tue, Feb 26, 2013 at 2:04 PM, Nikola Petrov nikol...@gmail.com wrote: Not sure if this will help you at all but you can try the yes[1] command. Try to change your exec to: exec { 'glassfishInstaExe': command = '/usr/bin/yes | /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar', cwd = '/gx/mnt/software/Vidispine/Components', } [1] http://en.wikipedia.org/wiki/Yes_(Unix) -- Nikola On Tue, Feb 26, 2013 at 12:22:18AM -0800, Jithin Xavier wrote: Hi All, Can any one help to install my jar file automatically, When I tried to install /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar,its is asking for confirmation like Accept or Decline? [A,D,a,d]. So how can I pass answer with command. Please find my puppet code below exec { 'glassfishInstaExe': command = /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar, cwd = /gx/mnt/software/Vidispine/Components, } Thanks, Jxavier -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- -Regards Jithin Xavier +91-9739505163 Skype- jithinxavi in.linkedin.com/in/jithinxavier/ -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to a topic in the Google Groups Puppet Users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/0i1ChNoJSKA/unsubscribe?hl=en . To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- -Regards Jithin Xavier +91-9739505163 Skype- jithinxavi in.linkedin.com/in/jithinxavier/ -- You received this message because you are subscribed to the Google Groups Puppet Users group
Re: [Puppet Users] Regd applying condition
Check the creates in the exec documentation. It will make the exec type to execute as long as the file *doesn't*exist -- Nikola On Sun, Feb 24, 2013 at 11:04:16PM -0800, yarlagadda ramya wrote: Hi all, This is the class i have written for downloading and installing jdknow i want to apply a condition using if for it such that...this downloads the file and installs it only if the jdk1.6.0_24.tar.gz file is not present in the specified directory...am trying for it...but not getting..can any one plsss help me with this class maininstall { $software = /app/tcs/puppetdemo/software $server = /app/tcs/puppetdemo/server $URL = http://192.168.24.171:8080/softwares/jdk1.6.0_24.tar.gz; $file = /app/tcs/puppetdemo/software/ exec{download_jdk: command = /usr/bin/wget $URL, cwd = $software, } exec {untar_jdk: command = /bin/tar -C /app/tcs/puppetdemo/server/ -zxf /app/tcs/puppetdemo/software/jdk1.6.0_24.tar.gz, cwd = $server, } Exec['download_jdk'] - Exec['untar_jdk'] } } -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Retrieving the name of the module where a define is used
Well you can use calling_module and also all the variables defined in http://docs.puppetlabs.com/puppet/latest/reference/lang_variables.html#facts-and-built-in-variables Not sure why calling_module is not there at the moment. There might be two reasons for this: * it is more experimental * it is older and $caller_module_name should be used instead(look at the link) Maybe someone can step in and make this more clear to both of us ;) -- Nikola On Thu, Feb 21, 2013 at 09:20:57PM +0530, Francis Pereira wrote: Thanks Nikola. I didn't know that variable exists. Is there a list of all available variables somewhere ? ~Francis On Feb 21, 2013, at 8:49 PM, Nikola Petrov nikol...@gmail.com wrote: Nikola -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Retrieving the name of the module where a define is used
Try using the variable *caller_module_name* instead file { ${cachedir}/${source}: source = puppet:///modules/${caller_module_name}/${source}, require = File[$cachedir], } -- Nikola On Thu, Feb 21, 2013 at 07:33:00PM +0530, Francis Pereira wrote: How do I retrieve the name of the module where a define is used ? Consider the following file java/manifests/setup.pp define java::setup ( $source= undef,){ file { $cachedir: ensure = 'directory', owner = 'root', group = 'root', mode = '644' } file { ${cachedir}/${source}: source = puppet:///modules/${module_name}/${source}, require = File[$cachedir], } # stripped out for readability } file mywebapp/manifests/init.pp # stripped out for readability java::setup { 'mywebapp-java': source= 'jdk-7u7-linux-x64.gz', } # stripped out for readability I want the source to be constructed as puppet:///modules/mywebapp/jdk-7u7-linux-x64.gz instead of puppet:///modules/java/jdk-7u7-linux-x64.gz ~Francis -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Download and unzip to install a webapp
I can advice you to use fmp[1] for this and build a native debian package for your distribution. The tool also supports rpm with the same configuration almost all the time(at least for me). I think that with fpm, you shouldn't *ever* use a zip again. I have a bunch of Makefiles that build my packages and the life is so much better this way. If you prefer other build systems you can use them too ofc. Best, Nikola [1] https://github.com/jordansissel/fpm/wiki On Sun, Feb 10, 2013 at 11:09:10PM +0100, Andreas Hilboll wrote: Hi, I would like to install Piwik [*], which is a PHP webstatistics package, on some of my nodes, using Puppet. The underlying servers are running Debian Squeeze. Piwik is distributed as a .zip or .tar.gz file, which is available at their website. They provide a constant URL always pointing to the latest release: http://builds.piwik.org/latest.zip How can I download and unzip this package to a defined location on my nodes, changing the UID/GID of the unzipped files from root to www-data? Your help is greatly appreciated! Cheers, Andreas. [*] http://piwik.org/ -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Certificate nightmares
I think this should be put somewhere in a wiki or the docs. /me referencing this email for future Best, Nikola On Fri, Feb 08, 2013 at 03:58:22PM -0800, Nick Fagerlund wrote: If a brand new never-seen-before agent starts up, it goes like this: * Do I have a private key? Nope? Better generate one. * Okay, do I have a certificate? Nope? See if the master already has one for me. This looks like a GET request to /certificate/node name. * If it gets one, it's good to go. * Master didn't give me a cert. Okay, have I submitted a certificate signing request before? Look in $ssldir/certificate_requests for my own name. * If there's one there, it bails and waits, assuming it's waiting for the master to sign that thing. * Okay, there's nothing there, but maybe I developed amnesia. Better ask the master if I've asked for one. This looks like a GET request to /certificate_request/node name. * If the master says it's already asked, it will just bail and say I'm still waiting for that. * Okay, I never even asked for a cert, it looks like. Well, time to ask for one. This looks like a PUT request to /certificate_request/node name. * Now if autosign is turned on, it can GET /certificate/node name and continue; otherwise it'll bail and go through this whole process again next time, in which case it says yes I have a private key, no I don't have a cert and gets to work on the second step above. What I'm seeing in that snippet from your log is that it seems to think it has submitted a certificate request before. I just tested with my own machines, and it looks like if your agent still has a $ssldir/certificate_requests/name.pem file sitting around (and crucially, it doesn't automatically destroy these when it gets a cert, so if it used to have a cert and you didn't nuke the whole SSLdir, it's probably there), it asks for a cert but doesn't ask the master if it's ever asked for a cert. So check that certificate_requests dir and nuke it if there's anything there, then get back to us? On Wednesday, February 6, 2013 10:23:28 AM UTC-8, Bret Wortman wrote: My test node doesn't have its certs either. I've now started puppetmaster in verbose mode: # puppet master --no-daemonize --verbose : : : Info: Could not find certificate for 'nodename.my.net' Info: Could not find certificate for 'nodename.my.net' Info: Could not find certificate for 'nodename.my.net' This will repeat three times whenever I try to connect. For another node that tried to connect while I was testing, I get something more sinister: Warning: Denying access: Forbidden request: othernode.my.net(10.0.0.1) access to /file_metadata/plugins [search] at :99 Error: Forbidden request: othernode.my.net(10.0.0.1) access to /file_metadata/plugins [search] at :99 Info: access[/]: defaulting to no access for othernode.my.net Also repeating four times; one [search], two [find]s and a [save]. On Wednesday, February 6, 2013 1:18:52 PM UTC-5, Wolf Noble wrote: Did you try removing the cert from a node and seeing if that changes the behavior? you removed the certs from the master, but the node still thinks it has a valid cert maybe? This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] RFC: Default File Permissions
I have seen this issue for sure many times. I always forget this and when I see it while running with --noop, I change the owner and the group on the file resource. I am +1 on fixing this to have a more deterministic behaviour Best, Nikola On Thu, Feb 07, 2013 at 05:48:58PM -0800, Josh Cooper wrote: Recently, the issue of copying file modes from remote sources was discussed on the puppet-users mailing list[1], although it equally applies to owner and group. One issue is what permissions to apply to newly created files when none are specified? Historically, Puppet has always copied the permissions from the file source to the newly created one. However, this causes problems on Windows[2] agents due to the way that Puppet emulates POSIX permissions. We break NTFS access control inheritance to ensure the effective permissions are not greater than what Puppet has granted. It also causes problems on *nix agents, when the files' source is remote and uid/gids are not synchronized. A second, but related issue, is that Puppet applies the same copy-permissions logic to files that already exist. This goes against what jcbollinger said, unmanaged resources and resource properties should not be modified by Puppet[3], and what Nigel said, A core principle of Puppet is that you can choose to only manage the attributes of a resource that you care about, and can leave the rest unmanaged.[4] However, this bug has been around so long, at least 0.24.8, that we can't change behaviors in a minor release.[5] Patrick and I talked about this and would like to propose adding a file parameter, something like `use_source_permissions`. If true and permissions are unspecified, Puppet would continue copying source permissions as it does today, for both newly created and existing files. This would be the default. If false and permission are unspecified, Puppet would never copy them from the source. Instead the permission defaults for newly created files would be based on the user that Puppet is running as. And the permissions for existing files would be unmodified. Doing so would provide a mechanism for resolving both #5240 and #18931. Comments and feedback welcome. Josh [1] https://groups.google.com/forum/#!msg/puppet-users/CI7pEUHknm4/x-hCGJn6Ms8J [2] https://projects.puppetlabs.com/issues/18931 [3] https://groups.google.com/d/msg/puppet-users/CI7pEUHknm4/VtCl9YmeIS0J [4] http://projects.puppetlabs.com/issues/5240#note-16 [5] https://projects.puppetlabs.com/issues/5240 -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Re: directory mode
On Thu, Jan 31, 2013 at 05:58:55AM -0800, jcbollinger wrote: On Thursday, January 31, 2013 1:11:25 AM UTC-6, Kubes wrote: Hello, I am trying to set all the directroes in the tree to 775 and files to 664 with Puppets fie resource. This woks fine with native chmod: # chmod -R a=r,ug+Xw,o+X But if I us this in puppet all is set to 775 file { /etc/puppet: ensure = directory, recurse = true, ignore = .git, owner = $puppet::params::puppet_user, group = $puppet::params::puppet_group, mode = 'a=r,ug+Xw,o+X', } I have also tried mode = 'a=r,ug+X,ug+w,o+X', no luck either, same result 775. Just use mode= '644'. Puppet will turn on the execute bits on the directories automatically. John mode = '0644' ^ it is a good idea also write the 0 there just to make it clearer -- Best, Nikola -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] Puppet service
On Tue, Jan 29, 2013 at 07:21:06AM -0500, Mamta Garg wrote: HI All, Can any anyone please help me with attached screenshot. Actually i am not able to lauch puppet dashboard and when i have tried to running below command ,getting error. puppet resource service puppet ensure=running enable=true Hi, I suspect that you forgot the screenshot as I cannot see it -- Nikola -- You received this message because you are subscribed to the Google Groups Puppet Users group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: [Puppet Users] VMware investment in Puppet Labs
On Wed, Jan 23, 2013 at 07:25:18AM -0800, Luke Kanies wrote: Hi all, I'm proud to announce that VMware has invested $30 million in Puppet Labs: http://puppetlabs.com/blog/vmware-invests-30-million-in-puppet-labs/ This investment is about continuing to enable us to invest and grow, staying on the track of being a great, independent company. Just like when we announced OpenStack support, we're not suddenly switching to being a VMware company, a cloud company, a virtualization company - we're staying an infrastructure management company that supports massive heterogeneity. Please contact me if you have any questions. Thanks, Luke Glad to hear that you are receiving funding for the great job that you are doing. -- Nikola ;) -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] WebRick role
On Tue, Jan 08, 2013 at 06:47:55AM -0800, jcbollinger wrote: On Monday, January 7, 2013 11:44:00 AM UTC-6, Garrett Honeycutt wrote: Webrick is useful for doing a demo and learning about Puppet with a couple of nodes. It is not at all meant to scale and if you attempt to run your eight agents, you are likely to have performance issues. If this is a production level deployment, you should look at Apache with Passenger. Only eight? I have webrick reliably serving in excess of 50 clients, all updating at the default rate of twice per hour. Webrick's biggest problem is not performance *per se*, it's lack of multiple threads. Apache / passenger does not make Puppet faster; it just runs more instances and handles contemporaneous requests more gracefully. Thus it improves *throughput* when there are enough system resources behind it, but that's not exactly the same thing as performance. I think webrick works well for me because my manifests change infrequently and are fairly quick to compile (even though the master is not particularly well-provisioned). In that context, the master can serve catalog requests quickly enough that clients rarely time out, despite webrick's single-threaded nature. All true. My recommendation for a new Puppeteer would certainly be to start out with webrick, since it works out of the box with no additional software or configuration. Switch to Passenger or something more capable only when webrick becomes inadequate. When that will be depends a lot on the manifests involved, the hardware underneath, the number of clients, and the request frequency. Passenger works out of the box too here. I just install it from the provided packages. It is a no brainer -- Nikola -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Apply manifests on Puppet Managed Nodes from Puppet Master and appending to an existing file
On Mon, Dec 31, 2012 at 08:51:55AM -0500, Adam Goucher wrote: On 2012-12-31 7:21 AM, Sivaraman Viswanathan wrote: Hello All, I have written a manifest which will upgrade the JAVA to a recent version (ex: JDK 6u33 to JDK7) using exec type. The installation is nothing but untarring the tar.gz file into a predefined folder and setting the JAVA_HOME and PATH variables in the user's bash_profile file. 1. Now I have to upgrade around 30 servers. Is there anyway that I can apply these manifests into the nodes from puppet master itself? Many of the examples that I found says that we have to login to the node and execute the command puppet agent update command. But doing this in all the managed nodes is tedious. Is there an easy way to accomplish this? You could set up the agent to poll the master periodically. 2. The bash_profile contains other text in them. How can we append these new variables (JAVA_HOME) into the existing file without changing the other parts of the file? What I would look at is creating a .java_settings file that sets your JAVA_* and have that sourced from the .profile. That way you could have puppet manage that file in its entirety and not the user's .profile. -adam Yep You can also use the /etc/profile.d directory which is sourced in /etc/profile at least on Arch and Ubuntu. Best, Nikola -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: How to manage puppet modules? git submodules? hg subrepositories? own solution?
On Thu, Dec 20, 2012 at 01:28:04PM -0500, Mason Turner wrote: We are still using svn, but looking on adapt this to git next year. This is a simplified view of our svn repo: - nodes -- dev --- trunk --- tags 20121220-121212 -- prod --- trunk --- tags - modules -- apache --- trunk --- tags 20121220-121212 -- something_else --- trunk --- tags 20121220-121212 We then have a utility (link_puppet) that: Can you please post the link_puppet utility. I will be happy if we can burrow some code and not start from scratch on almost the same setup(we are doing it manually at the moment) Best, Nikola -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Question on modeling multiple services sharing configuration
On Mon, Dec 17, 2012 at 10:47:36PM -0800, Roman Shaposhnik wrote: On Mon, Dec 17, 2012 at 6:46 AM, Nikola Petrov nikol...@gmail.com wrote: You have a bunch of options for this if I understand you well. You can one of the following: * use augeas with virtual resources * use the concat module Understood. I'm leaning heavily towards augeas at this point (although I'm a bit scared of throwing various XML at it). If stock augeas doesn't pan out I think I'm going to go with the most basic solution of all -- having a template with easy markers and doing a bunch of exec's of sed -i (wrapped in a nice custom resource of course ;-)). * use the standard template function with multiple arguments; look at http://docs.puppetlabs.com/guides/templating.html and scroll down to Combining templates You lost me there -- would you mind elaborating how these type of 'Combining templates' could be useful in my case? I hope that I understood you correctly in the first place - otherwise ignore my advice :). You want to aggregate a common configuration file for *all* of your services so you want one of the following: * combine all config files to look them in one place - this is easily done with templates if you have a bunch of service classes class service1(...) {...} class service2(...) {...} each of these has a template for it's configuration(with params and what not). You then just call the template function with all of them and they will be concatenated. In the case of the XML you might get clever and include a pre and post templates to get a proper tree * you want to provide a common config file for sane defaults and then override some of the settings in each service. This can be done again with templates - it is a bit harder and it might be slower for your taste but it is still doable - you define some kind of virtual resource for sub templates and then realize only those that you see fit. Note that both are almost the same(if not the same) as the concat plugin. So you might just better use the already working implementation from there. -- Nikola -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Question on modeling multiple services sharing configuration
You have a bunch of options for this if I understand you well. You can one of the following: * use augeas with virtual resources * use the concat module * use the standard template function with multiple arguments; look at http://docs.puppetlabs.com/guides/templating.html and scroll down to Combining templates Best, Nikola On Sat, Dec 15, 2012 at 10:09:51PM -0800, Roman Shaposhnik wrote: Hi! I would appreciate any advice on the best practices on how to model a collection of services that each has its own configuration file, but also share a common one. Now, the trouble is, that the common configuration file is not *really* just a place for the common configuration to reside, but also may have sections dedicated to holding properties of a particular service (just like /etc/puppet/puppet.conf has [main] [agent] and [master] sections). Thus, in reality, the configuration properties are per service and whether they need to go into a common configuration file or a service-specific one is NOT cleanly partitioned and is pretty awkward to remember. Which means I really don't want to expose the common config explicitly to the end user. Instead, I'd like to expose the natural hierarchy of: class service1($foo, $bar, $baz) { } . class serviceN($qoo, $zoo) { } but the question then becomes -- how can I model a common configuration file behind user's back so that $foo, $bar and $qoo end up there. At first I was thinking that I could utilize a singleton non-parameterized class and include it multiple times in all of the serviceX class definitions, but it seems I can't pass any values into it. I suppose I can still do that and create a skeleton of the common config in that singleton class that would later be manipulated either by augeas or concat patterns, but this seems to be pretty heavyweight. What would you, guys, recommend? Thanks, Roman. -- 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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Help with PuppetDB
On Fri, Dec 07, 2012 at 08:27:14AM -0800, Nishant Jain wrote: Hello Everybody, I am trying to install the puppetdb on the same machine as am running my puppetmaster. I am getting the following error when am trying to connect the agent: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to submit 'replace facts' command for ftldwshost180.wsdev.citrix.com to PuppetDB at 10.12.14.85:8081: Connection refused - connect(2) Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Can anybody tell me how to resolve this error??? System Information: Red Hat Enterprise Linux Server release 5.8 (Tikanga) puppet 3.0.1 puppetdb 1.0.4 Can you please post your routes.yaml file. Also what is the content of the puppetdb log and the log from the master. Also did you run puppet agent -t for initial ssl authentication before configuring puppet? -- Nikola I have installed and made the changes for the pupeptdb according to the following link: https://github.com/puppetlabs/puppetdb I think the error is related to the ssl certificates?? The output with running trace is as follows: gnoring --listen on onetime run Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 400 on SERVER: Could not retrieve facts for ftldwshost180.wsdev.citrix.com: Failed to find facts from PuppetDB at 10.12.14.85:8081: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A Info: Retrieving plugin Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to submit 'replace facts' command for ftldwshost180.wsdev.citrix.com to PuppetDB at 10.12.14.85:8081: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A /usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:65:in `deserialize' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/rest.rb:121:in `find' /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:191:in `find' /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:243:in `retrieve_new_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:348:in `thinmark' /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:347:in `thinmark' /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:242:in `retrieve_new_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:67:in `retrieve_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:107:in `prepare_and_retrieve_catalog' /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:159:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:45:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/agent/locker.rb:20:in `lock' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:45:in `run' /usr/lib/ruby/1.8/sync.rb:230:in `synchronize' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:45:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:119:in `with_client' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:42:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:84:in `run_in_fork' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:41:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:175:in `call' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:175:in `controlled_run' /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:39:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:338:in `onetime' /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:311:in `run_command' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:438:in `plugin_hook' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:500:in `exit_on_fail' /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:346:in `run' /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:76:in `execute' /usr/bin/puppet:10 Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Thanks, Nishant -- 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/-/TnpW5FYiUnMJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] custom define type for array with 'case' argument pass to it
You should consider using a good editor which will show those error for you. You can incorporate puppet-lint for example and it will spot most of the problems and warn you about the double quotes for performance and clarity reasons. Hope that helps :-) Best, Nikola On Wed, Dec 05, 2012 at 04:19:35PM -0800, iamauser wrote: No worries. Your comment helped me to notice the dollar sign in front of the linkcase. That actually solved the issue. Now it works and yes, I have added a default case as well :) Thanks On Wednesday, December 5, 2012 6:16:55 PM UTC-6, Jakov Sosic wrote: On 12/06/2012 12:58 AM, iamauser wrote: First of all, I didn't copy paste my code, rather typed it here, so indentation should be ignored. You are right, dollar sign shouldn't be there, and I think it was a typo on my part that I failed to notice. I disagree with your comment about singlequote or doublequote for var. That shouldn't be an issue here as it will consider this as string of characters. Sorry if my comments sounded harsh, I didn't mean to offend you. Just urge you to incorporate those tools into your daily practice, which would save you a lot of time and nerves ;) -- 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/-/I07DoBUDI_gJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Use random value from an array in a template
You should really think about this more closely. Imagine you had the *rand* function that gives you an integer from 1..3 now if you define $ipaddress = rand() in your manifest you will now generate a new ipaddress on each puppet agent run. If you want that we can tell you how to do it(I even think it is in the example at puppet custom function) P.S. I had to learn this the hard way by trying to balance a cassandra cluster with proper initial_tokens. Best, Nikola On Tue, Dec 04, 2012 at 08:44:03AM -0800, Matthias Kellermann wrote: Hi there, I have a network service with three IP addresses. For my client config file I want to choose a random IP addresses of the three available addresses (round robin via DNS won't work..). Is there a way to use a random IP from an array in a puppet template? Thanks and best regards, Matthias -- 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/-/8PrcZfi0VMkJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Puppet Nagios/NRPE with Plugins...
Well you can tell puppet to source a whole directory and put it somewhere for you. Here is an example from our nagios application specific manifest snip class app { #install the app package include app::install include base #generic nagios checks like memory, load, etc include nagios::target #application specific checks file {'/usr/local/nagios': ensure = 'directory', } file {'/usr/local/nagios/libexec/': ensure = 'directory', recurse = 'true', #enable recursive directory management purge = 'true', #purge all unmanaged junk force = 'true', #also purge subdirs and links etc. owner = 'nagios', group = 'nagios', mode= '0544', source = 'puppet:///modules/app/nagios', } Class['app::params'] - Class['app'] } /snip Pay attention to the file resources. You can now put your nagios checks in *modelpath/files/nagios/*. Change the path as /usr/local/nagios/libexec is used here for historical reasons Hope that helps. Best, Nikola On Mon, Dec 03, 2012 at 03:47:24AM -0800, Gavin Williams wrote: Morning all I've had a quick google, but couldn't find anything useful for our scenario... Basically, we use Nagios NRPE in our environment, along with a hand-full of in-house written plugins specific to our applications etc... These scripts change on a fairly regular basis, so hand rolling a RPM each time is too much work as far as i'm concerned... So I can easily get NRPE installed on a node using Puppet... However what I'm struggling with is getting all the plugins synced over aswell... One suggestion I read was to use a file resource, however I've also read about severe performance issues when working with tens of files... I dont really want to have to create some kind of NFS file share to distribute the files... So, any other ideas? Cheers Gavin P.S. Env consists of a single 3.0 Puppet Master, currently with about a dozen nodes connected, but this will rapidly increase once we start full roll-out... -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] checking if DB populated
I am using the following and it serves us well. Basically it makes sure that the importing is done and executes ' touch semaphore' file. There are plans to put those into /var/lib/puppet/sql-snippets instead of in /opt but oh well it seems I am too lazy to go and move them on each server now... snip class sql { $sqls = '/opt/sql-snippets' file { $sql::sqls: ensure = directory, mode = 700, } define do($source='', $db, $content='') { $script = $sql::sqls/$name.sql file { $script: mode = 600, } case $content { '': { File[$script] { source = $source } } default: { File[$script] { content = $content } } } exec {mysql-import-$name: path= ['/bin', '/sbin', '/usr/bin'], command = mysql --defaults-file=/root/.my.cnf $db $script touch $script.semaphore, creates = $script.semaphore, require = File[$script], timeout = '0', } } define source($local_script_path, $db) { $semaphore = $sql::sqls/$name.semaphore exec { mysql-execute-script-$name: path= ['/bin', '/sbin', '/usr/bin'], command = mysql --defaults-file=/root/.my.cnf $db $local_script_path touch $semaphore, creates = $semaphore, timeout = '0', } } Class['mysql'] - Class['sql'] } snip Note that it requires a mysql class to be defined before that. You will get bonus points if you make it work for other databases like postgre and what not Some problems: * the name of the sql::do or sql::sourc should be lowercase as i don't want to support that(if you want put quotes around semaphore in the touch -- Nikola On Mon, Dec 03, 2012 at 06:57:28AM -0800, Luca Gioppo wrote: Which is the bast strategy to check if a DB has been populated? The target is to execute the mysql file.sql just once since it could not be idempotent. The idea is to use the unless clause to stop it to run if there is the known data in the table, but it seems that it is just happy with the mysql managing to connect and the fact that the DB return of an empy set is treated as a success return from the mysql command (obviously it managed to execute and the return value of the command does not depend on the result of the query). Any hint? Luca -- 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/-/Csk_kOJXTtcJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Seeking some Puppet advice for a newbie (specifically Virtualmin/CSF related)
You can actually install in a custom directory and build a package from that pretty easily. Look at directory provider from https://github.com/jordansissel/fpm on how to do that. Of course you will then want to tweak specific configuration options like IP address through puppet. Hope that helps :) Best, Nikola On Tue, Nov 20, 2012 at 01:44:01AM -0800, Laurence Cope wrote: Thanks Ilya, I will give this a try. BUT if I remember correctly, the install process will ask input during the install, to set some options... can Puppet handle entering options during installations? Thanks On Monday, November 19, 2012 10:15:57 PM UTC, Ilya Dmitrichenko wrote: Hi, Yes, you probably want to do something like this: class virtualmin::install { $version = '1.2.3-foo' exec { 'get installer script': command = 'wget http://software.virtualmin.com/gpl/scripts/install.sh ', cwd = '/tmp', creates = '/tmp/install.sh', } file { '/tmp/install.sh': mode = 0755, # checksum = 'the_checksum_of_that_script_if_you_feed_paranoid' } exec { 'install it now': command = '/tmp/install.sh', unless = 'test -x /usr/local/virtualmin/bin/foo /usr/local/virtualmin/bin/foo --version | grep $version', require = File['/tmp/install.sh'], } } hope this kind of makes sense and please excuse any errors this pseudocode might give you :) Cheers, -- Ilya -- 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/-/AxVrJPPnfDgJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Puppet run failing
On Wed, Nov 14, 2012 at 11:28:54PM -0800, Pradeep Chhetri wrote: Hello Everyone I was getting the error which running $ sudo puppet agent -t err: Could not request certificate: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current key To solve this, I first removed the certs from the puppet server for this host using $ sudo puppetca --clean hostname And then removed the content inside directory /var/lib/puppet/ssl on the client. Still it is giving me the same error. Can somebody help me solving this. Can you please try to cleanup the ssl certificate on the client too. You can just move the ssl directory(in case you want to revert it). It is in the same location /var/lib/puppet/ssl -- Nikola -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Usage of puppet to deploy and configuration manage software patches
On Fri, Nov 09, 2012 at 08:04:44AM -0800, Christian wrote: I have some questions in terms of how to use puppet of configuration management for software patches. My previous approach was it to create a puppet module for each patch ... Like Patch1 includes (FileA, FileB, FileC), Patch2 includes (FileD, FileE)... So far so good and that works but now i have to create a Patch3 with lets say FileF and FileA included. As you can see there will be a puppet conflict as i can't deploy the same files within different modules. What is the right architecture and method to manage software patches? Is it to use rpms instead of? Or are there other ideas how to manage that with puppet. Hi, If you should decompose them you can define them as different classes. That however as you know will lead to an explosion of different classes which can become pretty unmaintainable with time ... The question is if you *should* do it this way. I don't know so much about your system so I can't tell. We are mostly updating with proper package management and build our software for upgrades. Maybe if you tell us more about your system/setup, we can give you a better advice? Best, Nikola -- 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/-/YNceAdQNZr4J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] puppetdb postgresql Connection refused
On Mon, Nov 05, 2012 at 01:40:18AM -0800, linux@bami wrote: Greetings, we are trying to setup puppetdb, nut our clients get the following error: Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 400 on SERVER: Could not retrieve facts for lxa7t.unix.lan: Failed to submit 'replace facts' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: Connection refused - connect(2) Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryhugepages.rb Info: Loading facts in /var/lib/puppet/lib/facter/bstoragemanufacturer.rb Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryshmmax.rb Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryshmall.rb Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to submit 'replace facts' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: Connection refused - connect(2) Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run The puppetdb is remote for the puppetmaster and is using postgresql. Can you post your puppet.conf master section and puppetdb.conf please? Direct connect from puppetmaster to the postgresql puppetdb is vaild. By direct you mean that you can run puppet agent -t on the master and it's working? Did you try to connect to the database only with telnet as described here - http://docs.puppetlabs.com/puppetdb/0.9/install.html#troubleshooting-installation-problems We don't see any hint in the logfiles. R/ Daniel Best, Nikola -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: puppetdb postgresql Connection refused
On Mon, Nov 05, 2012 at 03:32:21AM -0800, linux@bami wrote: Hi Nikola, thanks for the response! here are our configs: cat /etc/puppet/puppet.conf [main] server = lx1ml.unix.lan logdir = /var/log/puppet rundir = /var/run/puppet confdir = /app/puppet/etc vardir = /app/puppet/var ssldir = $vardir/ssl modulepath = $confdir/modules manifest = $confdir/manifests/site.pp pluginsync = true [master] certname = lx1ml.unix.lan dns_alt_names = lx1ml.unix.lan ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY reports = tagmail,http reportfrom = linux-supp...@xx.de #reporturl = http://lx1ml.unix.lan:3000/reports/upload storeconfigs = true storeconfigs_backend = puppetdb #facts_terminus = yaml #facts_terminus = inventory_active_record #dbadapter = mysql #dbname = dashboard #dbuser = dashboard #dbpassword = x #dbserver = puppetdb.unix.lan #dbport = [production] modulepath = /app/puppet/env/production/modules manifest = /app/puppet/env/production/manifests/site.pp [development] modulepath = /app/puppet/env/development/modules manifest = /app/puppet/env/development/manifests/site.pp cat /etc/puppet/puppetdb.conf [main] server = lxj2j.unix.lan port = 8081 Direkt connect from the puppetmaster to the puppetdb postgresql via psql [lx1ml ~]# psql -h lxj2j -U puppetdb -d puppetdb Telnet Connect is working: [root@lx1ml ~]# telnet lxj2j 8081 Trying 172.20.250.153... Connected to lxj2j. Escape character is '^]'. ^CConnection closed by foreign host. Puppetdb config from lxj2j: cat /etc/puppetdb/conf.d/jetty.ini [jetty] # Hostname to list for clear-text HTTP. Default is localhost #host = localhost # Port to listen on for clear-text HTTP. port = 8080 ssl-host = lxj2j.unix.lan ssl-port = 8081 keystore = /etc/puppetdb/ssl/keystore.jks truststore = /etc/puppetdb/ssl/truststore.jks removed passwords from output [root@lxj2j data]# cat /etc/puppetdb/conf.d/database.ini |grep -v ^# [database] classname = org.postgresql.Driver subprotocol = postgresql subname = //localhost:5432/puppetdb log-slow-statements = 10 syntax_pgs = true gc-interval = 60 username = puppetdb password = puppetdb Greetings Daniel Am Montag, 5. November 2012 10:40:18 UTC+1 schrieb linux@bami: Greetings, we are trying to setup puppetdb, nut our clients get the following error: Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 400 on SERVER: Could not retrieve facts for lxa7t.unix.lan: Failed to submit 'replace facts' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: Connection refused - connect(2) Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryhugepages.rb Info: Loading facts in /var/lib/puppet/lib/facter/bstoragemanufacturer.rb Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryshmmax.rb Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryshmall.rb Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to submit 'replace facts' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: Connection refused - connect(2) Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run The puppetdb is remote for the puppetmaster and is using postgresql. Direct connect from puppetmaster to the postgresql puppetdb is vaild. We don't see any hint in the logfiles. R/ Daniel Strange ;; everything seems fine to me. Recheck the logs of the master, the agent and the db please. Can you also make sure that you have a signed certificate on the puppetdb host as described here - http://docs.puppetlabs.com/puppetdb/0.9/install.html#step-1-install-and-configure-puppet. i.e make sure that puppet agent -t runs properly there. P.S. Also did you add a routes.yaml file? Best, Nikola -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: puppetdb postgresql Connection refused
On Mon, Nov 05, 2012 at 05:36:39AM -0800, linux@bami wrote: Hi Nikola, yes on the puppet master there ist a routes.yaml [root@lx1ml puppet]# cat routes.yaml --- master: facts: terminus: puppetdb cache: yaml And the puppet agent -t runs fine on the puppetdb if we remove the storeconfig settings from our master puppet.conf Is it possible to increase the jetty log, because we don't the any connection attempts or Connection refused. Well on my machine the file is at /etc/puppetdb/log4j.properties. There you can configure the logging level which in my case is INFO and this should be more than enough. Did you check the system log for your environment for problems. For example on my ubuntu machine most of the messages from the master go to /var/log/syslog. Where are you looking for the puppetdb and puppet logs greetings daniel Best, Nikola Am Montag, 5. November 2012 10:40:18 UTC+1 schrieb linux@bami: Greetings, we are trying to setup puppetdb, nut our clients get the following error: Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 400 on SERVER: Could not retrieve facts for lxa7t.unix.lan: Failed to submit 'replace facts' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: Connection refused - connect(2) Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryhugepages.rb Info: Loading facts in /var/lib/puppet/lib/facter/bstoragemanufacturer.rb Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryshmmax.rb Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryshmall.rb Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to submit 'replace facts' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: Connection refused - connect(2) Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run The puppetdb is remote for the puppetmaster and is using postgresql. Direct connect from puppetmaster to the postgresql puppetdb is vaild. We don't see any hint in the logfiles. R/ Daniel -- 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/-/OxMm0hZvrTcJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: puppetdb postgresql Connection refused
On Mon, Nov 05, 2012 at 06:26:35AM -0800, linux@bami wrote: Hi, so we figured out the first problem. We had an alias puppetdb.fqdn which was pointing to out puppet dashboard db. It seems that despite from the entry in the puppetdb.conf, puppet uses puppetdb as database server. we changed the alias and now we are getting an ssl error: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to submit 'replace facts' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: [unable to get local issuer certificate for /CN=lxj2j.unix.lan] Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run This looks like an SSL error to me. Try to remove the storeconfigs and make a clean puppet agent -t from puppetdb host before you enable it again. any idea ?! thanks and greetings. Daniel Am Montag, 5. November 2012 14:36:39 UTC+1 schrieb linux@bami: Hi Nikola, yes on the puppet master there ist a routes.yaml [root@lx1ml puppet]# cat routes.yaml --- master: facts: terminus: puppetdb cache: yaml And the puppet agent -t runs fine on the puppetdb if we remove the storeconfig settings from our master puppet.conf Is it possible to increase the jetty log, because we don't the any connection attempts or Connection refused. greetings daniel Am Montag, 5. November 2012 10:40:18 UTC+1 schrieb linux@bami: Greetings, we are trying to setup puppetdb, nut our clients get the following error: Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 400 on SERVER: Could not retrieve facts for lxa7t.unix.lan: Failed to submit 'replace facts' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: Connection refused - connect(2) Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryhugepages.rb Info: Loading facts in /var/lib/puppet/lib/facter/bstoragemanufacturer.rb Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryshmmax.rb Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryshmall.rb Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to submit 'replace facts' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: Connection refused - connect(2) Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run The puppetdb is remote for the puppetmaster and is using postgresql. Direct connect from puppetmaster to the postgresql puppetdb is vaild. We don't see any hint in the logfiles. R/ Daniel -- 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/-/atH0EqHpJrUJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: puppetdb postgresql Connection refused
On Mon, Nov 05, 2012 at 07:52:02AM -0800, linux@bami wrote: Hi, we solved the problem. removed all files from /etc/puppetdb/ssl and ran /usr/sbin/puppetdb-ssl-setup. Thanks for the support!! greetings Daniel I am glad that you managed to solve it. Best, Nikola Am Montag, 5. November 2012 16:07:43 UTC+1 schrieb nikolavp: On Mon, Nov 05, 2012 at 05:36:39AM -0800, linux@bami wrote: Hi Nikola, yes on the puppet master there ist a routes.yaml [root@lx1ml puppet]# cat routes.yaml --- master: facts: terminus: puppetdb cache: yaml And the puppet agent -t runs fine on the puppetdb if we remove the storeconfig settings from our master puppet.conf Is it possible to increase the jetty log, because we don't the any connection attempts or Connection refused. Well on my machine the file is at /etc/puppetdb/log4j.properties. There you can configure the logging level which in my case is INFO and this should be more than enough. Did you check the system log for your environment for problems. For example on my ubuntu machine most of the messages from the master go to /var/log/syslog. Where are you looking for the puppetdb and puppet logs greetings daniel Best, Nikola Am Montag, 5. November 2012 10:40:18 UTC+1 schrieb linux@bami: Greetings, we are trying to setup puppetdb, nut our clients get the following error: Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 400 on SERVER: Could not retrieve facts for lxa7t.unix.lan: Failed to submit 'replace facts' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: Connection refused - connect(2) Info: Retrieving plugin Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryhugepages.rb Info: Loading facts in /var/lib/puppet/lib/facter/bstoragemanufacturer.rb Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryshmmax.rb Info: Loading facts in /var/lib/puppet/lib/facter/bmemoryshmall.rb Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to submit 'replace facts' command for lxa7t.unix.lan to PuppetDB at puppetdb:8081: Connection refused - connect(2) Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run The puppetdb is remote for the puppetmaster and is using postgresql. Direct connect from puppetmaster to the postgresql puppetdb is vaild. We don't see any hint in the logfiles. R/ Daniel -- 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/-/OxMm0hZvrTcJ. To post to this group, send email to puppet...@googlegroups.comjavascript:. To unsubscribe from this group, send email to puppet-users...@googlegroups.com javascript:. 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 view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/QuC4XBMIDjoJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Re: Really long puppet runs...
Is there any particular reason that you are using an older master than the client. If not now it will pop up as a problem in the future. Why don't you just make the move? Best, Nikola On Fri, Nov 02, 2012 at 08:28:12AM -0700, llowder wrote: Turns out it was a stray recurse = true On Friday, November 2, 2012 9:56:40 AM UTC-5, llowder wrote: I've got a 3.0.0 node on Ubuntu 12.04 talking to a 2.7.19 master on Ubuntu 10.04. Until yesterday, this worked fine (and the other 3.0.0 node works fine as well) This node is in my 'test' environment and the other node uses an almost identical node def except is in the 'prod' environment. I don't know exactly what changed, but I am hoping someone can help me track this down. Of the two nodes, I did move the one that is still functioning normally out of test and into prod, but other than hostnames and environments, they use the same code base and settings. I've posted a partial log (sudo puppet agent -t --debug) from the node having problems at https://gist.github.com/4001797 But the basic issue is that puppet runs have started taking 15-20 minutes, and in each case, the long pause is after Debug: /Schedule[puppet]: Skipping device resources because running on a host Debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using pson Debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using pson is displayed. I commented out a section of the node def to simplify, and same issues. Any help in tracking this down would be much appreciated. -- 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/-/WtV8zCBVI1YJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] PuppetDB + PuppetMaster with Passanger
Hi everyone, I am trying to configure a puppet master with a puppetdb for storeconfigs backend. I am using Ubuntu 12.10 and the packages from puppetlabs repository. The option I chose for the master is to use passanger as I am far more familiar with apache than with the ruby web servers that are available as an option. I will also need puppetDB for proper nagios configuration so I got that as well from the ubuntu packages. Here is the full package list that I installed: apt-get install puppet-common puppetdb puppetdb-terminus puppetmaster-common puppetmaster-passenger I followed the guides on puppetlabs and everything worked fine for a vagrant virtual machine I have locally as an agent. The problem came when I tried to add puppetDB to the picture. I started getting strange error on puppet agent -t on the agent. I am also getting the following message in the system log when I try to connect to the master Could not configure routes from /etc/puppet/routes.yaml: Could not find terminus puppetdb for indirection facts Strangely enough I couldn't find any answers with googling so I decided to post here for help. Best, Nikola -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] File optimizations
On Mon, Oct 22, 2012 at 12:09:45PM -0700, Bostjan Skufca wrote: Hi there, I'm running into slow catalog runs because of many files that are managed. I was thinking about some optimizations of this functionality. 1: On puppetmaster: For files with source = 'puppet:///modules...' puppetmaster should already calculate md5 and send it with the catalog. 2: On managed node: As md5s for files are already there once catalog is received, there is no need for x https calls (x is the number of files managed with source= parameter) 3. Puppetmaster md5 cache This would of course put some strain on puppetmaster, which would then benefit from some sort of file md5 cache: - when md5 is calculated, put in into cache, key is filename. Also add file mtime and time of cache insert. - on each catalog request, for each file in the catalog check if mtime has changed, and if so, recalculate md5 hash, else just retrieve md5 hash from cache - some sort of stale cache entries removal, based on cache insert time, maybe at the end of each puppet catalog compilation, maybe controlled with probability 1:100 or something Do you have any comments about these optimizations? They will be greatly appreciated... really :) b. Hi, When using puppet I found that it is a far better idea to serf files with something else. You will be far better with something else for this job like sftp or ssh. My conclusions just came from the fact that we were trying to import a big dump(2GB seems ok to me but who knows) and puppet just died because they are not streaming the file but it is *fully* loaded into memory. Apart from that these ideas seems reasonable but I am not a commiter. Best, Nikola -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.