Re: [Puppet Users] Spec testing and dalen-puppetdbquery

2017-03-30 Thread Erik Dalén
A bit late to the party here, but in my (rspec-puppet) tests I have created
a mock version of the function in a before(:each) block in the unit test
for the class, like this:

  before(:each) do
Puppet::Parser::Functions.newfunction(:query_nodes, :type => :rvalue) {
|_| ["foo.example.com", "bar.example.com"] }
  end



On Mon, 19 Dec 2016 at 18:23 Jordan Conway  wrote:

> I was running into the same issue with that module, and I found that
> including the puppetdb mock class from the source module helped.
> It may be more involved, but at first glance, this helps me quiet a bunch
> of the errors to get down to spec testing my actual module.
>
>
> https://raw.githubusercontent.com/dalen/puppet-puppetdbquery/master/spec/puppet/util/puppetdb.rb
>
> Cheers,
> Jordan
>
>
> On Tuesday, November 1, 2016 at 6:13:03 PM UTC-4, Salty Old Cowdawg wrote:
>
> Garret:  I do have dalen-puppetdb in my .fixtures.yaml file.   A link to
> my project?  unfortunately I'm developing all this work inside my client's
> cloud and can't provide a link.
>
> On Tue, Nov 1, 2016 at 6:11 PM Peter Berghold  wrote:
>
> That's what I was beginning to suspect Andy.  Now I have to go find the
> Ubuntu version of that
>
> On Tue, Nov 1, 2016 at 5:38 PM Andrew Grimberg 
> wrote:
>
> On 11/01/2016 02:25 PM, Garrett Honeycutt wrote:
> > On 11/1/16 4:03 PM, Peter Berghold wrote:
> >> I have a module that I am writing spec tests for that uses the Puppet
> >> Forge module cited in the subject line to query for a list of nodes
> >> fitting a particular criteria.  When I run the spec test it bombs out
> >> with a message: "cannot load such file -- puppet/util/puppetdb"
> >>
> >> After a bit of searching I am still left wondering package or gem this
> >> is looking for.  Anybody know?
> >>
> >
> > Hi,
> >
> > Do you have dalen/puppet-puppetdbquery in your .fixtures.yml? A link to
> > your project would make debugging easier.
>
> It's probably related to the fact that dalen-puppetdbquery requires
> PuppetDB Terminus installed. Not certain how you get around that for
> spec tests.
>
> -Andy-
>
> --
> 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.
>
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/ea142093-9c29-2fe2-8202-0ae09709ef21%40bardicgrove.org
> .
> 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/58d955c3-1c4d-4e37-b29b-d952f0e64775%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/CAAAzDLfhHUWsU5ScFFB_9KCzNBo49L2XyaRsvrC_Uw67gAKFmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: [Puppet-dev] Re: Draft for new type and provider API

2017-02-28 Thread Erik Dalén
Overall I think this looks pretty good, but I have some questions and
comments.

For implementations that can't enumerate all existing resources (at least
not in any fast way), like for example File, should they fine a get method
that returns an empty hash, nil or just not define a get method? nil or not
defining would allow special handling of them, so that would probably be
preferable.

But shouldn't it really have a way to fetch the state of a single resource
in for those implementations? How would this otherwise handle something
like "puppet resource file /path/to/file", traverse the entire file system
and stat every file?

It seems it would also be handy with some helper method that compared
current_state & target_state to filter out the changes that actually need
to happen. I would imagine that sort of code would otherwise be duplicated
in many implementations.

logger.attribute_changed could really have a default value for message if
the implementation provides attribute, old_value & new_value they shouldn't
all need to supply "Changed #{attribute} from #{old_value} to #{new_value}".

Will the attribute type fields be able to use type definitions shipped in
the same module or present on in environment?

Will they be able to inspect the catalog or communicate between
implementations, like in the concat & concat_fragment case?

Will they be able to generate resources? That could probably be done with
something similar to the logger methods, but there is nothing like that in
the proposal. I assume they won't have a generate method.

Will there be some requirement that these implementations are thread safe
so puppet can start managing multiple resources in parallel? Or will they
run in some subprocess even?

On Mon, 27 Feb 2017 at 15:59 David Schmitt  wrote:

> Hi folks,
>
> I've written down the design in README format now. This should make for a
> easier to ingest from a module developer's perspective. Meanwhile I've also
> had a shot at a hardcoded implementation of this, and it is technically
> possible to implement this too.
>
> ---
> Resource API
>
> A *resource* is the basic thing that is managed by puppet. Each resource
> has a set of attributes describing its current state. Some of the
> attributes can be changed throughout the life-time of the resource, some
> attributes only report back, but cannot be changed (see read_only)others
> can only be set once during initial creation (see init_only). To gather
> information about those resources, and to enact changes in the real world,
> puppet requires a piece of code to *implement* this interaction. The
> implementation can have parameters that influence its mode of operation
> (see operational_parameters). To describe all these parts to the
> infrastructure, and the consumers, the resource *Definition* (f.k.a.
> 'type') contains definitions for all of them. The *Implementation*
> (f.k.a. 'provider') contains code to *get* and *set* the system state.
>
> Resource
> Definition
>
> Puppet::ResourceDefinition.register(
> name: 'apt_key',
> docs: <<-EOS,  This type provides Puppet with the capabilities to 
> manage GPG keys needed  by apt to perform package validation. Apt has 
> it's own GPG keyring that can  be manipulated through the `apt-key` 
> command.  apt_key { '6F6B15509CF8E59E6E469F327F438280EF8D349F':
> source => 'http://apt.puppetlabs.com/pubkey.gpg'  }  
> **Autorequires**:  If Puppet is given the location of a key file which 
> looks like an absolute  path this type will autorequire that file.EOS
> attributes:   {
> ensure:  {
> type: 'Enum[present, absent]',
> docs: 'Whether this apt key should be present or absent on the 
> target system.'
> },
> id:  {
> type:'Variant[Pattern[/\A(0x)?[0-9a-fA-F]{8}\Z/], 
> Pattern[/\A(0x)?[0-9a-fA-F]{16}\Z/], Pattern[/\A(0x)?[0-9a-fA-F]{40}\Z/]]',
> docs:'The ID of the key you want to manage.',
> namevar: true,
> },
> # ...
> created: {
> type:  'String',
> docs:  'Date the key was created, in ISO format.',
> read_only: true,
> },
> },
> autorequires: {
> file:'$source', # will evaluate to the value of the `source` 
> attribute
> package: 'apt',
> },
> )
>
> The Puppet::ResourceDefinition.register(options) function takes a Hash
> with the following top-level keys:
>
>- name: the name of the resource. For autoloading to work, the whole
>function call needs to go into lib/puppet/type/.rb.
>- docs: a doc string that describes the overall working of the type,
>gives examples, and explains pre-requisites as well as known issues.
>- attributes: an hash mapping attribute names to their details. Each

[Puppet Users] ANNOUNCE: puppetdbquery 2.0.0 released

2015-10-12 Thread Erik Dalén
I've just released version 2.0 of the puppetdbquery module. It uses the new
v4 API in PuppetDB, so version 3.x of PuppetDB is required.

The highlights are:
 - v4 API support
 - support for structured facts, example: system_uptime.days>209
 - arbitrary subqueries using # sign, example:
#node.catalog_environment=production
 - syntactic sugar for date queries using @ sign, example:
#node.catalog_timestamp<@"2 hours ago"

enjoy!

-- 
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/CAAAzDLfNm4H9BNWo9LS-y3ReiSz0hQu88cJH-3hw72wXkhEiPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Anyone really using Postgres for a Hiera backend?

2015-07-13 Thread Erik Dalén
Yeah, I'm not really using puppet server (yet at least) or the postgres
hiera backend. So if someone else wants to take over maintainership of it I
can transfer the repo ownership.

On Tue, 19 May 2015 at 18:51 Tony Thayer tony.tha...@gmail.com wrote:

 Actually, I just realized I was using my own fork of the original:
 https://github.com/tthayer/hiera-psql

 I'm not using it actively anymore and I doubt my previous employer is
 still using it either. There is an open issue stating that it doesn't work
 with the new puppetserver, too:
 https://github.com/dalen/hiera-psql/issues/7

 On Wednesday, May 13, 2015 at 9:45:55 AM UTC-7, leam hall wrote:

 Just wondering. I found some options but don't see any under current
 development.

 Leam


 --
 Mind on a Mission http://leamhall.blogspot.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/6a3391ec-22d7-4f43-b7f0-7036ee722869%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/6a3391ec-22d7-4f43-b7f0-7036ee722869%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/CAAAzDLd-WGbX3iceb99NJF_b%2BgCjNFe8oHjqE%3DH8ZXW--K%3D1FA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Sizing

2015-07-02 Thread Erik Dalén
We are running a PuppetDB instance with ~8000 clients using a 30 minute
runinterval. We have hit some scaling issues in the past but the latest
PuppetDB version (2.3.5) is running nicely for us. This is with
stringify_facts=false, which does create some extra load compared with
stringify_facts=true.

We have separated the PuppetDB service hosts and the postgres databases to
different hosts. For postgres we have a write master with a hot standby and
four read-only slaves (one for each PuppetDB host). This was scaled up when
we actually had some performance issues with earlier PuppetDB versions and
can likely be scaled down to just two service hosts and read-only slaves
without issues now.

The hardware is pretty beefy, the service hosts are Dell PowerEdge R620
with 24 CPU cores @ 2.00GHz and 32GB RAM.
The databases are all Dell PowerEdge R620 with 32 CPU cores @ 1.80GHz and
64GB RAM. For disks they have a 3TB Fusion-IO ioDrive2 each, they have
pretty impressive performance that you can read about here:
http://www.fusionio.com/data-sheets/iodrive2

So, this is probably on the higher end of scaling up a PuppetDB cluster and
I'm fairly confident it could handle a lot more than 8000 clients, but
haven't done any load test on it so far to see what the limit is.

We have a smaller PuppetDB installation as well which is around 2000
clients, and there we can manage with just a single of these database hosts
and PuppetDB service hosts.

On Fri, 26 Jun 2015 at 15:25 Christopher Wood christopher_w...@pobox.com
wrote:

 There's a load balancer in front of the puppetmasters (which have SAN
 certs) but a single puppetdb host. Nothing save puppetmasters and my own
 curiosity depends on puppetdb (2.2.2) right now. (My disaster recovery plan
 is to rebuild the host and let the data refill by itself.)

 If I need another scale-up or more things rely on puppetdb I might add
 database replication for PostgreSQL and a few extra puppetdb instances
 behind the load balancer. Given current usage I have no idea when I'd hit
 that point. I have 2GB max heap set and it spikes to 1.4GB usage quite
 rarely.

 On Fri, Jun 26, 2015 at 07:32:18AM -0400, Tom Tucker wrote:
 Chris,
 Thanks for the detailed response.  BTW did you deploy HA, load
 balancing,
 etc on the Postgres side?
 Cheers
 On Thu, Jun 25, 2015 at 11:11 PM, Christopher Wood
 [1]christopher_w...@pobox.com wrote:
 
   Somewhere past 700 nodes (still puppetizing) our 1-core, 2GB-RAM
   puppetmasters and 2-core, 2GB-RAM puppetdb host started showing
 signs of
   overload (ssl/connect errors in agent logs, catalog/report
 mismatches in
   puppetdb). I augmented the VMs with hardware to stop the
 complaints
   and later on went off tuning. I moved the puppetmasters up to 4-core
   8GB-RAM and the puppetdb host is now 4-core 16GB-RAM. Definitely
   rattling around in them now but there's lots of room for growth.
 
   For scaling/tuning, among others:
 
   [2]
 https://ask.puppetlabs.com/question/13433/how-should-i-tune-passenger-to-run-puppet/
 
   [3]
 https://docs.puppetlabs.com/puppetdb/latest/scaling_recommendations.html
 
   [4]https://docs.puppetlabs.com/guides/scaling.html
 
   [5]http://activemq.apache.org/scaling-queues.html
 
   [6]http://activemq.apache.org/javalangoutofmemory.html
 
   After all that I analyzed catalogs across the deployment and found
 that
   the datacat usage in the mcollective module (now
   [7]https://github.com/puppet-community/puppet-mcollective) was an
   abominable percentage of the total number of resources. The firewall
   type ([8]https://github.com/puppetlabs/puppetlabs-firewall) was 3%
 of
   the total resources. Since it takes less horsepower to puppet up
 fewer
   things I figure there will be a benefit in some judicious
 refactoring
   here and there. (Templates instead of file_line, iptables config
 instead
   of firewall resources, et cetera.)
 
   However, I figure there's a benefit in a conversion effort to cram
   things into puppet first and sort them out later. I had a good time
 just
   throwing hardware at the problem to start and then tuning after the
 bulk
   of hosts were converted to puppet management. People at companies
 where
   incremental hardware use is expensive may want to tune early and
 shrink
   manifests more aggressively.
   On Thu, Jun 25, 2015 at 08:16:31PM -0400, Tom Tucker wrote:
   Assuming 2,500 Linux clients running Puppet community edition
 3.8.
   Any
   sizing recommendation for a PuppetDB system in regards to disk
 size
   for
   the DB, CPU, Memory, etc.
   Thank you for your time and feedback.
   
   --
   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,
   

Re: [Puppet Users] inherits deprecated in puppet 4.x

2015-01-21 Thread Erik Dalén
Note that you can also just put the standard classes (and variables)
directly in the top scope. No real need to encapsulate them inside a node
scope (unless you are overriding the value of facts in the manifest, but
that seems like a pretty bad idea anyway).

A minor difference is also that resources that are inside a node scope will
automatically get tagged with the certname of the node, but resources and
classes in top scope won't. But that automatic tagging is mostly useless
and a waste of space in PuppetDB IMO.




On Mon Jan 12 2015 at 2:56:06 PM jcbollinger john.bollin...@stjude.org
wrote:



 On Friday, January 9, 2015 at 3:34:41 PM UTC-6, RIlindo Foster wrote:

 It seems you are using this as a way to classify nodes. Your best option
 is to use  an ENC (Foreman or Hiera) to classify your nodes, ideally using
 the roles and profiles pattern to abstract your modules.



 I strongly disagree. If you don't otherwise need (or want) an ENC, then
 this is not a good reason to start using one.  Changing the default node to
 a class and 'include'ing it, as Peter suggested, is much easier, and mostly
 equivalent to node inheritance.  If you use node-scoped variables in the
 (original) default node, however, then you have more work to do any way
 around.


 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/d657abc7-35ba-4c88-84fb-0f714853aa69%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/d657abc7-35ba-4c88-84fb-0f714853aa69%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/CAAAzDLf8h85qCG0_UG5x-6mzULQp4MLPNNJvmEFux_eVgXsPdw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] future parser, defined types, and variable scope

2014-12-16 Thread Erik Dalén
On Mon Dec 15 2014 at 6:07:43 PM John Sellens jsell...@syonex.com wrote:

 I couldn't find any reference to this different behaviour, so I'm
 wondering if anyone knows if this is intentional.

 I use a bunch of defined types, and with the future parser, when I refer
 to a variable in a template, it seems that the default scope is not the
 scope of the class.

 e.g. in a template, %= @a % no longer refers to $a from the current
 class.

 This is different behaviour than with the current parser, and doesn't
 seem to match the documentation I've found, or the behaviour with the
 standard types.


 For example, I have a module called parsetest and the init.pp is:

 define fileerb ( ) {
 file { /tmp/$name:
 content = template( parsetest/${name}.erb ),
 }
 }

 class parsetest {

 $a = hello

 fileerb { bloop : }

 }

 The templates/bloop.erb contains:

 the value of a is: %= @a %

 In current puppet, the value of $a ends up in /tmp/bloop.
 With the future parser, no value is used, and I don't see
 any errors.

 I see this in puppet 3.7.3 (from the puppetlabs yum repo) and
 also in 3.6.2 (from freebsd ports).


 Is it expected that a defined type evaluates templates in a
 (seemingly) different scope?


Yes, this is expected. Defined types have their own scope which doesn't
inherit variables from the class they are instantiated from.

So if you need the variable in the define, forward it to it using a
parameter.


In Puppet 3.x that behaviour worked in templates, but not outside
templates. With future parser it is more consistent.

-- 
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/CAAAzDLem3VYuJxT05VqerKtW1MVKiAn1VBs%3DKR6R5bdeF_YR7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: [Puppet-dev] Running future parser in production

2014-12-15 Thread Erik Dalén
On Fri Dec 12 2014 at 7:01:58 PM Trevor Vaughan tvaug...@onyxpoint.com
wrote:

 Hi Erik,

 Do you have any plans for a blog post on what it took to get switched?

 Almost everything that I've tried has worked well with my biggest issue
 being String Integer to bare Integer comparison situations.


Right, we had some issues with those, and specifically that integers were
sent to functions that cold only handle strings. The most common case of
that was that the range function in stdlib didn't handle integer parameters
:(
That is fixed in master at least:
https://github.com/puppetlabs/puppetlabs-stdlib/pull/365

Another somewhat common number related change we had to make was manifests
that used numbers like 05 as the order parameter to concat::fragment or
similar resource types. That is interpreted as a octal number in future
parser, so the order is just 5 instead of 05. These were all changed to
be strings with integers in them instead. Possibly the concat module could
be changed to sprintf integers using two digits and 0 padding, but that
would be a backwards incompatible change, although it would likely help
most users with backwards compatibility :)
These were really easy to find using git grep though.


 Thanks!

 Trevor

 On Fri, Dec 12, 2014 at 2:59 AM, Erik Dalén erik.gustav.da...@gmail.com
 wrote:

 Just wanted to say that we have now switched completely to the future
 parser at Spotify, and it is working well. Still have some work to do to
 take advantage of all the new stuff, it is still mostly the old manifests
 running on the new parser.

 We had some syntax fixes we had to make to get it working, like variable
 case in some manifests, and some resource references that had a space
 between the type and name (like File [foo] instead of File[foo]).

 But the biggest issue with the migration was some modules that used
 dynamically scoped variables inside ERB templates. That is quite tricky to
 detect in any other way than doing --noop runs and comparing the changes.

  --
 You received this message because you are subscribed to the Google Groups
 Puppet Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-dev+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-dev/CAAAzDLd7LLBW6bO%3D%2BGZWcBuzJxqKAh%2BqF2007-xFQ038K6PVsA%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-dev/CAAAzDLd7LLBW6bO%3D%2BGZWcBuzJxqKAh%2BqF2007-xFQ038K6PVsA%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.



 --
 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 Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-dev+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoWSeq9pFFUsA7ny2gPU8LjoKaydpx%3Dozxo-WeFHZJwXaw%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoWSeq9pFFUsA7ny2gPU8LjoKaydpx%3Dozxo-WeFHZJwXaw%40mail.gmail.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/CAAAzDLe1mJZ21_%3DQHzbFAipEqms1D6maDK-T-vk-j9Gyryv%3DkQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Running future parser in production

2014-12-15 Thread Erik Dalén
On Fri Dec 12 2014 at 7:06:20 PM Henrik Lindberg 
henrik.lindb...@cloudsmith.com wrote:

 On 2014-12-12 2:59, Erik Dalén wrote:
  Just wanted to say that we have now switched completely to the future
  parser at Spotify, and it is working well. Still have some work to do
  to take advantage of all the new stuff, it is still mostly the old
  manifests running on the new parser.
 
  We had some syntax fixes we had to make to get it working, like
  variable case in some manifests, and some resource references that had
  a space between the type and name (like File [foo] instead of File[foo]).
 
  But the biggest issue with the migration was some modules that used
  dynamically scoped variables inside ERB templates. That is quite
  tricky to detect in any other way than doing --noop runs and comparing
  the changes.
  --
  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
  mailto:puppet-users+unsubscr...@googlegroups.com.
  To view this discussion on the web visit
  https://groups.google.com/d/msgid/puppet-users/CAAAzDLd7LLBW6bO%3D%
 2BGZWcBuzJxqKAh%2BqF2007-xFQ038K6PVsA%40mail.gmail.com
  https://groups.google.com/d/msgid/puppet-users/CAAAzDLd7LLBW6bO%3D%
 2BGZWcBuzJxqKAh%2BqF2007-xFQ038K6PVsA%40mail.gmail.com?
 utm_medium=emailutm_source=footer.
  For more options, visit https://groups.google.com/d/optout.
 This is so cool! Thanks for all the testing and feedback.

 Does this mean I am on pager duty now? ;-)
 - henrik


Yeah, I'll switch it over from Luke Kanies :)

-- 
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/CAAAzDLeaQR7ToAU-fJbs7DkCF3tPjYJ2Qzt9yUhtvBtaLAwkmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Running future parser in production

2014-12-12 Thread Erik Dalén
Just wanted to say that we have now switched completely to the future
parser at Spotify, and it is working well. Still have some work to do to
take advantage of all the new stuff, it is still mostly the old manifests
running on the new parser.

We had some syntax fixes we had to make to get it working, like variable
case in some manifests, and some resource references that had a space
between the type and name (like File [foo] instead of File[foo]).

But the biggest issue with the migration was some modules that used
dynamically scoped variables inside ERB templates. That is quite tricky to
detect in any other way than doing --noop runs and comparing the changes.

-- 
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/CAAAzDLd7LLBW6bO%3D%2BGZWcBuzJxqKAh%2BqF2007-xFQ038K6PVsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Explorer 1.2.0 released

2014-11-20 Thread Erik Dalén
Sorry for a bit late reply on this. But I'm using it on ~6000 nodes. But
then certain operations start getting a bit slow, especially in the events
view. The node list and facts views are still pretty snappy though.

This is using fast hardware with lots of mem for the PuppetDB postgres
servers though.

On Thu Oct 30 2014 at 10:39:00 PM Walid walid.sha...@gmail.com wrote:

 Hi Erik,

 What was the largest practical number of nodes tested against it, or
 configured.

 Best regards,

 Walid

 On 26 August 2014 16:04, Erik Dalén da...@spotify.com wrote:

 A new release of Puppet Explorer is out. It includes a new look which you
 can check out at the new public demo site: http://demo.puppetexplorer.io/

 Other highlights in this release is:

  * Abort unfinished background requests when filter changes
  * Show number of found nodes in node list
  * Much improved mobile experience
  * RPM build task, details are in README
  * Tests using recorded mock data from demo site PuppetDB
  * Warn if nodes haven't reported in more than X hours

 Likely this is the last release that will work with PuppetDB 2.1, I
 expect the next release to be using the coming structured facts support in
 PuppetDB 2.2+

 pre build deb:
 http://dl.bintray.com/dalen/puppetexplorer-apt/puppetexplorer_1.2.0-1_amd64.deb

 tar.gz:
 http://dl.bintray.com/dalen/puppetexplorer/puppetexplorer-1.2.0.tar.gz

 --
 Erik Dalén
 Systems Engineer, Site Reliability Engineering

 --
 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/CANn3uq3_t24HLxTKSrUKjRomxKc6%2B1-ih9PtT_htjwTHY1XzFw%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CANn3uq3_t24HLxTKSrUKjRomxKc6%2B1-ih9PtT_htjwTHY1XzFw%40mail.gmail.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/CAN4dctrMxsKBc2Bg1%2BGwr4wtpGvwpLC_7q3ZGkUCbAWJxczyaA%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CAN4dctrMxsKBc2Bg1%2BGwr4wtpGvwpLC_7q3ZGkUCbAWJxczyaA%40mail.gmail.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/CAAAzDLeEojKpm0FeNCZxLuK0onqNkvu6ayi6BnFs2OCwHGiSug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Puppet facts uploading to PuppetDB

2014-10-01 Thread Erik Dalén
We do this, but could probably live without it. But we do it using the
facts indirector and setting it up to cache to puppetdb.
On 27 Sep 2014 15:28, Ken Barber k...@puppetlabs.com wrote:

  Hmm... I didn't even know this existed. Ironically, given your question,
 it
  sounds like something I'd want to use. But if it's going away, I guess
 I'll
  just totally forget that I heard it...

 Oh to be clear Jason, the functionality is of course still staying for
 PuppetDB :-). Its just the transmission via the master that has been
 removed. There are a number of future architecture cases that might
 allow this via an alternate path, that are being debated however - but
 we don't want to rush into something like this, or make promises we
 can't keep :-). Understanding the use-cases in the real world is
 obviously important to these considerations.

  Use case: We still have a bunch of legacy systems that aren't puppetized
 and
  probably never will be (lots of base stuff that we do on every host
 that
  would break these snowflakes). For everything else, PuppetDB is our one
 and
  only inventory system. These legacy boxes exist only in a...
 spreadsheet. If
  I knew there was a way to get facts from them into PuppetDB without
 risking
  what would happen with a full puppet run, I probably would've done it by
  now...

 So this sounds like you could just get away with something that
 doesn't require the Puppet runtime, that can submit facts directly to
 PuppetDB. At the moment this is completely possible with our commands
 submission API, but afaik tooling is generally done by users only in a
 bespoke way, at least I don't know anything that has been published.

 Truth is its actually dead easy to do this, (*hint hint* for those who
 have been looking for a personal project to work on, I'm sure we'd
 love to see such a thing - and would happily promote it here:
 https://docs.puppetlabs.com/puppetdb/2.2/community_add_ons.html). I
 have something ~10 lines that already does this for example in Ruby
 (using the Facter class from the facter gem/library), but since we're
 moving to a cfacter world, might be good to consider doing it
 different for future compatibility (not to mention a C++11 based
 facter will provide more portability opportunities).

 The main complication as ever, is the SSL authentication and the PKI
 handling of keys/certs etc. Obviously with Puppet you get the key/cert
 signing baked in - although one might consider yet another tool or
 bespoke methodology to make this work as an alternate to the Puppet
 client.

 ken.

 --
 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/CAE4bNT%3DKfbj-4f4BUgX2PgrM%3DKbcNt6RXxhTKfHL%3D4xpyrpSxA%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/CAAAzDLdjwJT2DAFpzWUGZ9LeytunwthyGEuWHiO_8ZHm-tU3hw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Puppet Explorer 1.3.0

2014-09-20 Thread Erik Dalén
Yeah, if there was a commonly accepted ENC tool I could probably add
support for that in Puppet Explorer. But it seems that more and more people
just move classification to hiera instead, and most hiera backends don't
have any API to use from a web UI.

On 19 September 2014 14:57, Spencer Krum krum.spen...@gmail.com wrote:

 Puppet Explorer and PuppetBoard are both superior to the Puppet Dashboard.
 Puppet dashboard is in community support, but this list is full of people
 having trouble installing it. I would highly recommend using one of the
 other tools.

 What the Puppet Dashboard does do that the other tools do not do is ENC
 functionality. I think there is a space for an open source lightweight ENC
 to be written for organizations to use and hack on.

 Thanks,
 Spencer




 On Fri, Sep 19, 2014 at 12:38 PM, PierreR p.radermec...@gmail.com wrote:

 Out of curiosity, how does it compare with puppet dashboard ?

 Is Puppet Dashboard really EOL ?

 What's currently the best reporting open source solution for Puppet ?

 Cheers


 On Friday, September 12, 2014 5:19:25 PM UTC+2, Erik Dalén wrote:

 A new release of Puppet Explorer is out! This release adds support for
 PuppetDB 2.2, but also drops support for previous PuppetDB releases (once
 the v4 API stabilizes it will be easier to keep compatibility).

 The major new feature is support for structured facts, for example you
 can search for system_uptime.days100 if you are using Facter 2.2.

 You can now also subquery the node fields using the #node syntax, for
 example #node.catalog-environment=production

 To query for nodes matching timestamps you can use an @ sign in front of
 a string to have it parsed by timespec instead of typing a ISO timestamp by
 hand. For example: #node.report-timestamp@now - 2 hours

 It also has support for customisable panels in the dashboard, define
 your own queries and show how many nodes are matching.

 A pre built tar.gz as well as RPM and DEB packages are available at:
 https://github.com/spotify/puppetexplorer/releases

 --
 Erik Dalén

  --
 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/c8780e5b-2afd-43ae-b9db-17bdd87116ee%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/c8780e5b-2afd-43ae-b9db-17bdd87116ee%40googlegroups.com?utm_medium=emailutm_source=footer
 .

 For more options, visit https://groups.google.com/d/optout.




 --
 Spencer Krum
 (619)-980-7820

 --
 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/CADt6FWOS_grxgrnwkRtHbE8%2BKQAgFLJPD3EFbbNBBdU9XdWrXA%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-users/CADt6FWOS_grxgrnwkRtHbE8%2BKQAgFLJPD3EFbbNBBdU9XdWrXA%40mail.gmail.com?utm_medium=emailutm_source=footer
 .

 For more options, visit https://groups.google.com/d/optout.




-- 
Erik Dalén

-- 
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/CAAAzDLc%2BEUHyL9N_UqK%2BVE4G4zkvGtTFC5A3JkQSgSZ6z3dj8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Explorer 1.3.0

2014-09-12 Thread Erik Dalén
A new release of Puppet Explorer is out! This release adds support for
PuppetDB 2.2, but also drops support for previous PuppetDB releases (once
the v4 API stabilizes it will be easier to keep compatibility).

The major new feature is support for structured facts, for example you can
search for system_uptime.days100 if you are using Facter 2.2.

You can now also subquery the node fields using the #node syntax, for
example #node.catalog-environment=production

To query for nodes matching timestamps you can use an @ sign in front of a
string to have it parsed by timespec instead of typing a ISO timestamp by
hand. For example: #node.report-timestamp@now - 2 hours

It also has support for customisable panels in the dashboard, define your
own queries and show how many nodes are matching.

A pre built tar.gz as well as RPM and DEB packages are available at:
https://github.com/spotify/puppetexplorer/releases

-- 
Erik Dalén

-- 
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/CAAAzDLc5%3Dgth5LGEWMk6NRbtj88MAoY%3DMoaAv3o-j3MAdBjwcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Explorer 1.2.0 released

2014-08-26 Thread Erik Dalén
A new release of Puppet Explorer is out. It includes a new look which you
can check out at the new public demo site: http://demo.puppetexplorer.io/

Other highlights in this release is:

 * Abort unfinished background requests when filter changes
 * Show number of found nodes in node list
 * Much improved mobile experience
 * RPM build task, details are in README
 * Tests using recorded mock data from demo site PuppetDB
 * Warn if nodes haven't reported in more than X hours

Likely this is the last release that will work with PuppetDB 2.1, I expect
the next release to be using the coming structured facts support in
PuppetDB 2.2+

pre build deb:
http://dl.bintray.com/dalen/puppetexplorer-apt/puppetexplorer_1.2.0-1_amd64.deb

tar.gz:
http://dl.bintray.com/dalen/puppetexplorer/puppetexplorer-1.2.0.tar.gz

-- 
Erik Dalén
Systems Engineer, Site Reliability Engineering

-- 
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/CANn3uq3_t24HLxTKSrUKjRomxKc6%2B1-ih9PtT_htjwTHY1XzFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Re: Puppet 'node data' when using common node_names?

2014-08-26 Thread Erik Dalén
 different configurations?  It
 seems like you could have added such a validation pretty easily to your old
 scheme, and it might still be to your advantage to do so.  It would be easy
 to record in Hiera either which configurations each node is permitted to
 request, or which nodes (by certname) are permitted to request each
 configuration.



 Can you say a bit more about that?  What do you see that suggests agents
 are pulling down node information other than their catalogs (and later,
 any 'source'd files)?


 With nearly every puppet catalog compile, we also see GET requests like
 this:

 10.216.61.76 - XXX - puppet GET /production/node/xyz? HTTP/1.1 200
 13733 - - 0.021


 Where 10.216.61.76 is *not* the local IP of the puppet master... its the
 remote IP of the ELB, which indicates that its remote traffic from our
 puppet clients.



 That traffic might be coming from nodes, but all you know for sure is that
 it is traversing the ELB.  Surely the master could send requests through
 the ELB that end up coming back to it.  For all I know, the ELB might
 preferentially route such requests back to the originating host.

 From the perspective of the Puppet service lifecycle, the two most likely
 sources of such traffic are (1) an ENC retrieving node facts, and (2) the
 master determining nodes' environments.  I don't know any reason why nodes
 would be requesting their own node information, and even if they did, I
 can't see how that would affect the catalog the master serves to them.


The reason for them to do this is to be able to use the environment that
was configured on the master to fetch the plugins from. So first it tries
to fetch its node info from the master to see if the environment in that is
different than what it had configured locally. This is a new feature since
puppet 3.0.

In puppet 2.7 it used the fact plugins from the agent configured
environment and the catalog from the master configured if I remember
correctly.

-- 
Erik Dalén

-- 
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/CAAAzDLfcYrqvsgLWR-Rept1fSqsq6fVDNCKr5p4sohwfqayN4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] SRV Records and Multiple Masters

2014-07-20 Thread Erik Dalén
If you are using SRV records I would recommend just using the fqdn of the
server for the certs as it is pretty easy to point the SRV records to that
anyway. Then you can even reuse the agent cert as it has the necessary bits
to be used as a server cert.


On 18 July 2014 23:27, Paul Seymour paul.seym...@ig.com wrote:

 Hello,

 Just looking for a little best practice advice.

 If I am using DNS SRV records to load-balance and use multiple Puppet
 Masters, and CA servers (certificate data is sync'ed) which is the best
 recommended way of generating the master certificate ?

 So I set certname in the [master] section and can generate a cert in that
 name perhaps - curious to know how people set master CA stuff for hostnames
 other than that of the host it running on.
 If so do I have to set dns_alt_names or some such for all the possible
 physical hostnames ?  Or just worry about generating one for the certname
 setting in the master section of the config ? If so how
 would you go about generating a master certificate set for all of those ?

 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/e4f858b9-ecc7-4b9b-962f-f7d6554d9f0b%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/e4f858b9-ecc7-4b9b-962f-f7d6554d9f0b%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Erik Dalén

-- 
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/CAAAzDLecZOpo81bBsv%3DzPgqmp0-M87OtVwieNXkv3OZoqbajEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Announce: Puppet Explorer 1.1.0

2014-07-16 Thread Erik Dalén
Just released a new version of Puppet Explorer. This is mainly a
compatibility release for PuppetDB 2.1.0. It also drops support for
PuppetDB 2.0.0.

The source, more info and screenshots can be found at the Github page:
https://github.com/spotify/puppetexplorer

A built version of it ready for installation can be found here:
tar.gz:
http://dl.bintray.com/dalen/puppetexplorer/puppetexplorer-1.1.0.tar.gz
deb:
http://dl.bintray.com/dalen/puppetexplorer-apt/puppetexplorer_1.1.0-1_amd64.deb

--
Erik Dalén
Systems Engineer, Site Reliability Engineering

-- 
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/CANn3uq2%3Dvu34JrqSSh_WTpD%2BQi3XyxXgb9_6bFyu%3D9i0RtoWGA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Announce: Puppet Explorer 1.0.0

2014-07-02 Thread Erik Dalén
We would like to announce the first open source release of a web interface
for Puppet that we have created internally at Spotify.

Puppet Explorer is a web application for PuppetDB that lets you explore your
Puppet data.
It is made using AngularJS and CoffeeScript and runs entirely on the client
side, so the only backend that is needed is PuppetDB itself and a web
server to
share the static resources.

It has the same query language as the popular Puppet module
 dalen-puppetdbquery (https://forge.puppetlabs.com/dalen/puppetdbquery).
This lets you easily filter for a selection of nodes and show the events or
facts for only them. So you can handle hosts as groups without needing to
have
predefined groups, just make them up as you need and click on the pie
charts to
drill down further.

All views in the application are made to be able to link directly to them,
so
it is easy to share information you find with coworkers.

It has support for multiple PuppetDB servers.

It is using the V4 PuppetDB API, so therefore it needs PuppetDB 2.0. This is
currently marked as experimental, so PuppetDB 2.1 will likely break
compatibility but we should be able to create a fix for that quickly.

The source, more info and screenshots can be found at the Github page:
https://github.com/spotify/puppetexplorer

A built version of it ready for installation can be found here:
tar.gz:
http://dl.bintray.com/dalen/puppetexplorer/puppetexplorer-1.0.0.tar.gz
deb:
http://dl.bintray.com/dalen/puppetexplorer-apt/puppetexplorer_1.0.0-1_amd64.deb

A initial puppet module to manage it can be found here:
https://github.com/spotify/puppet-puppetexplorer

-- 
Erik Dalén
Systems Engineer, Site Reliability Engineering

-- 
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/CANn3uq1E3t4fQ0C8Ep%2B71jnMqixgPEmphPPHUevVfQe3vfxehg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] node clasification with fact ?

2014-06-19 Thread Erik Dalén
You an just put a if statement directly in the top scope of the site.pp
that does this, like:

# site.pp
if $::infra == 'newinfra' {
  include newinfra_baseclass
}


On 19 June 2014 09:02, kaustubh chaudhari kaustu...@gmail.com wrote:

 Hi All,


 I have a existing infrastructure with win and linux systems, i am creating
 a new infrastructure with same version of win and linux systems.

 In this i want to do.

 all the server from new infrastructure should get specific set of classes
 automatically soon their certificate is accepted.

 I was wondering to create custom fact say infra = newinfra

 if this fact exist apply all the classes mentioned else do nothing.

 This will make sure my existing setup is not affected by configuring
 site.pp and new infra will get the class required.

 Is this possible, if yes, can some one refer or share an example regarding
 this ?

 Thanks
 -Kaustubh

 --
 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/50103f6f-30c8-4404-9627-cb622d51c89e%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/50103f6f-30c8-4404-9627-cb622d51c89e%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Erik Dalén

-- 
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/CAAAzDLcMJcKnrcXAE8PjMSzgKfdgDx15tEkRB6PwxY395hwsow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How to get logs in to the same termianl in agent side

2014-06-18 Thread Erik Dalén
you will need to run the puppet agent with --verbose (or --test which
implied verbose) to actually display the output in the terminal.


On 18 June 2014 12:23, Malintha Adikari malin...@wso2.com wrote:

 Hi,

 I am executing a shell script in the puppet agent side. If I execute the
 same shell script in my local machine it will print several log messages to
 terminal. But when I execute it in the puppet agent it does not print any
 log into the agent terminal. How can I print the logs of the shell script
 when I run it using puppet ? I am using following command to execute the
 shell script.

 exec { strating:
 user   = 'root',
 environment = 'JAVA_HOME=/home/malintha/jdk1.6.0',
 path= $command_path,
 command= /pathToShellScript/myScript.sh,
* logoutput = true,*
 timeout = 3600,
 require = Exec['another goal'],
   }

 Regards,
 Malintha Adikari

 --
 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/dc3a5a66-8f3d-4efc-b1ab-e0f262efa746%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-users/dc3a5a66-8f3d-4efc-b1ab-e0f262efa746%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Erik Dalén

-- 
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/CAAAzDLeQgOt4T4Wqy4U-rtcVquimBC50%2BFFPd%3DxjrzzNikNW1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppetlabs support for squeeze

2014-06-16 Thread Erik Dalén
Debian has announced a long term support for debian squeeze:
https://www.debian.org/News/2014/20140616

I'm wondering if this will mean that Squeeze will stick around at
apt.puppetlabs.com for the same period?

-- 
Erik Dalén

-- 
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/CAAAzDLe303b91ZY7dpL1BOpgT-g_nKA9Oa_YgpRbHLsjNpFQqQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: [Puppet-dev] Tracking orphaned resources

2014-05-29 Thread Erik Dalén
There is /var/lib/puppet/state/state.yaml that records all resources ever
managed and when they were last checked  synced. However it only has the
type and title of the resources, so it might be tricky to actually find out
what they were in some cases.

I'm not aware of any tools that make good use of that file, but perhaps
someone else knows or you could come up with something.


On 29 May 2014 15:58, Martin Langhoff martin.langh...@gmail.com wrote:

 As the complexity of our $workplace puppet configuration grows, I am
 increasingly worried that puppet gives us very limited visibility over
 resources it no longer manages.

 In practical terms: if I mess up my class include/require/inherit
 structure so that a node A no longer indirectly includes module Foo,
 resources managed by Foo are present in A but orphaned.

 This is a lurking gotcha; and it can lead to subtle problems.

 Is there any tool that helps here, for example keeping a manifest of all
 resources ever managed by this puppet install? If not, I will probably try
 build that into ppg.

 Is there a way to ask puppet for a fuller, more explicit report of all
 resources tracked during a run?

 Thanks,

 m

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-dev+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-dev/CACPiFCLhd34r%3DNjC91kFOq97VGbUpbdWmYC1Z75CgirmO%2Btsug%40mail.gmail.comhttps://groups.google.com/d/msgid/puppet-dev/CACPiFCLhd34r%3DNjC91kFOq97VGbUpbdWmYC1Z75CgirmO%2Btsug%40mail.gmail.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Erik Dalén

-- 
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/CAAAzDLfhvdNW1CDGLv30RJOhOsTTU369QgvVSnSZe-AEBZUGwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Is --noop supposed to override noop param?

2014-05-17 Thread Erik Dalén
There is also $::clientnoop that can be used as default value. But usually
you would just want it unspecified.
On 13 May 2014 14:53, jcbollinger john.bollin...@stjude.org wrote:



 On Monday, May 12, 2014 1:06:34 PM UTC-5, Jakov Sosic wrote:

 On 05/12/2014 03:16 PM, Christopher Wood wrote:
  I get the same behaviour in 3.4.3, however:
 
  The noop setting allows you to globally enable or disable noop mode,
 but it will not override the noop metaparameter on individual resources.
 
  http://docs.puppetlabs.com/references/latest/metaparameter.html#noop
 
  No-op being false means that yes-op is (metaphorically) true, right? It
 looks like your module writer thinks that --noop should never override this
 resource.

 OK so if noop setting/cli param doesn't override resource param(s), then
 changing default from false to undef in modules seems to be the solution.



 Removing the noops parameter altogether is probably an even better
 solution.  Every single resource and class already has the 'noop'
 metaparameter.  If 'noop' is declared for a class, then every resource
 declared by that class also gets the same 'noop' parameter.  A noops
 ordinary parameter such as the one described not only reinvents the wheel,
 but does it badly.


 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/a7e0c2e9-b5c8-42dc-b268-f7a245025e3a%40googlegroups.comhttps://groups.google.com/d/msgid/puppet-users/a7e0c2e9-b5c8-42dc-b268-f7a245025e3a%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/CAAAzDLf-4Nn9SujCVgda0pC1qgETPYZzGwQ8nkUfh75CFHvzRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet hiera lookup skipping first module lookup on restarts or skipping first module completely.

2014-03-19 Thread Erik Dalén
That seems like a pretty bad bug. It is best if you file a issue about it
in JIRA so it doesn't get lost. jira.puppetlabs.com
On 13 Mar 2014 19:14, Toan Ngo toan@gmail.com wrote:

 I'm running puppet 3.4.3 with hiera 1.3.2.  I've been tracking this odd
 bug with my SSH module losing it's service name and lib path on occasion on
 my clients.  I was able to finally reproduce the behavior in master debug
 mode.

 First connected client after start of puppet master.

 Debug: Automatically imported sshdconfig from sshdconfig into production
 Debug: importing '/etc/puppet/modules/puppet/manifests/init.pp' in
 environment production
 Debug: Automatically imported puppet from puppet into production
 Debug: hiera(): Hiera JSON backend starting
 *NOTE: skipped looking for sshdconfig hieradata/module *
 Debug: hiera(): Looking up puppet::env in JSON backend
 Debug: hiera(): Looking for data source defaults
 Debug: hiera(): Cannot find datafile /etc/puppet/hieradata/defaults.json,
 skipping
 Debug: hiera(): Looking for data source x
 Debug: hiera(): Cannot find datafile /etc/puppet/hieradata/x.json,
 skipping
 Debug: hiera(): Looking for data source nodes/x
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/nodes/x.json, skipping
 Debug: hiera(): Looking for data source environments/production/Ubuntu
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/environments/production/Ubuntu.json, skipping
 Debug: hiera(): Looking for data source locations/Slough/Ubuntu
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/locations/Slough/Ubuntu.json, skipping
 Debug: hiera(): Looking for data source Ubuntu
 Debug: hiera(): Looking for data source common
 Debug: hiera(): Looking for data source global


 Subsequent client connections.
 Debug: No plugins found in subpath '/etc/puppet/modules/sshdconfig/lib'
 (file / directory does not exist)

 Info: 'replace facts' command for xx submitted to PuppetDB with UUID
 6d2c1cb5-3d0e-4339-a848-e1aa010f146b
 Debug: Using cached facts for xx
 Info: Caching node for xx
 Debug: hiera(): Looking up sshdconfig::service_name in JSON backend
 Debug: hiera(): Looking for data source defaults
 Debug: hiera(): Cannot find datafile /etc/puppet/hieradata/defaults.json,
 skipping
 Debug: hiera(): Looking for data source xx
 Debug: hiera(): Cannot find datafile /etc/puppet/hieradata/xx.json,
 skipping
 Debug: hiera(): Looking for data source nodes/xx
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/nodes/xx.json, skipping
 Debug: hiera(): Looking for data source environments/production/Ubuntu
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/environments/production/Ubuntu.json, skipping
 Debug: hiera(): Looking for data source locations/Slough/Ubuntu
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/locations/Slough/Ubuntu.json, skipping
 Debug: hiera(): Looking for data source Ubuntu
 Debug: hiera(): Looking up sshdconfig::sftp_lib_path in JSON backend
 Debug: hiera(): Looking for data source defaults
 Debug: hiera(): Cannot find datafile /etc/puppet/hieradata/defaults.json,
 skipping
 Debug: hiera(): Looking for data source xx
 Debug: hiera(): Cannot find datafile /etc/puppet/hieradata/xx.json,
 skipping
 Debug: hiera(): Looking for data source nodes/xx
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/nodes/xx.json, skipping
 Debug: hiera(): Looking for data source environments/production/Ubuntu
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/environments/production/Ubuntu.json, skipping
 Debug: hiera(): Looking for data source locations/Slough/Ubuntu
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/locations/Slough/Ubuntu.json, skipping
 Debug: hiera(): Looking for data source Ubuntu
 Notice: Scope(Class[main]): SSH SERVICE NAME is ssh
 Notice: Scope(Class[main]): SSH LIB_PATH is lib
 Debug: hiera(): Looking up puppet::env in JSON backend
 Debug: hiera(): Looking for data source defaults
 Debug: hiera(): Looking for data source nodes/xx
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/nodes/xx.json, skipping
 Debug: hiera(): Looking for data source environments/production/Ubuntu
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/environments/production/Ubuntu.json, skipping
 Debug: hiera(): Looking for data source locations/Slough/Ubuntu
 Debug: hiera(): Cannot find datafile
 /etc/puppet/hieradata/locations/Slough/Ubuntu.json, skipping
 Debug: hiera(): Looking for data source Ubuntu
 Debug: hiera(): Looking for data source common
 Debug: hiera(): Looking for data source global


  --
 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
 

Re: [Puppet Users] Style and Formatting Best Practice

2014-02-21 Thread Erik Dalén
Personally I prefer the second style in both cases. That is also what
vim-puppet will do when autoindenting files.


On 20 February 2014 17:51, Charles McLaughlin mclaughli...@gmail.comwrote:

 Hello,

 I'm trying to develop Puppet style guidelines at my job and would like
 some feedback and opinions on a few patterns.

 Example 1 - notice the difference in ) indention
 (often we have many parameters, which is why we're in the habit of
 listening them on a separate)

 class foo {
   $param
   ) {
   class { 'bar':
 blah = $param,
   }
 }

 Versus:

 class foo {
   $param
 ) {
   class { 'bar':
 blah = $param,
   }
 }

 Example 2 - notice the indentation of the required Files

 class foo {
   package { 'bar':
 requires = [ File[1],
   File[2] ]
   }
 }

 Versus:

 class foo {
   package { 'bar':
 requires = [
   File[1],
   File[2]
 ]
   }
 }

 Thanks,
 Charles

  --
 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/cd426918-0dc6-4c61-b866-cbf750384c52%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

-- 
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/CAAAzDLfQaBd6-iNT0VY0B4xcg88Rr4VMwrRra_mdrn5tRDW9eA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] return codes from puppet command

2014-02-19 Thread Erik Dalén
-- test/-t turns on the detailed exit codes option


On 19 February 2014 08:33, Andrey Kozichev akozic...@gmail.com wrote:

 puppet help agent

 * --detailed-exitcodes:

   Provide transaction information via exit codes. If this is enabled, an
 exit

   code of '2' means there were changes, an exit code of '4' means there
 were

   failures during the transaction, and an exit code of '6' means there
 were both

   changes and failures.




 On 19 February 2014 09:28, Mikael Lindqvist li.mik...@gmail.com wrote:

 Hi,

 Where are the return codes from the puppet command documented?

 I have seen 0, 2 and 6 and by the look of it they all seem to signal
 success, but it would be nice to see a list of them.

 Thanks!

 // Mikael

 --
 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/13097d50-fbcc-4ba6-9e09-ca19913a34c0%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/CACzr%3DFfx63DUObLDMknDeGOuMiKk9xY9-52MjQRYJFNqcYO%3D3Q%40mail.gmail.com
 .

 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

-- 
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/CAAAzDLeu9eTy2HmPSsoE853Zrd0etoeXFvPysMpkAqEa_c78Rw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Announce: puppetdbquery 1.4.0

2014-02-11 Thread Erik Dalén
Grab it while it is hot, improvements since 1.3.3:

- Support for regexp matching resource titles, like:
   File[~titleregexp]
- More tests
- Only require JSON gem when actually needed
- Allow empty queries (returns all hosts)
- Don't require pluginsync to run on master
- Fix strftime call on old ruby versions
- Improve facts query output
- Support single quoted strings in queries as well as double quoted

http://forge.puppetlabs.com/dalen/puppetdbquery

--
Erik Dalén

-- 
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/CAAAzDLfGpF_gA7sJj0BHgpj_OdL-nOgyHHMHzvd%2BnWbw6sk14Q%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Optimizing the Puppet CA using Apache

2014-01-16 Thread Erik Dalén
In the simple testing I did I found that they were an order of magnitude
faster. But in general these are requests Puppet only does on the first run
for that host, so it won't be a big speedup of Puppet in general. More like
cutting 0.5 seconds from the first run or so :)

But in our case we wanted to update the CRL when it had changed on the
server, so this allowed us to have a curl with the -z option run before
puppet that downloads it only if it is changed. Puppet itself doesn't
support caching headers, but Apache does of course when serving static
files.

I can see if I can make a proper benchmark though.


On 15 January 2014 09:48, Matthias Saou matth...@saou.eu wrote:

 On Tue, 14 Jan 2014 16:31:40 +0100
 Erik Dalén erik.gustav.da...@gmail.com wrote:

  I did a bit of a hack to serve the static files in the Puppet CA
  directly using Apache instead of going through the Ruby layer and
  indirector. It speeds things up quite a lot and also allows use of
  HTTP caching headers like IfModifiedSince etc.
 
  So here's some instructions on how to do it:
  https://gist.github.com/dalen/8419913
 
  Works for me, but no guarantees etc :)

 This is a simple and interesting change. Care to share some numbers
 about the speeds things up quite a bit part? :-)

 Matthias

 --
 Matthias Saou  ██  ██
  ██  ██
 Web: http://matthias.saou.eu/  ██
 Mail/XMPP:  matth...@saou.eu   ██  
██
 GPG: 4096R/E755CC63██  ██  ██
  8D91 7E2E F048 9C9C 46AF  ██  ██  ██  ██
  21A9 7A51 7B82 E755 CC63  

 --
 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/20140115094835.28088937%40r2d2.marmotte.net
 .
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

-- 
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/CAAAzDLej1Xjr-QHwpFcD3QVwxJyL7KbpeDox3A7jT9NAUVsi1w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: Choo choo here comes the FOSDEM train

2014-01-14 Thread Erik Dalén
I'll be there (and at puppet camp amsterdam before and cfgmgmt.eu the days
after).

Github: https://github.com/dalen/

probably won't be wearing the glasses I have on the picture there :)


On 14 January 2014 10:09, Alexander Swen alex.s...@gmail.com wrote:

 I will be there

 Op vrijdag 10 januari 2014 22:13:17 UTC+1 schreef Daniele Sluijters:

 Hi everyone,

 It's not exactly a secret that FOSDEM will be taking place during the
 first weekend of February at the usual location, the ULB Solbosch campus in
 Brussels. It's also not that big of a secret that a lot of Puppeteers
 attend especially now that we have a Configuration Management room.

 However, it usually is a secret who will be there and that more difficult
 to get in touch with each other because everyone's running about going to
 interesting talks. Plus, not everyone knows everyone.

 So I'd like to propose two things:
  * If you're going to FOSDEM, reply to this e-mail, drop a line with your
 name, nickname and if you're comfortable with it, a picture so that people
 might recognise you;
  * Join the meetup, which will likely involve food and drinks at your own
 expense. If you're up for it, feel free to register here (or not, doesn't
 matter but it's nice for in your calendar): https://www.
 eventbrite.com/e/puppet-community-fosdem-meetup-tickets-5242929744

 Now I just have to hope a few people will show up :).

 --
 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/9c413f3f-733a-4269-a36c-f5a869db008f%40googlegroups.com
 .

 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

-- 
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/CAAAzDLf99yYLCFBhGBypVHCa0PEixEbwXK_kKi%2BYGZcr201Y6A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Optimizing the Puppet CA using Apache

2014-01-14 Thread Erik Dalén
I did a bit of a hack to serve the static files in the Puppet CA directly
using Apache instead of going through the Ruby layer and indirector.
It speeds things up quite a lot and also allows use of HTTP caching headers
like IfModifiedSince etc.

So here's some instructions on how to do it:
https://gist.github.com/dalen/8419913

Works for me, but no guarantees etc :)

-- 
Erik Dalén

-- 
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/CAAAzDLdWmhDBDVj-oF8AjExW_7PvSDR%3DYhWK_9F13%2B%2B9C6pdLQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet master stopped loading facts since puppetdb installation

2013-12-19 Thread Erik Dalén
Sounds like there could be something wrong with your routes.yaml file. Does
it look like this example?
http://docs.puppetlabs.com/puppetdb/latest/connect_puppet_master.html#edit-routesyaml


On 18 December 2013 08:27, cko dert...@gmail.com wrote:

 Every node (except for the master) does something like this when i run
 puppet agent -t:


 root@node1:~$ puppet agent -t
 Info: Retrieving plugin
 Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/environment.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/ssh_hostkey_localhost.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/fsecure_version.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
 Info: Loading facts in
 /var/lib/puppet/lib/facter/iptables_persistent_version.rb
 Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb
 Info: Caching catalog for node1.local.domain
 Info: Applying configuration version '1386350341'
 Notice: Finished catalog run in 25.51 seconds


 The puppet master however doesn't.

 An example on how this affects the functionality:

 I use a template that manages the /etc/motd file.
 It contains the fact kernelrelease. Meaning after i update the kernel on
 the master, this information is supposed to be updated. (I'm still talking
 about the master server, every other nodes works as expected!)
 But since the master doesn't load facts on a run, the motd file doesn't
 get updated.



 On Wednesday, December 18, 2013 12:13:09 AM UTC+1, Deepak Giridharagopal
 wrote:

 On Dec 17, 2013, at 9:56 AM, cko der...@gmail.com wrote:

 hey,

 so i just installed puppetdb on a dedicated server (with pgsql).

 I noticed that the puppet master server doesn't load any facts.


 What do you mean doesn't load any facts? What is the problem you're
 seeing?


 root@puppetmaster:~$ puppet agent -t
 Info: Retrieving plugin
 Info: Caching catalog for puppetmaster.local.domain
 Info: 'replace catalog' command for puppetmaster.local.domain submitted
 to PuppetDB with UUID 87de0ebc-1543-4b8a-8434-ca9220238fda
 Info: Applying configuration version '1387297065'
 Notice: Finished catalog run in 20.88 seconds


 Is this intended? Or did i miss something while installing and connecting
 puppetDB?

 --
 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.

 To view this discussion on the web visit https://groups.google.com/d/
 msgid/puppet-users/18ad2d51-9259-4abb-97a4-5b28bd77eee0%
 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/4f188ea4-bab7-4b30-9154-07b22ad4bc88%40googlegroups.com
 .

 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

-- 
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/CAAAzDLfSmo4rxRbTRtuO-1g5kP2GTFR85NaO94-zVsXmxv-NbA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Is there any example to collect IPs of other nodes to generate a hash to be used in mysql_grant

2013-12-19 Thread Erik Dalén
If you use puppetdb you can use my puppetdbquery module:
http://forge.puppetlabs.com/dalen/puppetdbquery

You will get it as a array of IP addresses though. But should be easier to
go from there at least. If you use the future parser it is fairly trivial
to convert that to a hash, in the old parser such conversion requires a
little more trickery, possibly with some of the stdlib functions.


On 19 December 2013 01:55, Pan Luo luopa...@gmail.com wrote:

 Hi there,

 I'm trying to setup the permissions on mysql database with multiple web
 servers using puppet-mysql module. I would like to collect all IPs of the
 web servers and run grant on the database server.

 It seems exported resources might help. The only way I can think of right
 now is to export the file resources on each web node with IP as the content
 and collect them on the db node. Then I have to load those file content
 using a custom function. Then generate a hash from them that will be sent
 to mysql::server grants variable.

 Is there a easier way to do it? 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/bfe2880e-0f5c-4f6d-b65b-9e832f4f9510%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

-- 
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/CAAAzDLec-W3JiByPR2V5UuRFpoof1t803mcUmPgfNDLJDrjfEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] custom fact should not run on Solaris

2013-12-19 Thread Erik Dalén
you should put the code of the fact inside the setcode block, so:

require 'facter'
Facter.add(:spacewalk) do
  confine :osfamily = RedHat
  setcode do
f = File.new(/etc/sysconfig/rhn/up2date)
text = f.read
if text =~ /sv2653/ then
  true
else
  false
end
  end
end

or even simplify it to:

require 'facter'
Facter.add(:spacewalk) do
  confine :osfamily = RedHat
  setcode { !!(File.read(/etc/sysconfig/rhn/up2date) =~ /sv2653/) }
end



On 19 December 2013 14:26, Andreas Dvorak andreas.dvo...@gmail.com wrote:

 Dear all

 thank you for helping me.
 My solution is this:
 require 'facter'
 Facter.add(:spacewalk) do
   confine :osfamily = RedHat
 f = File.new(/etc/sysconfig/rhn/up2date)
 text = f.read
 if text =~ /sv2653/ then
   setcode do true end
 else
   setcode do false end
 end
 end

 Best regards
 Andreas

 --
 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/9f5a8416-960f-470d-84b8-1903c0315f00%40googlegroups.com
 .

 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

-- 
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/CAAAzDLfbRLrNnjDfbqyBskyzScde%2BiOEVmV1iMpneQC%3DjK_Egg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] get a *structured* version of the puppet agent output

2013-12-18 Thread Erik Dalén
If that is all you want, run it with --write-catalog-summary and examine
the resourcefile (puppet apply --configprint resourcefile)


On 16 December 2013 14:14, David Portabella david.portabe...@gmail.comwrote:

 Hi, thanks again for the info.

 This seems an overcomplicated issue. Just to step back and look at the
 global picture:
 we are just asking to get the list of all resources updated when executing
 puppet apply in a non master/agent puppet environment.
 this should be a basic functionality; we are not asking something weird.

 after Christmas I'll take a look at installing PuppetDB in the same
 virtual machine, connecting puppet apply to it, and try to get the list of
 resources updated by puppet apply.


 Regards,
 David

 On Sunday, December 15, 2013 8:59:37 PM UTC+1, Charlie Sharpsteen wrote:

 On Friday, December 13, 2013 2:43:41 PM UTC-8, David Portabella wrote:


 is there a way to get the list of resources created when using a puppet
 apply (instead of puppet agent)?

 the point is that we need this when refactoring puppet modules, in order
 to test the modules in a vagrant machine and check that there are not
 regression issues.
 so, i run our current puppet modules in a vagrant machine, get the list
 of all puppet resources created,
 then i refactor the puppet modules, i run again the refactored puppet
 modules in a new vagrant machine,
 and i compare all the files and other resources.

  If you are looking to keep track of resources while refactoring, then
 there are a few approaches you can take:

1. Add another VM to your Vagrant environment that runs a Puppet
Master and do the refactoring there. This gives you access to tools such 
 as
PuppetDB and the Dashboard while also simulating how your refactor will
affect an agent/master setup.
2. Set up your VM such that puppet apply submits the catalog and
reports to PuppetDB: https://docs.puppetlabs.com/

 puppetdb/1.5/connect_puppet_apply.htmlhttps://docs.puppetlabs.com/puppetdb/1.5/connect_puppet_apply.html
3. Configure configure YAML caching for puppet apply in
/etc/puppet/routes.yaml:


 ---
 apply:
   catalog:
 cache: yaml

 This will cause puppet apply to save a copy of the last compiled catalog
 to /var/lib/puppet/state/client_yaml/catalog/certname.yaml. The
 information in this file can be combined with the report in
 /var/lib/puppet/state/last_run_report.yaml to create a list of applied
 resources along with their properties and resulting changes.

 The first two approaches will cut down on the amount of custom code you
 need to write as the task of parsing and storing the reports and catalogs
 is handled by PuppetDB or the dashboard. Approach 3 works as well and
 offers a lot of control, but you will need to write a bit of code that
 extracts data from the catalog and report files before you can focus on the
 analysis.
 --
 Charlie Sharpsteen
 Open Source Support Engineer
 Puppet Labs

  --
 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/6d2793ce-0b9f-468b-bc35-76b149f31f46%40googlegroups.com
 .

 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

-- 
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/CAAAzDLdZKfuqaOSWzgZYuJFHCaJ6oYgnSbUQ3RcMe0hkivcvhw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] get a *structured* version of the puppet agent output

2013-12-18 Thread Erik Dalén
Well, that is actually all resources managed rather than all resources
changed. The changed resources are in the report. In my case we use
puppetdb for report querying.


On 18 December 2013 17:41, Erik Dalén erik.gustav.da...@gmail.com wrote:

 If that is all you want, run it with --write-catalog-summary and examine
 the resourcefile (puppet apply --configprint resourcefile)


 On 16 December 2013 14:14, David Portabella david.portabe...@gmail.comwrote:

 Hi, thanks again for the info.

 This seems an overcomplicated issue. Just to step back and look at the
 global picture:
 we are just asking to get the list of all resources updated when
 executing puppet apply in a non master/agent puppet environment.
 this should be a basic functionality; we are not asking something weird.

 after Christmas I'll take a look at installing PuppetDB in the same
 virtual machine, connecting puppet apply to it, and try to get the list of
 resources updated by puppet apply.


 Regards,
 David

 On Sunday, December 15, 2013 8:59:37 PM UTC+1, Charlie Sharpsteen wrote:

 On Friday, December 13, 2013 2:43:41 PM UTC-8, David Portabella wrote:


 is there a way to get the list of resources created when using a puppet
 apply (instead of puppet agent)?

 the point is that we need this when refactoring puppet modules, in
 order to test the modules in a vagrant machine and check that there are not
 regression issues.
 so, i run our current puppet modules in a vagrant machine, get the list
 of all puppet resources created,
 then i refactor the puppet modules, i run again the refactored puppet
 modules in a new vagrant machine,
 and i compare all the files and other resources.

  If you are looking to keep track of resources while refactoring, then
 there are a few approaches you can take:

1. Add another VM to your Vagrant environment that runs a Puppet
Master and do the refactoring there. This gives you access to tools such 
 as
PuppetDB and the Dashboard while also simulating how your refactor will
affect an agent/master setup.
2. Set up your VM such that puppet apply submits the catalog and
reports to PuppetDB: https://docs.puppetlabs.com/

 puppetdb/1.5/connect_puppet_apply.htmlhttps://docs.puppetlabs.com/puppetdb/1.5/connect_puppet_apply.html
3. Configure configure YAML caching for puppet apply in
/etc/puppet/routes.yaml:


 ---
 apply:
   catalog:
 cache: yaml

 This will cause puppet apply to save a copy of the last compiled
 catalog to /var/lib/puppet/state/client_yaml/catalog/certname.yaml.
 The information in this file can be combined with the report in
 /var/lib/puppet/state/last_run_report.yaml to create a list of applied
 resources along with their properties and resulting changes.

 The first two approaches will cut down on the amount of custom code you
 need to write as the task of parsing and storing the reports and catalogs
 is handled by PuppetDB or the dashboard. Approach 3 works as well and
 offers a lot of control, but you will need to write a bit of code that
 extracts data from the catalog and report files before you can focus on the
 analysis.
 --
 Charlie Sharpsteen
 Open Source Support Engineer
 Puppet Labs

  --
 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/6d2793ce-0b9f-468b-bc35-76b149f31f46%40googlegroups.com
 .

 For more options, visit https://groups.google.com/groups/opt_out.




 --
 Erik Dalén




-- 
Erik Dalén

-- 
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/CAAAzDLdTcE0nAObFJC0ZgPSEiXA2ST1hOz8g8LYkXEh1PC61EQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet Labs issue tracker migration 16 Dec 2013

2013-12-16 Thread Erik Dalén
What is the desired workflow for submitting a pull request for a ticket?

The old field for branch seems gone and the issue status In topic branch
awaiting review is gone as well.
The workflow menu shows 25 different issue statuses and I have no clue
which one to choose.


On 10 December 2013 19:51, Eric Sorenson eric.soren...@puppetlabs.comwrote:

 Hi, as I mailed about a little while ago[1], we're migrating issue
 tracking for Puppet Labs projects from Redmine to JIRA.

 After working through the tooling and integration concerns, we're going to
 make the switch on 16th of December.

 More info on how this will work:

 * Everybody needs to create a new account on JIRA, since we can’t migrate
 passwords from redmine to jira.
 * If you were watching redmine bugs to track their progress, you will be
 notified via email with the new location of the bug in JIRA. You'll need to
 set yourself up to watch the bug in JIRA with your newly-created account.
 * Some older issues that we think are obsolete will not be migrated, but
 if we made a mistake and forgot to include your favorite bug, there will be
 a link on each Redmine issue where you can migrate it with a single click.
 * The Redmine instance will remain up and read-only, because there's a ton
 of back history, outgoing links, google indexing, etc that is quite
 valuable to keep.
 * Projects that use github issues will also migrate, but pull request
 workflow remains as-is.

 Please let me know if you have any additional questions.

 [1] https://groups.google.com/d/topic/puppet-users/4lV1cT6Li-M/discussion

 --
 Eric Sorenson - eric.soren...@puppetlabs.com - freenode #puppet: eric0
 puppet platform // coffee // techno // bicycles

 --
 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/52A762C7.8080709%40puppetlabs.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

-- 
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/CAAAzDLcqJ800m%2BxvUsBnQgujVM22YU8zyiPGubadNz9FNpcs_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: Puppet 3.2: add element to array

2013-10-24 Thread Erik Dalén
It is possible in a lot of puppet versions but it is a bug and might get
fixed.

$a = [1,2]
$a[2]=3
notice($a)


On 22 October 2013 15:20, jcbollinger john.bollin...@stjude.org wrote:



 On Monday, October 21, 2013 1:21:18 PM UTC-5, Sergey Arlashin wrote:

 Hi!
 Is it possible to add a new element to an array inside puppet manifest ?
 Something like ruby's array.push('new_element') ?



 No, it isn't.  It is a fundamental principle of Puppet that variables'
 values cannot be changed once set.

 In particular, the += operator Daniele refers to does not do quite what
 she supposes: it sets the initial value of a local variable by appending
 data to the value of a *separate* variable of the same name at top scope,
 node scope, or a parent scope (
 http://docs.puppetlabs.com/puppet/3/reference/lang_variables.html#appending-assignment).
 That may be sufficient for your needs, but it is not what you actually
 asked, and I would not expect the code Daniele presented to work.


 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 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.




-- 
Erik Dalén

-- 
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.


[Puppet Users] Re: [Puppet-dev] Status of Data in modules

2013-10-14 Thread Erik Dalén
/**manifests/params.pp

 class webserver::params {   ## nothing changes here...
  $packages = $operatingsystem ? {
/(?i-mx:ubuntu|debian)/= 'apache2',
/(?i-mx:centos|fedora|redhat)**/ = 'httpd',
  }
  $vhost_dir = $operatingsystem ? {
/(?i-mx:ubuntu|debian)/= '/etc/apache2/sites-enabled',
/(?i-mx:centos|fedora|redhat)**/ = '/etc/httpd/conf.d',
  }
 }

 # /etc/puppet/modules/webserver/**manifests/init.pp

 class webserver(  ## inheritance is gone, and
  $packages,   ## data bindings look up the defaults
  $vhost_dir   ## as webserver::params::vhost_dir
 ) {

  package { $packages: ensure = present }

  file { 'vhost_dir':
path   = $vhost_dir,
ensure = directory,
mode   = '0750',
owner  = 'www-data',
group  = 'root',
  }
 }

 # /etc/puppet/manifests/site.pp

 node default {
   class { 'webserver': }  ## no params needed, they're in hiera

 ## then in one of my site-wide hiera layers, I can override
 ## the value without modifying the module or class declaration

 # /etc/puppet/hieradata/**snowflake.domain.com.yaml
 webserver::vhost_dir: '/some/other/dir'

 This way the module author (who probably has the most work to do and
 needs the expressiveness of the DSL) can provide default data, but site
 administrators can still override it using mechanisms they're already using.

 Note too that this is the next iteration, not necessarily the end state.
 It's super important to get this right because the whole community is going
 to have to live with it for a long time; those of you out here on the
 bleeding edge willing to risk some skin to make something awesome are
 critical to making that happen.


 Eric Sorenson - eric.s...@puppetlabs.com - freenode #puppet: eric0

 puppet platform // coffee // techno // bicycles


 [puppetlabs-ntp]: https://github.com/apenney/**
 puppetlabs-ntp/tree/data-in-**moduleshttps://github.com/apenney/puppetlabs-ntp/tree/data-in-modules
 [startrek]: https://github.com/pro-puppet/**puppet-module-startrek
 [param-classeshttps://github.com/pro-puppet/puppet-module-startrek%5Bparam-classes]:
 http://docs.puppetlabs.com/**guides/parameterized_classes.**
 html#appendix-smart-parameter-**defaultshttp://docs.puppetlabs.com/guides/parameterized_classes.html#appendix-smart-parameter-defaults
 [15746]: 
 https://projects.puppetlabs.**com/issues/15746https://projects.puppetlabs.com/issues/15746

 --
 You received this message because you are subscribed to the Google
 Groups Puppet Developers group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to puppet-dev+...@**googlegroups.com.
 To post to this group, send email to puppe...@googlegroups.com.

 Visit this group at 
 http://groups.google.com/**group/puppet-devhttp://groups.google.com/group/puppet-dev
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .


  --
 You received this message because you are subscribed to the Google Groups
 Puppet Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-dev+unsubscr...@googlegroups.com.
 To post to this group, send email to puppet-...@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-dev.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

-- 
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.


[Puppet Users] Re: [Puppet-dev] Re: Announce: PuppetDB 1.5.0 Available

2013-10-01 Thread Erik Dalén

   This endpoint is similar to the `event-counts` endpoint, but rather than
   aggregating the counts on a per-node, per-resource, or per-class basis,
   it returns aggregate counts across your entire population.

 * New `server-time` endpoint

   This endpoint simply returns a timestamp indicating the current time on
   the PuppetDB server.  This can be used as input to time-based queries
   against timestamp fields that are populated by PuppetDB.

 * Minor changes to `resources` endpoint for `v3`

   The `sourcefile` and `sourceline` fields have been renamed to `file`
 and `line`,
   for consistency with other parts of the API.

 * Minor changes relating to reports storage and query

   * `store report` command has been bumped up to version `2`.
   * Report data now includes a new `transaction-uuid` field; this is
 generated
 by Puppet (as of Puppet 3.3) and can be used to definitively
 correlate a report
 with the catalog that was used for the run.  This field is queryable
 on the
 `reports` endpoint.
   * Reports now support querying by the field `hash`; this allows you to
 retrieve
 data about a given report based on the report hash for an event
 returned
 by the `events` endpoint.

 * Minor changes relating to catalog storage

   * `store catalog` command has been bumped to version `3`.
   * Catalog data now includes the new `transaction-uuid` field; see notes
 above.

 Bug fixes:

 * PuppetDB report processor was truncating microseconds from report
 timestamps;
   all timestamp fields should now retain full precision.

 * Record resource failures even if Puppet doesn't generate an event for
 them in the
   report: in rare cases, Puppet will generate a report that indicates a
 failure
   on a resource but doesn't actually provide a failure event.  Prior to
 PuppetDB
   1.5, the PuppetDB report processor was only checking for the existence
 of
   events, so these resources would not show up in the PuppetDB report.
  This is
   really a bug in Puppet (which should be fixed as of Puppet 3.3), but
 the PuppetDB
   report processor is now smart enough to detect this case and synthesize
 a failure
   event for the resource, so that the failure is at least visible in the
 PuppetDB
   report data.

 * Filter out the well-known Skipped Schedule events: in versions of
 Puppet prior
   to 3.3, every single agent report would include six events whose status
 was
   `skipped` and whose resource type was `Schedule`.  (The titles were
 `never`,
   `puppet`, `hourly`, `daily`, `weekly`, and `monthly`.)  These events
 were not
   generally useful and caused a great deal of pollution in the PuppetDB
 database.
   They are no longer generated as of Puppet 3.3, but for compatibility
 with
   older versions of Puppet, the report terminus in PuppetDB 1.5 will
 filter
   these events out before storing the report in PuppetDB.

 * Log a message when a request is blocked due to the certificate
 whitelist:
   prior to 1.5, when a query or command was rejected due to PuppetDB's
 certificate
   whitelist configuration, there was no logging on the server that could
 be used
   to troubleshoot the cause of the rejection.  We now log a message, in
 hopes of
   making it easier for administrators to track down the cause of
 connectivity
   issues in this scenario.

 * (#22122) Better log messages when puppetdb-ssl-setup is run before
 Puppet
   certificates are available.

 * (#22159) Fix a bug relating to anonymizing catalog edges in exported
 PuppetDB
   data.

 * (#22168) Add ability to configure maximum number of threads for Jetty
 (having too
   low of a value for this setting on systems with large numbers of cores
 could
   prevent Jetty from handling requests).


  --
 You received this message because you are subscribed to the Google Groups
 Puppet Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-dev+unsubscr...@googlegroups.com.
 To post to this group, send email to puppet-...@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-dev.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Erik Dalén

-- 
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] best practice for managing multiple stanzas within a config file?

2013-10-01 Thread Erik Dalén
Looks like it is the inifile format, so take a look at
https://github.com/puppetlabs/puppetlabs-inifile


On 1 October 2013 00:35, Thomas thomas.e.ke...@gmail.com wrote:

 What is the best way to manage multiple stanza within a config file?

 For a splunk configuration file (inputs.conf) I need to manage some thing
 like

 [monitor://var/log]
 blacklist = someRegularExpression
 whitelist = someOtherRegularExpression

 [monitor://var/lib/ourApp]


 There can be multiple monitor stanzas and each may or may not have a
 whitelist or blacklist.

 I haven't found any thing on the forge or in this group regarding best
 practice for managing stanzas within a config file.

 I've tried a few different combinations of templates, concat and define
 and haven't found a clean solution yet to construct the stanza.

 Any suggestions would be appreciated.

 Thanks! Thomas

  --
 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.




-- 
Erik Dalén

-- 
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] PuppetDB 1.4.0 on OpenSuSE

2013-09-29 Thread Erik Dalén
On a normal setup puppet master --configprint ssldir and puppet agent
--configprint ssldir should return the same thing. And normally you don't
have your master configuration on agent nodes.
But doing that sort of fallback sounds like a good solution that should
cover most cases well.


On 27 September 2013 20:13, Jeffrey Watts jeffrey.w.wa...@gmail.com wrote:

 My concern is that after downloading the PuppetDB RPM from PuppetLabs it
 should not throw errors on installation, which it currently does if you
 install it on a server that is not the master.  I also believe that having
 the PuppetDB separate from the Puppetmaster is not an edge case (I'd
 actually argue it's best practice, especially in this era of
 virtualization).

 Gary Wilson's proposed patch seems to solve the problem - try 'puppet
 master' first, and then fall back to 'puppet agent'.  IMHO if someone has a
 more complicated setup where that wouldn't work, then the onus should be on
 them to modify puppetdb-ssl-setup.

 Thanks for your consideration,
 Jeffrey.



 On Fri, Sep 27, 2013 at 6:26 AM, Ken Barber k...@puppetlabs.com wrote:

  Lastly, the puppetdb-ssl-setup script still does not work when the
 PuppetDB
  does not reside on the Puppetmaster.  The fix is pretty simple, and the
  issue is in the bug tracker.  I created a question and answer on
  ask.puppetlabs.com to try and help others that run into it:
 
 https://ask.puppetlabs.com/question//puppetdbs-puppetdb-ssl-setup-script-does-not-work-when-the-puppetdb-is-not-on-the-puppetmaster/

 So the ticket for those reading along at home is here:

 http://projects.puppetlabs.com/issues/17523

 And I must admit its controversial but saying it 'doesn't work' isn't
 entirely true. More precisely there are situations where it doesn't
 work, and I want to hear what people have to add to this - as its a
 really interesting topic that we probably need some community feedback
 on.

 Let me show you an example, with an empty puppet.conf ... the settings
 returned are identical:

 root@puppetdb1:~# puppet apply --configprint  hostcert
 /etc/puppet/ssl/certs/puppetdb1.vm.pem
 root@puppetdb1:~# puppet master --configprint  hostcert
 /etc/puppet/ssl/certs/puppetdb1.vm.pem

 But when you have overrides in relation to agent/master that create
 differences between the [master] and [agent] sections things go wrong.
 Try this one on for size:

 root@puppetdb1:~# cat /etc/puppet/puppet.conf
 [master]
 ssldir = /tmp

 [agent]
 ssldir = /tmp2
 root@puppetdb1:~# puppet master --configprint  hostcert
 /tmp/certs/puppetdb1.vm.pem
 root@puppetdb1:~# puppet agent --configprint  hostcert
 /tmp2/certs/puppetdb1.vm.pem

 So like I said ... this is actually fine for some people, and
 preferential, but for others its not fine. The question is, what is
 the better default I think.

 So in my opinion I would have thought that agent was a better default
 over master as some people presume, but that changed some time ago in
 0.9.2:


 https://github.com/puppetlabs/puppetdb/commit/de23912a73f6adadf36f26d438939d4c9e49a68b

 I suppose there are arguments for either direction, but I'm not as
 clear on the direction to move this to use the [master] section
 specifically. I can't help but feel its a less common case. Erik -
 perhaps you can chime in on the thread and give us your reasoning for
 wanting this in the first place?

 I guess we have been apprehensive on moving on that ticket because
 changing default behaviour is often scary ... if we change it its
 going to break for some people without a doubt. So what is the answer?
 Perhaps a flag to allow people to choose? What do people think the
 setting should be, and why?

 ken.

 --
 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.




-- 
Erik Dalén

-- 
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] PuppetDB 1.4.0 on OpenSuSE

2013-09-27 Thread Erik Dalén
On 27 September 2013 13:26, Ken Barber k...@puppetlabs.com wrote:

  Lastly, the puppetdb-ssl-setup script still does not work when the
 PuppetDB
  does not reside on the Puppetmaster.  The fix is pretty simple, and the
  issue is in the bug tracker.  I created a question and answer on
  ask.puppetlabs.com to try and help others that run into it:
 
 https://ask.puppetlabs.com/question//puppetdbs-puppetdb-ssl-setup-script-does-not-work-when-the-puppetdb-is-not-on-the-puppetmaster/

 So the ticket for those reading along at home is here:

 http://projects.puppetlabs.com/issues/17523

 And I must admit its controversial but saying it 'doesn't work' isn't
 entirely true. More precisely there are situations where it doesn't
 work, and I want to hear what people have to add to this - as its a
 really interesting topic that we probably need some community feedback
 on.

 Let me show you an example, with an empty puppet.conf ... the settings
 returned are identical:

 root@puppetdb1:~# puppet apply --configprint  hostcert
 /etc/puppet/ssl/certs/puppetdb1.vm.pem
 root@puppetdb1:~# puppet master --configprint  hostcert
 /etc/puppet/ssl/certs/puppetdb1.vm.pem

 But when you have overrides in relation to agent/master that create
 differences between the [master] and [agent] sections things go wrong.
 Try this one on for size:

 root@puppetdb1:~# cat /etc/puppet/puppet.conf
 [master]
 ssldir = /tmp

 [agent]
 ssldir = /tmp2
 root@puppetdb1:~# puppet master --configprint  hostcert
 /tmp/certs/puppetdb1.vm.pem
 root@puppetdb1:~# puppet agent --configprint  hostcert
 /tmp2/certs/puppetdb1.vm.pem

 So like I said ... this is actually fine for some people, and
 preferential, but for others its not fine. The question is, what is
 the better default I think.

 So in my opinion I would have thought that agent was a better default
 over master as some people presume, but that changed some time ago in
 0.9.2:


 https://github.com/puppetlabs/puppetdb/commit/de23912a73f6adadf36f26d438939d4c9e49a68b

 I suppose there are arguments for either direction, but I'm not as
 clear on the direction to move this to use the [master] section
 specifically. I can't help but feel its a less common case. Erik -
 perhaps you can chime in on the thread and give us your reasoning for
 wanting this in the first place?


In our setup we have a main puppet infrastructure and a couple of child
infrastructures. Each puppet setup has its own CA. The puppetmasters in the
children are agents to the main puppet infrastructure, so they have a
separate ssldir for the master. With this change it just worked out of the
box if we co-hosted a puppetdb instance on them as it would use the ssldir
from the master.

-- 
Erik Dalén

-- 
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: Generating a variable based on the hostname

2013-09-27 Thread Erik Dalén
On 27 September 2013 16:17, jcbollinger john.bollin...@stjude.org wrote:



 On Friday, September 27, 2013 4:47:49 AM UTC-5, Romain PELISSE wrote:

 Hi all,

 I'm wondering what would be the best approach to extract a value from the
 hostname. In my case, the hostname contains the type of environment (dev,
 int, qa, prod) and I would like to have a variable called $env which
 contains will be extracted from such FQDNs:

 - vm-role-app-prod-1
 - vm-role-app-qa-1
 ...

 I've tried using split, but it was not really practical. Any better idea
 ? Short to deploy a custom fact to add this value to the facts..


 I don't see why a custom fact would be a good implementation of this.  One
 of the regex-based facilities supported by Puppet would be better.  Or
 split() -- what was wrong with that?

 Anyway, here's a way to do exactly what you asked via Puppet's built-in
 regsubst() function:

 $env = regsubst($hostname, '^vm-role-app-([^-]+)-.*', '\1')

 or here's an alternative that makes different assumptions about the form
 of incoming hostnames:

 $env = regsubst($hostname, '.*-(dev|int|ga|prod)-.*', '\1')



I think a custom fact for it is nice because it makes it accessible outside
of puppet if you want to. And it would also be stored in puppetdb so you
can query for hosts based on that value.

-- 
Erik Dalén

-- 
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: Puppet Forge Happenings

2013-09-10 Thread Erik Dalén
For this purpose I created a simple forge implementation:
https://github.com/dalen/simple-puppet-forge


On 9 September 2013 16:19, octomeow octom...@gmail.com wrote:

 How do I create forge server for internal modules?  Due to security
 concerns, we are limited in
 what we can public back to the community, but would like to use the forge
 format vs librarian.
 thanks


 On Tuesday, October 2, 2012 7:35:34 PM UTC-7, Ryan Coleman wrote:

 Hello,

 If you weren't at PuppetConf or didn't catch my talk, here's a quick
 recap. I'm product owner for the Puppet Forge team which formed in
 July with 2 awesome engineers and an equally awesome designer. We're a
 team dedicated to the Forge and while ramping up, we've shipped three
 small improvements to the Forge that we hope you enjoy.

 * Two lists were added to the homepage, highlighting recently active
 modules and contributors
 * An authors Gravatar is now displayed on each module page.
 * Today, the Forge will now retrieve information about GitHub issues
 and pull requests for a module for display on a module page. This has
 been automatically enabled for any module that lists GitHub as its
 'Project Issue Tracker URL'.

 The team is just getting started. In the mean-time, we've been making
 improvements to our back-end services, user-testing new feature ideas
 and getting ready for the next wave of functionality. Our next
 features will focus on these two areas. A) Making it easy for you to
 contribute your module  B) Improve the information you have to make a
 decision about which module to use.

 As we develop and test ideas to address these goals, we want your
 feedback!

 Feel free to file bugs, features --anything really-- to our Redmine
 project: 
 https://projects.puppetlabs.**com/projects/module-site/**issueshttps://projects.puppetlabs.com/projects/module-site/issues
 Aside from that and this user list, you may always email me directly
 -- ry...@puppetlabs.com -- or find me on #puppet as ryancoleman. I'm
 always connected via ZNC so if you don't get an immediate response in
 IRC, know that I'll see your message and reply if I can.


 Finally, if you haven't tried out the Forge in a while, please give it
 another go. http://forge.puppetlabs.com -- Each day new content is
 added or updated and there's some truly awesome stuff amongst the 500+
 Forge modules. There's also a blog-post series showcasing a new one
 each week. links.puppetlabs.com/motw

 Thanks for your time and for being an awesome community!

 --Ryan

  --
 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.




-- 
Erik Dalén

-- 
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.


[Puppet Users] Announce: Simple Puppet Forge implementation

2013-09-10 Thread Erik Dalén
Here's a simple implementation of the puppet forge (only supports the API
to download and install modules) if you want to run a site local forge. It
doesn't require any database backend and instead just reads the modules
from a directory on disk. So to add more modules to it just copy/scp/rsync
them in.

https://github.com/dalen/simple-puppet-forge

Requires Sinatra and GNU tar.

-- 
Erik Dalén

-- 
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] What is the alternative to Ruby DSL as use of the Ruby DSL is deprecated ?

2013-08-29 Thread Erik Dalén
In puppet 3.2+ you can enable the future parser (--parser=future) which
allows iteration like that directly in the puppet language.



On 26 August 2013 03:58, Stefan Schmid sc...@web.de wrote:


 Hi Mike

 Yes, create_resources seems to be just right.
 Thanks for the hint.

 - Stefan

 Am Sonntag, 25. August 2013 22:03:47 UTC+2 schrieb Mike Delaney:

 Hi Stefan,

 I believe for the general case, the best practice is to encapsulate the
 logic that can't
 be expressed directly in the PuppetDSL in custom functions called from
 the DSL.
 Some of the features in the new experimental parser like iteration are
 aimed at
 reducing the need to write trivial, one-off functions.

 In this particular case, you can easily re-write your RubyDSL class in
 the PuppetDSL
 using the standard create_resources() function:

 class hosts {
   create_resources('host', $::host_entries)
 }

 http://docs.puppetlabs.com/**references/3.2.latest/**
 function.html#createresourceshttp://docs.puppetlabs.com/references/3.2.latest/function.html#createresources

 If you haven't already, I'd definitely recommend adding the stdlib
 module, as it
 includes a ton of useful functions.

 https://forge.puppetlabs.com/**puppetlabs/stdlibhttps://forge.puppetlabs.com/puppetlabs/stdlib

 -Mike

 On Sun, Aug 25, 2013 at 9:39 AM, Stefan Schmid sc...@web.de wrote:

 Hi

 I am new to puppet and need to manage host entries in file /etc/hosts as
 follows on node mail.example.com and db.example.com. I do not want to
 manage the whole file /etc/hosts with puppet, only a few entries.

 puppet version 3.2.1

 node mail.example.com, file /etc/hosts:
 (..)
 172.16.89.96ldapmaster.example.comldapmaster ldap
 172.16.89.85sms.example.comsms sms-gateway
 (..)

 node db.example.com, file /etc/hosts:
 (..)
 172.16.89.80abc.example.com abc
 172.16.89.81xyz.example.com xyz bigben
 (..)

 In general, a node may have 0 to n host entries. The number of host
 entries on a node A may differ from the number host entries on a node B. A
 certain host entry ( IP-Address  Full-Qualified-Hostname  Short-Hostname)
 may be in the file /etc/hosts on 0 to n nodes concurrently.

 To manage the above host entries on node mail.example.com and
 db.example.com I used Ruby DSL as follows, then I learnt that Ruby DSL
 is deprecated. What is the alternative to Ruby DSL ? Any hint
 would be helpful.

 A puppet module using Ruby DSL:

 puppetmaster:/etc/puppet/**modules/hosts/manifests # cat init.rb

 hostclass :hosts do

  entries = scope.lookupvar(hosts_**entries)

  raise Puppet::ERROR,
   hosts_entries must be a Hash unless entries.kind_of?(Hash)

  entries.each do |title, parameters|

  host( title,
   :ensure   = parameters[ensure],
   :target   = parameters[target],
   :ip   = parameters[ip],
   :host_aliases = parameters[host_aliases])
  end
 end

 puppetmaster:/etc/puppet/**modules/hosts/manifests #


 Basic ENC script output for the Ruby DSL and node mail.example.com :
 (..)
 ---
 parameters:
  hosts_entries:
   sms.example.com:
 ensure: present
 target: /etc/hosts
 ip: 172.16.89.85
 host_aliases:
  - sms
  - sms-gateway
   ldapmaster.example.com:
 ensure: present
 target: /etc/hosts
 ip: 172.16.89.96
 host_aliases:
  - ldapmaster
  - ldap
 classes:
  - hosts
 (..)


 Basic ENC script output for the Ruby DSL and node db.example.com :
 (..)
 ---
 parameters:
  hosts_entries:
   abc.example.com:
 ensure: present
 target: /etc/hosts
 ip: 172.16.89.80
 host_aliases: abc
   xyz.example.com:
 ensure: present
 target: /etc/hosts
 ip: 172.16.89.81
 host_aliases:
  - xyz
  - bigben
 classes:
  - hosts
 (..)


 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...@**googlegroups.com.
 To post to this group, send email to puppet...@googlegroups.com.

 Visit this group at 
 http://groups.google.com/**group/puppet-usershttp://groups.google.com/group/puppet-users
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://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.




-- 
Erik Dalén

-- 
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

Re: [Puppet Users] introducing puppetboard 0.0.1

2013-08-07 Thread Erik Dalén
Cool stuff will try it out. I think we might have some Python projects at
work that would be interested in using the pypuppetdb library as well.


On 7 August 2013 14:47, Daniele Sluijters daniele.sluijt...@gmail.comwrote:

 Hello everyone,


 It’s a lovely grey and rainy day here in the Dutch summer, as good a day
 as any to release a new little project.


 Its name is Puppetboard and has as aim to replace Puppet Dashboard’s
 reporting functionality. It does not nor will it include ENC features. It
 does all this without storing any data itself but querying PuppetDB instead.


 The whole thing is built in Python and relies on Flask and WTForms. The
 communication logic has been split of in its own library called pypuppetdb
 which makes heavy use of the requests library. The interface is powered by
 Twitter Bootstrap with the Flatly theme.


 Though I’ve pushed all the code out and made it public it’s all very young
 but it works fairly well. However, I’ve committed numerous barbarities in
 the code just to get things working and to figure out how to handle certain
 things. For the foreseeable time in the future I’ll be working on cleaning
 all this up and figuring out what I can do on my side and on PuppetDB’s
 side to make all this work a little better. Especially when it comes to
 dealing with big responses from PuppetDB...


 This is the first time I’m open sourcing a project so that too is all new
 to me. I’d welcome the feedback and if someone feels brave enough even
 commits on the projects but try and be gentle about it :-). I’ll also be at
 PuppetConf including the Developer Day so feel free to reach out to me in
 person.


 To the code:


  * puppetboard: https://github.com/nedap/puppetboard

  * pypuppetdb:  https://github.com/nedap/pypuppetdb


 I realise that puppetboard doesn't have a test suite right now but it will
 soon. In order to do so I have to restructure a few things about it first.
 The installation documentation will improve with it.


 Pypuppetdb's test suite will be expanding the coming days once I'm done
 mocking the HTTP requests _query() makes and manage to get a decent and big
 enough set of test data to feed into PuppetDB. This will allow me to run
 integration tests and benchmark certain changes I have in mind.


 I’m hoping to be able to get a release out every month with improvements
 to both projects, perhaps even faster in the beginning but it remains to be
 seen how much time I’ll be able to spend on it.


 A special thanks goes out to Ken Barber for helping out with all things
 PuppetDB and coming up with a way to run PuppetDB on Travis so we can run
 integration tests. Hunter, thank you for being so interested in this
 project and pushing me to release it.


 —

 Daniele Sluijters

 Nedap | Steppingstone

 --
 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.






-- 
Erik Dalén

-- 
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] puppetlabs-ntp template discussion

2013-07-25 Thread Erik Dalén
On 13 July 2013 15:00, Ashley Penney apen...@gmail.com wrote:

 On Sat, Jul 13, 2013 at 7:15 AM, Erik Dalén 
 erik.gustav.da...@gmail.comwrote:

 I've been missing a way to set which server(s) should be preferred. We
 generally include all our NTP servers in the config but prefer the one that
 is in the same site as the node in question.

 So for a machine in site1 it would look like:

 server ntp.site1.example.com prefer
 server ntp.site2.example.com
 server ntp.site3.example.com


 I'll take a look at this but I have a sneaky suspicion if you just pass in
 servers = [ 'ntp.site1.example.com prefer', 'ntp.site2.example.com' ] it
 should magically do the right thing.  On monday I'll find that out and make
 it do the right thing if not.

 I guess what you're saying is it's a pain to modify the list per site?  In
 that case we can always add a prefer = 'blah' and have that append to the
 site you pick if that works.  I think what I'm saying is here is tell me
 the API you'd like most for that and we'll do it. :)



I think an extra parameter like $preferred_servers accepting an array of
servers would be a nice API for this. It can default to an empty array.

-- 
Erik Dalén

-- 
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] puppetlabs-ntp template discussion

2013-07-13 Thread Erik Dalén
I've been missing a way to set which server(s) should be preferred. We
generally include all our NTP servers in the config but prefer the one that
is in the same site as the node in question.

So for a machine in site1 it would look like:

server ntp.site1.example.com prefer
server ntp.site2.example.com
server ntp.site3.example.com



On 10 July 2013 19:57, Ashley Penney ashley.pen...@puppetlabs.com wrote:

 Hi guys,

 As I mentioned in a previous email I've refactored ntp and released a
 1.0.0 release candidate.  There's one outstanding flaw remaining that's
 bothering me and I wanted to solicit opinions on the list.  We currently
 maintain a template per distribution that is close to the stock
 distribution provided ntp configuration.  This leads to massive sprawl and
 means adding a distribution means yet another template.

 Would users of the ntp module mind if we unified this all into a single
 template?  Obviously we'd have to pick one as the best base template and
 move over to using it and deal with the fact that your ntp configuration
 would significantly change.

 Obviously we'd still be using your custom servers in the template so that
 bit wouldn't change.  We could expand the restrict option to let you pass
 in more customized options here.  What else would people like to be able to
 tune, change, tinker, trigger, whack, or modify in terms of parameters?  If
 you have a really complex ntp setup then I want to hear from you!  The more
 complex and awkward the better so that we can be sure our module meets your
 needs.

 If you've ever refused to use the ntp module as it lacks something you
 need, now is the time to shout out!

 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.






-- 
Erik Dalén

-- 
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] One resource immediately after another

2013-07-09 Thread Erik Dalén
Putting them in a separate stage is also a possibility.


On 9 July 2013 15:34, David Schmitt da...@dasz.at wrote:

 On 09.07.2013 14:01, Nevorotin Vadim wrote:

 I need to apply three resources one immediatelly after another. It's a
 ifdown/ifup commands, and command to generate /etc/network/interfaces
 file. I need to do ifdown, then rebuild interfaces, then ifup. I try to
 add simple relationship, but in this case some File resources are trying
 to be applied between ifdown and ifup. So they can't connect to Puppet
 master to verify source and generate an error. How can I fix it?


 In such a case it is best to put all commands into a script and run that.
 That also has the upside, that you can protect the complete network restart
 with a single refreshonly/notify pair.


 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+unsubscribe@**googlegroups.compuppet-users%2bunsubscr...@googlegroups.com
 .
 To post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at 
 http://groups.google.com/**group/puppet-usershttp://groups.google.com/group/puppet-users
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out
 .





-- 
Erik Dalén

-- 
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] Scope variable name is a NilClass

2013-07-01 Thread Erik Dalén
that should be %= scope.lookupvar('var') %, note the quotes around var.


On 1 July 2013 09:10, linde.m...@gmail.com wrote:


 Once again...


 1 class test {
 2  $var1 = 'foo'
 3  $var2 = 'bar'
 4  $vars = [var1,var2]
 5  notice($var1)
 6  notice($var2)
 7  notice($vars)
 8  each($vars) |$var| {
 9$vardata = inline_template(%= scope.lookupvar(var) %)
 10notice($var: $vardata)
 11  }
 12 }


  --
 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.






-- 
Erik Dalén

-- 
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 3.2 : ENC overrides environment in puppet.conf / howto force environment

2013-06-12 Thread Erik Dalén
You can turn it off by not having the ENC set any environment. So comment
that part out from your ENC script.
On 11 Jun 2013 16:06, Peter Van Biesen peter.vanbie...@vaph.be wrote:

 Hi,

 we recently upgraded from 2.7 to 3.2. We do not use ENC but use the
 node.rb for uploading the reports to foreman. However, the 3.2 puppetmaster
 overrides the environment that's been set in the puppet.conf. Is there a
 way to turn this off ?

 Related: ENC can override the puppet.conf, can the site.pp do this too ?
 Can I set an entry to force an agent to be in a particular environment,
 whatever is in the puppet.conf ?

 Thanks in advance,

 Peter.



 IK GA ERVOOR
 Een zorgjob. Da's werken met je hoofd, handen en hart.
 http://www.ikgaervoor.be

 --**--**
 -
 DISCLAIMER :
 De personeelsleden van het agentschap doen hun best om in e-mails
 betrouwbare informatie te geven. Toch kan niemand rechten doen gelden op
 basis van deze inhoud. Als in de e-mail een stellingname voorkomt, is
 dat niet noodzakelijk het standpunt van het agentschap. Rechtsgeldige
 beslissingen of officiele standpunten worden alleen per brief toegestuurd.

 --
 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] Hiera YAML False bug

2013-06-09 Thread Erik Dalén
This but only applied to the hiera data bindings afaik, not to hiera
function calls.


On 6 June 2013 03:41, Ti Leggett shin...@gmail.com wrote:

 Hm, that bug says it was a duplicate of 17474 and 17474 was revolved in
 3.2.0-rc1. Do I have a variant of the bug that's still residual?


 On Jun 5, 2013, at 7:12 PM, Dan White y...@comcast.net wrote:

  http://projects.puppetlabs.com/issues/17105
  Hiera booleans are broken -- explicit false value registers as lookup
 failure
 
  On Jun 5, 2013, at 4:52 PM, Ti Leggett wrote:
 
  It seems puppet thinks that variables evaluate to true even when they
 are explicitly set to false in hiera YAML.
 
  In my searching it seems like this should be fixed but with hiera 1.2.1
 and puppet 3.2.1 I'm still seeing this.
 
  In my YAML I have:
 
  # Java directives
  java :
enable_jdk : false # Install the JDK as well as the JRE
enable_v6  : true  # Install Java 6
enable_v7  : false # Install Java 7
openjdk: true  # Install OpenJDK
sun: false # Install Sun
 
 
  And in one of my manifests I do something like:
 
  class java::install (
$parameters = hiera('java', []),
  ) {
if $parameters['openjdk'] == true {
if $parameters['enable_v6'] == true and
 $java::params::openjdk_6_jre {
package { $java::params::openjdk_6_jre:
ensure = latest,
}
if $parameters['enable_jdk'] == true and
 $java::params::openjdk_6_jdk {
package { $java::params::openjdk_6_jdk:
ensure = latest,
}
}
}
  …
 
  No matter what it thinks it should install the JDK package even though
 the parameter is set to false. I've tried setting it 0, False, n, and N and
 it always evaluates to true. Is this a known bug and if so is there a
 workaround?
 
  --
  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.





-- 
Erik Dalén

-- 
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] Announce: puppetdbquery 1.2.0

2013-06-09 Thread Erik Dalén
I've written a event query tool which is in master branch in git at the
moment. It requires the gem chronic and supports stuff like:

puppet query events --since='2 days ago' --status=success 'class[apache]'

There's unfortunately no way to omit the node query yet and just show all
events. Will try to add that.
Also, you can't filter for events matching stuff like resource name,
property name, old value, new value etc. But hope it proves useful for you
anyway.


On 7 June 2013 21:15, Erik Dalén erik.gustav.da...@gmail.com wrote:

 I have worked a bit on a event query tool, it is not ready for release
 yet. But hopefully it will be soon :)

 It is tricky to combine it into a single query though as the report and
 event API don't support subqueries yet.


 On 7 June 2013 19:10, hai wu haiwu...@gmail.com wrote:

 Erik,

 I am wondering when you are going to add some support for current
 puppetdb report API ..

 Thanks,
 Hai

 On Fri, Jun 7, 2013 at 11:13 AM, Erik Dalén 
 erik.gustav.da...@gmail.comwrote:

 I've released version 1.2.0 of puppetdbquery.

 New for this release is auto capitalization of resource type names and
 class names. So now the queries 'class[apache]' and 'Class[Apache]' will be
 equivalent. Should make it a bit more forgiving and easy to use. The
 capitalization on the resource title only happens if the resource type is
 class, so not on stuff like 'File[/etc/passwd]'.

 It also includes a fix to make it run better under certain ruby 1.8.7
 versions.

 http://forge.puppetlabs.com/dalen/puppetdbquery/1.2.0

 --
 Erik Dalén

 --
 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.






 --
 Erik Dalén




-- 
Erik Dalén

-- 
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.




[Puppet Users] Announce: puppetdbquery 1.2.0

2013-06-07 Thread Erik Dalén
I've released version 1.2.0 of puppetdbquery.

New for this release is auto capitalization of resource type names and
class names. So now the queries 'class[apache]' and 'Class[Apache]' will be
equivalent. Should make it a bit more forgiving and easy to use. The
capitalization on the resource title only happens if the resource type is
class, so not on stuff like 'File[/etc/passwd]'.

It also includes a fix to make it run better under certain ruby 1.8.7
versions.

http://forge.puppetlabs.com/dalen/puppetdbquery/1.2.0

-- 
Erik Dalén

-- 
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] Announce: puppetdbquery 1.2.0

2013-06-07 Thread Erik Dalén
I have worked a bit on a event query tool, it is not ready for release yet.
But hopefully it will be soon :)

It is tricky to combine it into a single query though as the report and
event API don't support subqueries yet.


On 7 June 2013 19:10, hai wu haiwu...@gmail.com wrote:

 Erik,

 I am wondering when you are going to add some support for current puppetdb
 report API ..

 Thanks,
 Hai

 On Fri, Jun 7, 2013 at 11:13 AM, Erik Dalén 
 erik.gustav.da...@gmail.comwrote:

 I've released version 1.2.0 of puppetdbquery.

 New for this release is auto capitalization of resource type names and
 class names. So now the queries 'class[apache]' and 'Class[Apache]' will be
 equivalent. Should make it a bit more forgiving and easy to use. The
 capitalization on the resource title only happens if the resource type is
 class, so not on stuff like 'File[/etc/passwd]'.

 It also includes a fix to make it run better under certain ruby 1.8.7
 versions.

 http://forge.puppetlabs.com/dalen/puppetdbquery/1.2.0

 --
 Erik Dalén

 --
 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.






-- 
Erik Dalén

-- 
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 displays title as 'main'

2013-05-29 Thread Erik Dalén
A resource declaration doesn't create a new variable scope,  so the $title
variable has the value of the scope containing the resource,  in this case
stage main.
On 29 May 2013 08:28, av...@ootbdev.com wrote:

 I have a file with this code in it:

 notify {'a':
   message = ${title}
 }

 The output after running 'puppet apply file.pp':

 notice: main
 notice: /Stage[main]//Notify[a]/message: defined 'message' as 'main'
 notice: Finished catalog run in 0.57 seconds

 I expected this output:

 notice: a
 notice: /Stage[main]//Notify[a]/message: defined 'message' as 'a'
 notice: Finished catalog run in 0.57 seconds

 Why is $title considered to have the value main?

 --
 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.




[Puppet Users] Puppetdbquery 1.1.0, now featuring hiera backendception

2013-05-27 Thread Erik Dalén
I just released dalen-puppetdbquery 1.1.0, one cool new feature in this
release is a hiera backend.

So if you have a puppet class that takes a list of hosts as a parameter you
can now fill it using dynamic data from a puppetdb query. No need anymore
to modify the module itself or create a wrapper class around it to do the
puppetdb query in.

It requires another hiera backend to be active at the same time, and that
will be used to define the actual puppetdb query to be used. It does not
matter which backend that is, there can even be several of them. To enable
add the backend `puppetdb`to the backends list in `hiera.yaml`.

So instead of writing something like this in for example your
`hiera-data/common.yaml`:

ntp::servers:
  - 'ntp1.example.com'
  - 'ntp2.example.com'

You can now instead write:

ntp::servers::_nodequery: 'Class[Ntp::Server]'

It will then find all nodes with the class ntp::server and return an array
containing their certname. If you instead want to return the value of a
fact, for example the `ipaddress`, the nodequery can be a query and fact
tuple, like:

ntp::servers::_nodequery: ['Class[Ntp::Server]', 'ipaddress']

or a hash:

ntp::servers::_nodequery:
  query: 'Class[Ntp::Server]'
  fact: 'ipaddress'

When returning facts only nodes that actually have the fact are returned,
even if more nodes would in fact match the query itself.

-- 
Erik Dalén

-- 
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: High Availability of Puppet server for separate geographical location

2013-05-14 Thread Erik Dalén
On 10 May 2013 19:52, Ramin K ramin-l...@badapple.net wrote:


 In any case I'd like to see more discussion on highly available
 Puppet regardless of way it's implemented.


We are using SRV records for running multiple puppetmasters and selecting a
site local but allowing fallback to others in case it is down.
We have 6 puppetmasters for the production environment running in this way
currently. Each normally handling 500-1000 nodes. The git repository is
push replicated to each one of them.

But only one is CA, it is backed up. If it would crash we are fine with
having a outage on installing new nodes until we have restored that part to
another node. But we have looked into some solutions for maybe making it
more resilient though.

For PuppetDB we have two service nodes and a master and hot standby for the
postgres database.

-- 
Erik Dalén

-- 
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] Announce: PuppetDB 1.3.0 Available

2013-05-08 Thread Erik Dalén
On Tuesday 7 May 2013 at 01:44, Chris Price wrote:
 * Report queries
  
 The query endpoint `experimental/event` has been augmented to support a  
 much more interesting set of queries against report data. You can now query
 for events by status (e.g. `success`, `failed`, `noop`), timestamp ranges,
 resource types/titles/property name, etc. This should make the report
 storage feature of PuppetDB *much* more valuable!

Very nice news.  

But is this planned to get some further extensions? Some queries I would like 
to make still seem quite hard (at least to do in a single query).

For example finding all nodes that failed their last puppet run seems like it 
would need one node query and then a event query for each one.

Will there be better support for subqueries across reports, events and the 
other endpoints? That would make some types of queries easier. For example you 
could make a single query to get the puppet version of all nodes that failed 
any resource within the last 30 mins.

Any suggestions for nifty syntax for puppetdbquery to query stuff like that? :)

--  
Erik Dalén


-- 
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 2.6.x is now EOL

2013-05-04 Thread Erik Dalén
On 2 May 2013 21:27, Gabriel Filion lelu...@gmail.com wrote:

 On 30/04/13 05:05 PM, Michael Stahnke wrote:
  The time has come for us to say good-bye to Puppet 2.6.x. Puppet 2.6.x
  is now end of Life, as originally announced Jan 17, 2013.

 hmm .. so that means that puppet squeeze won't get any more security
 updates? kinda sucks cause squeeze'll be around for another year.



Current puppet versions for squeeze are available at apt.puppetlabs.com.

For the package distributed by the Debian project I assume they will
backport security fixes until squeeze is EOL as well.

It is the same situation with the Ruby interpreter itself on squeeze,
upstream it is EOL but the Debian project will backport security fixes
until sqeeeze is EOL.

-- 
Erik Dalén

-- 
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] Practices: what _not_ to manage with Puppet?

2013-05-04 Thread Erik Dalén
I think that for some things where there are specialized protocols
available to configure certain things it can be easier to use them instead
of trying to make puppet do them same. But I'd definitely configure the
servers and clients for those protocols using Puppet.

Examples would be using nss_ldap and LDAP server instead of having Puppet
query your LDAP server and creating entries in /etc/passwd.
Or using DHCP to configure networking instead of having puppet setting it
statically on your hosts.
Or using pam_krb5 and a Kerberos KDC instead of having puppet distribute
password hashes.



On 3 May 2013 20:02, Martin Langhoff martin.langh...@gmail.com wrote:

 While I prep my scripts and tool up for a large infra, I want to
 revisit a question that I ask myself regularly: what do people not
 manage with Puppet (or wish they weren't)?

 In my situation (a RH-style world), initial base system install, inc
 disk layout and initial networking is handled with kickstart

 For example: Do you exclude mountpoints? Network/SAN mountpoints?
 Advanced network configs?

 What are the reasons to exclude a particular item? How do you manage it
 instead?

 cheers,



 m
 --
  martin.langh...@gmail.com
  -  ask interesting questions
  - don't get distracted with shiny stuff  - working code first
  ~ http://docs.moodle.org/en/User:Martin_Langhoff

 --
 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.





-- 
Erik Dalén

-- 
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] Practices: what _not_ to manage with Puppet?

2013-05-04 Thread Erik Dalén
On 4 May 2013 13:37, Martin Langhoff martin.langh...@gmail.com wrote:

 On Sat, May 4, 2013 at 7:33 AM, Erik Dalén erik.gustav.da...@gmail.com
 wrote:
  I'd definitely configure the servers and
  clients for those protocols using Puppet.

 Is that what you do, or what you _would_ do? ;-)


It is what I do :)

Using custom functions that pulls parts of the configuration from other
systems in some cases (like from our inventory system) and feeding that
into some template.



  Or using DHCP to configure networking instead of having puppet setting it
  statically on your hosts.

 Do you actually do that? How do you handle complex routing/bonding setups?


Atm it is a bit of a mix, and yes, setting up bonding and complex routing
is done by puppet. But once bonding is up you could use DHCP to configure
the IP, netmask and DNS for example.

-- 
Erik Dalén

-- 
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: defined function notparse order dependant

2013-04-24 Thread Erik Dalén
On 24 April 2013 06:18, Mike Power dodts...@gmail.com wrote:


 In git they set recurse to true.  Compound that with a resource default up
 the declaration stack and you have puppet spending a long time uselessly
 changing the ownership and permission on a ton a files when they get
 checked out.  I find the dynamic scope of resource defaults to be more of a
 surprise and a burden then a useful tool.


A bit of a thread hijack, but I really agree about the dynamic scope for
resource defaults being just as (if not even more) annoying and
unpredictable than the dynamic scoping for variables was.

-- 
Erik Dalén

-- 
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.




[Puppet Users] Re: [Puppet-dev] Managing System Reboots

2013-04-18 Thread Erik Dalén
Would the reboot_pending fact return true on Unix after a newer kernel
version has been installed but the system isn't rebooted yet?


On 18 April 2013 19:57, Josh Cooper j...@puppetlabs.com wrote:

 I've submitted a proposal for managing reboots, for Windows in particular.
 Please review the document[1] and make comments on the associated pull
 request[2].

 For more information about the armature process itself, please see[3]

 Josh

 [1]
 https://github.com/joshcooper/armatures/blob/reboot/arm-14.reboot/index.md
 [2] https://github.com/puppetlabs/armatures/pull/30
 [3] https://github.com/joshcooper/armatures/blob/master/arm-0.arm/arm.md

 --
 Josh Cooper
 Developer, Puppet Labs

 Join us at PuppetConf 2013, August 22-23 in San Francisco -
 http://bit.ly/pupconf13
 The first 150 tickets sold will be available at a 35% discount - register
 now! Offer expires April 22.

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-dev+unsubscr...@googlegroups.com.
 To post to this group, send email to puppet-...@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-dev?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.






-- 
Erik Dalén

-- 
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: memory issue

2013-04-08 Thread Erik Dalén
it could be that you have a ulimit for the amount of ram the puppetmaster 
process (or puppet user) can use.


--  
Erik Dalén


On Monday 8 April 2013 at 12:28, Mamta Garg wrote:

 Hi jcbollinger ,
  
 I have added 1 GB more RAM on server and now my free RAM is more than 2 
 GB.Also started puppet ,puppetmaster,puppet-dashboard services.
  
 But nodes are still showing unresponsive.Any idea?
  
 Thanks,
 Mamta
  
  
 On Mon, Apr 1, 2013 at 9:31 AM, jcbollinger john.bollin...@stjude.org 
 (mailto:john.bollin...@stjude.org) wrote:
   
   
  On Monday, April 1, 2013 6:15:54 AM UTC-5, Mamta Garg wrote:
   HI jcbollinger ,

   Thanks for your reply!

   I have attached my master machine memory infor screenshot.Could you guide 
   me with that ,whats is wrong?
   I am using one master at a time.
   
   
  I don't see a smoking gun, but I find it suspicious that you have so little 
  swap. I generally want to see at least as much swap as total RAM, and I 
  usually configure 1.5x or sometimes even 2x RAM. The 2G total RAM in your 
  box is perhaps a bit light, too, but not so much so that I would expect to 
  see problems for a single puppetmaster process. Unless the box is providing 
  other memory-hungry services as well.
   
  Do check the puppetmaster process's memory usage, as you may find that 
  puppet needs up to as much free memory as its then-current usage to 
  successfully fork(), which it does whenever it runs an external program. 
  (That additional allocation is released when the external program exits.) 
  It is not uncommon for the master to use hundreds of MB of memory.
   
  For Puppet to fail (only) occasionally with the kind of error you report, 
  you are probably are running right on the edge of the master's capacity. In 
  that case, increasing swap would probably make the errors cease, at least 
  for the time being, but you will see a slowdown somewhere whenever the 
  system needs to page anything out. Possibly little enough that you don't 
  notice. Alternatively, you can probably make the error go away by adding 
  RAM. You may be able to make it go away temporarily by restarting the 
  puppetmaster service (or apache/passenger of that's the way you're running 
  it, etc.), but then the issue is likely to reappear fairly soon.
   
   
   
  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 
  (mailto:puppet-users%2bunsubscr...@googlegroups.com).
  To post to this group, send email to puppet-users@googlegroups.com 
  (mailto: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.
   
   
  
  
  
  
 --  
 Thanks and Regards,
 Mamta Garg
 --  
 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 
 (mailto:puppet-users+unsubscr...@googlegroups.com).
 To post to this group, send email to puppet-users@googlegroups.com 
 (mailto: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.




[Puppet Users] Re: [Puppet-dev] Announce: Hiera 1.2.0 Available

2013-04-04 Thread Erik Dalén
On Thursday 4 April 2013 at 02:39, Matthaus Owens wrote:
 
 ## Hiera 1.2.0 Release Notes ##
 
 # Features
  
 Add deep-merge feature to backend lookups
  
 - Config option :merge_behavior = :native|:deep|:deeper
 - Add optional requirement on deep_merge gem to support
 :deep and :deeper options
 - Update Yaml backend to use Backend.merge_answer
 - Update Json backend to use Backend.merge_answer

So if I understood it correctly the difference is when the values are 
unmergeable and :deeper will give the value from the higher (more specific) 
hierarchy level while :deep will instead give the value from the lower (less 
specific) hierarchy level. Correct?

I don't really see the point of the :deep option then as the point of hiera is 
to give the most specific answer for the node in question.

But could be nice to at least log a warning or something when this happens.
And also document the two options a bit more :)
 (#17434) Detect loops in recursive lookup
  
 The recursive lookup functionality was vulnerable to infinite recursion
 when the values ended up referring to each other. This keeps track of
 the names that have been seen in order to stop a loop from occuring. The
 behavior for this was extracted to a class so that it didn't clutter the
 logic of variable interpolation. The extracted class also specifically
 pushes and pops on an internal array in order to limit the amount of
 garbage created during these operations. This modification should be
 safe so long a new Hiera::RecursiveLookup is used for every parse that
 is done and it doesn't get shared in any manner.
  
 (#17434) Support recursive interpolation
  
 The original code for interpolation had, hidden somewhere in its depths,
 supported recursive expansion of interpolations. This adds that support
 back in.

So, is this for expansion of a variable that gives another string that should 
do variable expansion?

Not recursive hiera lookups? (which would be really nice, especially in 
backends that don't support references)

--  
Erik Dalén



-- 
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: Beta release of puppetdbquery module 1.0

2013-04-04 Thread Erik Dalén
I've expanded the README a bit now and release 1.0.0-pre2 which should make it 
a bit easier to use.

It only supports queries over SSL and uses the Puppet HTTP methods for making 
connections. So if your Nginx uses a external CA cert you might be running into 
bug #15561 http://projects.puppetlabs.com/issues/15561 .

In the new 1.0.0-pre2 I've added the ability to use other kinds of HTTP 
connection objects though and use a regular one in the find-nodes binary, so 
you can try that instead of the puppet face if you are still getting SSL 
errors.  

--  
Erik Dalén


On Thursday 28 March 2013 at 17:31, Stephen Price wrote:

 Guys, Can you expand the README to describe where this should be run from? 
 I've been trying to use it as a Puppet Face from different hosts, including 
 directly on the PuppetDB server, to no avail. I keep getting 'bad request' or 
 SSL cert errors. My PuppetDB is running on localhost:8080 with Nginx (with 
 SSL) as the frontend. It'd be nice if this Face was usable from any Puppet 
 node, or at least from the Puppet Master.
  
 On Monday, March 4, 2013 7:59:30 AM UTC-8, Erik Dalén wrote:
  I've released version 1.0.0-pre1 of the dalen-puppetdbquery module, it 
  includes the old functions against the PuppetDB api version 1.0. But also 
  some entirely new functions that will query the PuppetDB api v2.0 (in 
  puppetdb 1.1 and up).  
   
  These new functions borrow the syntax from Dan Bode's ruby-puppetdb, but 
  are entirely rewritten to make use of the 2.0 API.  
   
  It now uses a lexer and parser written in rex  racc (ruby versions of lex 
   yacc) to compile a high level query language into PuppetDB queries.  
   
  An example of a high level query would be:  
  Class[Apache]{service_enable=true} and (osfamily=Redhat or osfamily=Debian) 
   
   
  That would find any host with the apache class (notice though that class 
  names have to be capitalized in queries) with the parameter service_enable 
  = true and osfamily red hat or debian. It does normal operator precedence, 
  so a parenthesis is required around that or-statement.  
   
  The three new query functions are:  
  * query_nodes  
  * query_facts  
  * query_resources  
   
  So far only query_nodes and query_facts accept the new query language. In 
  all three functions an array argument instead of string will be treated as 
  a raw puppetdb query.  
   
  Anyway, please test it and send me feedback (dalen on freenode). The old 
  functions are left intact but deprecated, so it shouldn't affect any 
  existing code using the older functions.  
   
  --  
  Erik Dalén  
  
 --  
 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 
 (mailto:puppet-users+unsubscr...@googlegroups.com).
 To post to this group, send email to puppet-users@googlegroups.com 
 (mailto: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] Automatic puppet agent upgrade based on server upgrade?

2013-03-13 Thread Erik Dalén
I just do something like: package { 'puppet': ensure = '3.1.1-puppetlabs1'
}

Not sure how to do it with PE though.


On 13 March 2013 23:30, Josh Harrison hij...@gmail.com wrote:

 I'm running a test environment of PE and it of course just went from 2.7.1
 to 2.7.2. It seems like there must be a way to push the agent upgrades out
 via puppet, and not have to touch each machine. Even if it isn't an
 automatic thing, being able to issue puppet node upgrade certname from
 the server or something would be pretty handy.
 I've searched around as I'm certain this has been a question for others
 but I'm not finding any good results. Perhaps I'm just not making the right
 searches?
 Anyhow, I thought I'd ask here!
 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.






-- 
Erik Dalén

-- 
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] get a hash from multiple levels(with the same keys but different values) with hiera

2013-03-13 Thread Erik Dalén
The reason it doesn't work is that hiera_hash() only does a shallow merge,
not a deep merge of the hashes within the hash.

There should be support for deep merging in hiera 1.2.0-rc1 though:
http://projects.puppetlabs.com/issues/16107


On 13 March 2013 16:26, Alexandru Dragoescu
dragoescu.alexan...@gmail.comwrote:

 Hello,

 I have this configuration:

 File: comon.yaml

 SSH:
  ConfigFolder: /etc/ssh/
  sshd_config:
   Protocol: 1,2
   SyslogFacility: AUTHPRIV
   *PermitRootLogin*: no
   PasswordAuthentication: yes
   ChallengeResponseAuthentication: no
   GSSAPIAuthentication: yes
   GSSAPICleanupCredentials: yes
   UsePAM: yes
   *ClientAliveInterval*: 100

 File test_env.yaml [same keys as in comon.yaml but with different values] :

 SSH
  sshd_config:
   *PermitRootLogin*: yes
   *ClientAliveInterval*: 80


 File hiera.yaml:

 ---
 :backend:
   - yaml
 :hierarchy:
   - %{environment}
   - comon

 :yaml:
 # datadir is empty here, so hiera uses its defaults:
 # - /var/lib/hiera on *nix
 # - %CommonAppData%\PuppetLabs\hiera\var on Windows
 # When specifying a datadir, make sure the directory exists.
   :datadir: /etc/puppet/hieradata

 In puppet code:
  $ssh_data = hiera_hash('SSH')
  $sshd_config = $ssh_data('sshd_config')


 If a node has %{environment} == test_env I want to retrieve a hash
 (in sshd_config) like:

   Protocol: 1,2
   SyslogFacility: AUTHPRIV
 *  PermitRootLogin: yes*
   PasswordAuthentication: yes
   ChallengeResponseAuthentication: no
   GSSAPIAuthentication: yes
   GSSAPICleanupCredentials: yes
   UsePAM: yes
 *  ClientAliveInterval: 80*

 if environment != test_env then I want to retrieve :

   Protocol: 1,2
   SyslogFacility: AUTHPRIV
   *PermitRootLogin: no*
   PasswordAuthentication: yes
   ChallengeResponseAuthentication: no
   GSSAPIAuthentication: yes
   GSSAPICleanupCredentials: yes
   UsePAM: yes
   *ClientAliveInterval: 100*



 In my setup for the first care i get (it reads only test_env.yaml - that
 is not what I want):
   *PermitRootLogin*: yes
   *ClientAliveInterval*: 80

 and for the second (reads only comon.yaml - is ok) :

   Protocol: 1,2
   SyslogFacility: AUTHPRIV
   *PermitRootLogin*: no
   PasswordAuthentication: yes
   ChallengeResponseAuthentication: no
   GSSAPIAuthentication: yes
   GSSAPICleanupCredentials: yes
   UsePAM: yes
   *ClientAliveInterval*: 100

 Is this possible with my Hiera definition?


 Thank you,
 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 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.






-- 
Erik Dalén

-- 
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: Long puppet catalog run times on certain nodes after using pson is called

2013-03-05 Thread Erik Dalén
On 5 March 2013 17:34, r.yeo rob.q...@gmail.com wrote:

 I am not seeing any queueing, but perhaps I am not looking in the right
 place.  At most I am seeing 1 pending task, but typically all systems go is
 the only thing the registers in Dashboard.  Also in dashboard I
 occasionally see this -

 /usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/validations.rb:1101:in
 `save_without_dirty!'  
 /usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/dirty.rb:87:in
 `save_without_transactions!'  
 /usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/transactions.rb:200:in
 `save!'  
 /usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in
 `transaction'  
 /usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/transactions.rb:182:in
 `transaction'  
 /usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/transactions.rb:200:in
 `save!'  
 /usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/transactions.rb:208:in
 `rollback_active_record_state!'  
 /usr/share/puppet-dashboard/vendor/rails/activerecord/lib/active_record/transactions.rb:200:in
 `save!'  /usr/share/puppet-dashboard/app/models/report.rb:117:in
 `create_from_yaml'  /usr/share/puppet-dashboard/app/models/report.rb:90:in
 `create_from_yaml_file'
 But I haven't mentioned it because I assumed it was unrelated and another
 thing I needed to look at it later (still might be).

 Should I be looking in other places on the master to show long queues?


You should probably check using the command passenger-status instead of
looking at the pending tasks in dashboard, that will show very different
things. Pending tasks in dashboard is not really relevant for this.

-- 
Erik Dalén

-- 
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 dynamically handle ssl registration re-registration

2013-02-26 Thread Erik Dalén
For desktops and laptops that don't have a proper static hostname we have
used the mac address (minus colons) as the certname. That is pretty much
guaranteed to be unique and never change, might work in your situation as
well.


On 26 February 2013 19:04, yngmike mikew...@gmail.com wrote:

 Hello everybody.

 I'm new to the group and I'm trying to do something a little different
 here.

 Puppet Master: CentOS 6.3 running puppet-server-2.7.14-2.1
 Clients: CentOS 6.3 (puppet-2.6.17-2.el6.noarch)  SLES 11.2(puppet
 2.7.14-2.1)

 I am trying to configure puppet in a very dynamic way. Nodes are not
 defined in nodes.conf and each client is configured soley by facts that
 define the role of the node.
 Certificate autosigning is turned on.
 I am trying to automate the rollout of 50k clients. The clients will not
 have DNS entries available at the time puppet first runs, but will have
 DNS  sometime an hour or so later.
 During the build process the client picks a psuedo random hostname to
 register to puppet with.

 I am trying to figure out a solution that would be totally programatic for
 registration/re-registration and be tolerant to client hostname changes.

 Current issues:


- If the client ssl cert is removed from the puppet master (and
puppetmasterd is restarted), the client must rm -rf /var/lib/puppet and
re-run to get a valid cert
- if /var/lib/puppet is removed and the ssl certificate still lives on
the puppet master the client cannot re-register until the cert is removed
from the master

 Essentially I will never be using jabber or remote commands so I don't
 really care what the systems are called, if one stops working I will just
 replace it with a fresh working build.
 I need each system to be able to register/re-register no matter if an
 entry exists on the puppet master or the local private key gets wiped out.
 This would be so I can guarantee that the puppet agent will continue to run
 if its hostname changes, or the local caches need to be wiped
 programatically to fix a stuck puppet run.

 I'm sure this issue has come up before but I can't find anything useful on
 google results. I understand that these requirements are in place for
 security reasons, but that is not as much of a concern in this particular
 implementation (thing 50k dumb nodes that perform simple tasks). I would
 prefer a more secure method, but it doesn't seem that puppet is tolerant to
 dynamic nodes that might move around (regularly).

 Any ideas?

 Thanks,

 -Mike
















 --
 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.






-- 
Erik Dalén

-- 
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: PuppetDB API permissions

2013-02-14 Thread Erik Dalén
You can specify a whitelist for which nodes are allowed to contact puppetdb
at all (and restrict it to only your puppetmaster), and then just send the
rest of the read queries through the proxy. If you only allow the /v2/nodes
 /v2/facts endpoints through the proxy clients can't read for example file
contents of file resources.

You could also use the filtering proxy I described in the following post to
filter the resources endpoint to hide all parameters:
https://groups.google.com/forum/?hl=enfromgroups=#!searchin/puppet-users/puppetdb$20proxy/puppet-users/5IgsoZi6rVY/TJfaqoR7zc0J


On 13 February 2013 18:26, Vaidas Jablonskis jablons...@gmail.com wrote:

 Hi Nick,

 My biggest concern is that nodes can access other nodes resources stored
 in PuppetDB, which effectively means that parameters like passwords and
 other sensitive information is exposed.

 I also wonder if PuppetDB has any sense of environments? What I mean, does
 it separate data in environments, so for example, NODE1 being in
 development environment can access NODE2's resources which is in production
 environment?

 Thanks,
 Vaidas


 On Friday, 26 October 2012 19:56:26 UTC+1, Nick Lewis wrote:

 On Friday, October 26, 2012 7:24:18 AM UTC-7, ak0ska wrote:

 Hello,

 Is it possible to control from which nodes is it allowed to execute
 commands like replace catalog and replace facts, and which nodes can
 only do queries (but no changes)? It seems like once someone could access
 the service through http or https (depending on jetty.ini settings) can do
 both.


 Unfortunately, this isn't currently possible, though it's certainly
 something we'd like to provide in the future. Currently the only
 restriction that can be made is a whitelist of certnames which are allowed
 to talk to the API, for both read and write alike.

 Until this is supported by PuppetDB itself, you could use a proxy to
 allow only certain routes.

 If we were to add this feature, would it be sufficient to just have no
 access, read access, and read/write access as categories, or would you
 need something more granular than that (for instance, can query metrics but
 not facts)?

  --
 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.






-- 
Erik Dalén

-- 
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] warnings for those shifting from puppet kick to mcollective

2013-02-09 Thread Erik Dalén
On Feb 8, 2013 8:35 PM, Jo Rhett jrh...@netconsonance.com wrote:

 So PL has been telling us that puppet kick is dead, and to shift to
mcollective agent. The idea of getting away from 800mb puppet agents has a
lot of appeal. Here's some advisories and bugs to watch before you make the
shift. If you are preparing to make the shift, you may want to go to these
bugs and vote for them, since you'll be a lot happier when they are fixed.

 1. You can't control puppet daemon without killing puppet mid-run
http://projects.puppetlabs.com/issues/19153

 So when you shift away from puppet daemon to cron-run puppet you're going
to say Hey! I know how to do this!

   service { 'puppet':
   ensure  = stopped,
   enable  = false,
   require = File['/etc/cron.d/puppet','/etc/puppet/puppet.conf'],
   }

 Well, not so fast. On CentOS, it turns out that puppet agent --test
works fine, but puppet agent --onetime is caught by this and killed by
itself mid-run. Depending on the host and your dependency trees, this could
be very early or very late in the run. No kidding, you have to deploy
'monit' or something similar to ensure your puppet agents aren't running in
daemon mode.


As long as you run them with --no-daemonize you should be safe. Which is
one of the things --test turns on.

 2. No classes file. http://projects.puppetlabs.com/issues/show/7917

 Mcollective agent for puppet gives you some really nice features, like
being able to do things against hosts on which certain puppet classes are
applied. For instance, to update all webservers you might do something like:
 $ mco puppet agent runonce --batch 5 --with-class webserver

 Unfortunately, once you shift away from puppet agent, puppet no longer
writes out the classes.txt file. So this method of filtering your mco
commands isn't available.


Hmm, I'm quite sure that file is written out for us at least. But can check.

 3. There's no documented best way to run puppet from cron.

 I suspect PL hasn't put down a recipe for this since Puppet Commander
hasn't been updated to work with Puppet 3 yet. That's probably the answer,
but it's not available yet. This might be a good reason to wait.

 We settled on the many-year-old version of running it from cron with
fqdn_rand(30). Given the numerous problems with the cron resource, we did
this in a separate cron.d file like so:

  # two variables to control puppet run time
 $first_minute  = fqdn_rand(30)
 $second_minute = $first_minute + 30
 file { /etc/cron.d/puppet:
 owner   = root,
 group   = root,
 mode= 0444,
 content = template('puppet/cron-puppet'),
 require = Package['puppet'],
 }

 There might be a better way, but I couldn't find it. I'd really like to
see a best practice recommendation from PuppetLabs.


That is how we run it as well. Although we also have a small wrapper script
around it to allow us to disable cron runs but still allow manual runs.

-- 
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] pocco - a puppet manifest documentation experiment

2013-01-28 Thread Erik Dalén


On Friday, 19 October 2012 20:11:51 UTC+2, Nan Liu wrote:

 On Fri, Oct 19, 2012 at 11:09 AM, Joe Topjian 
 joe.t...@cybera.cajavascript: 
 wrote: 
  Hi Nan, 
  
  Like everyone else, I think this is great. 
  
  
  Run pocco against a modules directory: 
  
  pocco /etc/puppet/modules/modulename 
  
  
  Just a quick comment: Isn't pocco the name of the Python *occo? 
  (http://fitzgen.github.com/pocco/) should the name be changed to 
  differentiate? 

 Ah, didn't realize that, ppocco =), any other suggestions? 


pucco? :)

-- 
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.
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 // Puppet Dashboard // PuppetDB

2013-01-28 Thread Erik Dalén
Puppet dashboard doesn't use the puppetdb reports (yet at least), so to get 
reports into puppet dashboard you need to use the http report handler and set 
reporturl to point to your puppet dashboard server.


--  
Erik Dalén


On Monday 28 January 2013 at 15:20, Tony McMahon wrote:

 Hi I have a frustrating problem with puppet..
  
 I have (had) it all working, I'd gotten puppet-dashboard working and 
 everything was fine :)
  
 I then thought I'd try to get puppetDB going so I can use the inventory 
 facilities within puppet dashboard.
  
 It's working, sort of. If I click on a node I can see it's inventory, but I'm 
 not getting any new reports - all the reports I see are from before I 
 installed puppetDB
  
 the puppetDB log seems to indicate that it's receiving data (i.e. lots of 
 'store report', 'replace facts' etc), but puppet dashboard isn't reading 
 them. I'm sure I've missed something small in the config somewhere - can 
 anyone point me where I should look?
  
 Thanks, in advance...  
  
 --  
 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 
 (mailto:puppet-users@googlegroups.com).
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com 
 (mailto:puppet-users+unsubscr...@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] Puppetdb will setting gc-interval to 0 disable it

2013-01-23 Thread Erik Dalén
One of the largest indexes was not needed and removed in the latest version
of puppetdb. So you might want to try out that version to reduce the index
sizes.
On Jan 22, 2013 8:41 PM, Chuck cssc...@gmail.com wrote:

 We didn't notice anything on Sunday.  We have a decent number of resources
 that effect all nodes.  This may explain the ocasional performance issues.
   We have also been messing around with the Indexes as they were getting
 HUGE.  We also started promoting our Puppet changes on a schedule so we
 effect more nodes at a time than we have in the past.

 On Tuesday, January 22, 2013 1:27:15 PM UTC-6, Ken Barber wrote:

 Does this happen across all nodes? This is an indication you might
 have a resource that affects a large set of nodes that suddenly
 changes every 4 days.

 In the catalogs table, the 'hash' is just a hash of the catalogue
 data, if anything in the catalogue changes - it changes. And new
 entries are created. The database garbage collection is there to
 remove the orphaned entries. So really one could consider this part of
 normal operation, if your catalogues are constantly changing then the
 garbage collection runs are bigger.

 Did you see this happen on Sunday?

 On Fri, Jan 18, 2013 at 12:28 AM, Chuck css...@gmail.com wrote:
  This is unconfirmed at this point.
 
  It seems like every 4 days starting Jan 4. 2013 (interesting is started
 in
  2013 and never happened in 2012) like the Catalog or Resource Hash
 changes,
  causing the entire catalog_resource table to insert new entries, then
  possibly GC deletes the old entries.
 
  If this holds true we will see this behavior again on Jan. 20, 2013.
  Hopefully we will have a better idea of what is going on.
 
  --
  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/-/**APtEGbv578QJhttps://groups.google.com/d/msg/puppet-users/-/APtEGbv578QJ.

 
  To post to this group, send email to puppet...@googlegroups.com.
  To unsubscribe from this group, send email to
  puppet-users...@**googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/**group/puppet-users?hl=enhttp://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/-/38QnH1c20UcJ.
 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: Puppet dashboard not enabling inventory

2013-01-14 Thread Erik Dalén
This mail should explain it:
https://groups.google.com/d/msg/puppet-announce/j44EbTJY7HI/dw1NI9OjWwQJ


On 14 January 2013 10:14, GRANIER Bernard (MORPHO) 
bernard.gran...@morpho.com wrote:

 Hi,

 ** **

 A point about dashboard has been said in this post flow:

 ** **

 Puppet dashboard may be deprecated ?

 Could someone of Puppet Lab gives some information about that ?

 ** **

 Cordialement,

 ** **

 Bernard Granier

 CE Plateforme Système

 bernard.gran...@morpho.com

 01 58 11 32 51

 ** **

 *From:* puppet-users@googlegroups.com [mailto:
 puppet-users@googlegroups.com] *On Behalf Of *Luke
 *Sent:* Friday, January 11, 2013 8:55 PM
 *To:* puppet-users@googlegroups.com
 *Subject:* Re: [Puppet Users] Re: Puppet dashboard not enabling inventory*
 ***

 ** **

 Ah figured out the problem. Not sure why this caused the issue but I had
 copied my http conf stuff out of a template and forgot to update the
 ServerName with the correct name after correcting this and restarting httpd
 and the dashboard it corrected the issue.

 ** **

 Thanks for the help guys!

 On Friday, January 11, 2013 1:26:39 PM UTC-4, Stefan Heijmans wrote:

 And if you create new settings.yml from settings.yml.example. Seems like
 like settings_reader.rb falls back to setings.yml.example if parameters are
 not correct in settings.yml. http://projects.puppetlabs.com/issues/14371
 Or enable inventory in settings.yml.example?

 --
 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/-/jwsJ-UCuQcQJ.
 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.

 #
  This e-mail and any attached documents may contain confidential or
 proprietary information. If you are not the intended recipient, you are
 notified that any dissemination, copying of this e-mail and any attachments
 thereto or use of their contents by any means whatsoever is strictly
 prohibited. If you have received this e-mail in error, please advise the
 sender immediately and delete this e-mail and all attached documents from
 your computer system.
 #

 --
 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.




-- 
Erik Dalén

-- 
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: Setting defaults on a type and in a class before defining a class resource

2013-01-12 Thread Erik Dalén
On Jan 11, 2013 8:49 PM, jcbollinger john.bollin...@stjude.org wrote:



 On Friday, January 11, 2013 12:01:52 PM UTC-6, Erik Dalén wrote:

 At least in puppet 3 resource defaults are local to defines and classes
and doesn't get inherited to any included defines or classes. So to make
upgrading easier you shouldn't make any such assumptions in your code.


 That is not correct (see
http://docs.puppetlabs.com/puppet/3/reference/lang_defaults.html).  The
problem is that resource defaults are dynamically scoped (even in Puppet
3), not lexically scoped.  Roughly speaking, that means defaults follow the
chain of declarations, regardless of the location of the definitions of the
classes and definitions in the chain.

Hmm, okay I stand corrected. But I think the intention was at one point at
least to remove dynamic scoping of resource defaults in puppet 3:
http://docs.puppetlabs.com/guides/scope_and_puppet.html

-- 
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: Puppet dashboard not enabling inventory

2013-01-11 Thread Erik Dalén
As Stefan said you need to point it to your puppet master not your puppetdb
server.
On Jan 11, 2013 3:44 PM, Luke lutay...@gmail.com wrote:

 Thank you for your reply.

 I am confused as to why it is not working then. I have this set exactly
 like this in my settings:

 enable_inventory_service: true


 It is like it isn't recognizing this setting. I have updated my dashboard
 to the same version as you with no change.

 On Thursday, January 10, 2013 5:16:30 PM UTC-4, Stefan Heijmans wrote:

 I mean regardless of what settings are set shouldn't I at least be able
 to see the inventory tab if enable_inventory_service is set to true?
 Yes if you mean the one on top of the screen
 If you click on a node when it's not configured correctly it shows;
 Inventory
 Could not retrieve facts from inventory service: getaddrinfo: Name or
 service not known

 Pointing to correct port for puppetdb and server in settings.yml
 my inventory_server  inventory_port parameters points to puppetmaster
 server puppetmaster port 8140

 Has anyone else successfully got the puppet dashboard working with
 dashboard version 1.2.17 with puppet 3?
 Yes on rhel63 with
 puppet 3.0.2
 puppet dashboard 1.2.18
 puppetdb 1.0.5

  --
 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/-/CVP1VZP7M6EJ.
 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: Setting defaults on a type and in a class before defining a class resource

2013-01-11 Thread Erik Dalén
At least in puppet 3 resource defaults are local to defines and classes and
doesn't get inherited to any included defines or classes. So to make
upgrading easier you shouldn't make any such assumptions in your code.
On Jan 11, 2013 6:47 PM, Ilya Dmitrichenko errordevelo...@gmail.com
wrote:

 Ok, I tried this with 2.7.20 and it's the same ...

 But copying `File { }` into the `define extra` block fixed it for me.
 That's a bit of an unexpected kind of scoping, isn't it?

 --
 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] Re: Dynamic Environments and Hiera

2013-01-11 Thread Erik Dalén
I also use one environment per git branch. But I use a custom fact that
returns production/testing etc and then use that in the hiera hierarchy
instead of the puppet environment.
On Jan 9, 2013 7:43 PM, Brad Ison bi...@oib.com wrote:

 On Wed, Jan 9, 2013 at 3:11 AM, Luke Bigum luke.bi...@lmax.com wrote:
 
  :backends:
- yaml
  :hierarchy:
- %{fqdn}
- %{role}_role
- %{pop}
- global
  :yaml:
:datadir: /etc/puppet/environments/%{environment}/hiera/
 
  So if I push a new feature to branch new_feature, I get Puppet
 environment
  new_feature which has it's own copy of the Hiera data store with all my
  new_feature related Hiera keys in it. When it comes to environments my
 data
  follows the same branches and versions of my code, and when I merge
 code
  into my main line production branch the matching Hiera keys go along with
  it.

 Thanks, Luke.

 I guess it does make sense to leave the environments out of the
 hierarchy in this case. I had considered that, but was worried about
 constant merge conflicts when promoting things up the chain. There
 will be some things that will always be different between dev and
 prod. I suppose there are other ways around that though that make more
 sense. I may be inventing a problem I don't really have.

 --
 Brad

 --
 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] exec type doesn't refresh when onlyif is in use

2012-12-30 Thread Erik Dalén
Wouldn't it be easier to use a service definition with the base provider
and supply your start, restart  status commands?


On 30 December 2012 03:27, Jason Edgecombe ja...@rampaginggeek.com wrote:

 Hi,

 I'm having trouble with an exec type. I'm using an exec type to start a
 buildbot slave. It's a long-running pseudo-service. The exec uses the
 refresh and onlyif. I think that the refresh command isn't running
 because of the onlyif attribute. I would like a refresh event to fire even
 if the onlyif attribute is in use. Any help is appreciated. Do I need to
 split it into two exec's (one normal and another refreshonly)?


 Here is a snippet from the type definition:
 ==
 define buildbot::slave::instance( ..., $project_dir, ... ) {

   $path  = ['/usr/local/bin','/usr/bin','**/bin']
   $config_files  = [$project_dir/info/admin,$**
 project_dir/info/host]

   # commands to work with the buildslave
   $slave_install_command = buildslave create-slave $project_dir
 $master_host_port $slave_name $slave_password
   $slave_start_command   = buildslave start $project_dir
   $slave_restart_command = buildslave restart $project_dir
   $slave_status_command  = /bin/kill -0 `/bin/cat
 $project_dir/twistd.pid`

 ...snip...

   exec { $slave_start_command:
 cwd   = $project_dir,
 path  = $path,
 user  = $user,
 group = $group,
 unless= $slave_status_command,
 refresh   = $slave_restart_command,
 require   = File[$config_files],
 subscribe = File[$config_files],
   }
 ==
 Here is part of the debug log:

 Info: /Stage[main]//Buildbot::Slave:**:Instance[openafs1]/File[/**
 home/buildslave/buildbot/**openafs/info/admin]: Filebucketed
 /home/buildslave/buildbot/**openafs/info/ad
 min to puppet with sum 2f840fdf8acf7c334c293c9da08797**21
 /Stage[main]//Buildbot::Slave:**:Instance[openafs1]/File[/**
 home/buildslave/buildbot/**openafs/info/admin]/content: content changed
 '{md5}**2f840fdf8acf7c334c293c9da08797**21' to '{md5}**
 18eca080dfec8ff8fc47a54bf6a962**26'
 Info: /Stage[main]//Buildbot::Slave:**:Instance[openafs1]/File[/**
 home/buildslave/buildbot/**openafs/info/admin]: Scheduling refresh of
 Exec[buildslave start /home/buildslave/buildbot/**openafs]
 Debug: /Stage[main]//Buildbot::Slave:**:Instance[openafs1]/File[/**
 home/buildslave/buildbot/**openafs/info/admin]: The container
 Buildbot::Slave::Instance[**openafs1] will propagate my refresh event
 Debug: Exec[buildslave start 
 /home/buildslave/buildbot/**openafs](provider=posix):
 Executing check '/bin/kill -0 `/bin/cat /home/buildslave/buildbot/**
 openafs/twistd.pid`'
 Debug: Executing '/bin/kill -0 `/bin/cat /home/buildslave/buildbot/**
 openafs/twistd.pid`'
 Debug: Exec[buildslave start 
 /home/buildslave/buildbot/**openafs](provider=posix):
 Executing check '/bin/kill -0 `/bin/cat /home/buildslave/buildbot/**
 openafs/twistd.pid`'
 Debug: Executing '/bin/kill -0 `/bin/cat /home/buildslave/buildbot/**
 openafs/twistd.pid`'
 /Stage[main]//Buildbot::Slave:**:Instance[openafs1]/Exec[**buildslave
 start /home/buildslave/buildbot/**openafs]: Triggered 'refresh' from 1
 events
 Debug: /Stage[main]//Buildbot::Slave:**:Instance[openafs1]/Exec[**buildslave
 start /home/buildslave/buildbot/**openafs]: The container
 Buildbot::Slave::Instance[**openafs1] will propagate my refresh event
 Debug: Buildbot::Slave::Instance[**openafs1]: The container Class[Main]
 will propagate my refresh event
 Debug: Class[Main]: The container Stage[main] will propagate my refresh
 event


 Thanks,
 Jason

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To post to this group, send email to puppet-users@googlegroups.com.
 To unsubscribe from this group, send email to puppet-users+unsubscribe@**
 googlegroups.com puppet-users%2bunsubscr...@googlegroups.com.
 For more options, visit this group at http://groups.google.com/**
 group/puppet-users?hl=enhttp://groups.google.com/group/puppet-users?hl=en
 .




-- 
Erik Dalén

-- 
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] Run stages frustration

2012-12-17 Thread Erik Dalén
This works (was added sometime during 2.6 cycle I think).

class foo ($stage = main) {
  ...
}

include foo
On Dec 14, 2012 9:52 PM, Jakov Sosic jso...@srce.hr wrote:

 Hi.

 I am wondering why can't run stages get set inside the class?

 For example:

 class foo {
   stage main
 }

 Because, if I want to use stages, I have to declare my class as
 parametrized = so I can't use include or require anywhere else...

 I thought of a different approach, like:

 class foo_wrapper {
   class{ 'foo': stage = 'somestage' }
 }

 but would it work if I later include/require foo_wrapper in more than
 one place? And is this code ok?


 --
 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] Is it able to obtain performance metrics from puppet master?

2012-12-13 Thread Erik Dalén
most of these are available in the reports, have a look in he reportdir
(puppet master --configprint reportdir).

You can also write a report processor to feed them directly into your
monitoring system.


On 13 December 2012 18:09, Oleg Korchagin madrou...@gmail.com wrote:

 Hello

 Is it able to obtain performance metrics from puppet master ( or puppet
 dashboard ) ?

 I intend to use this metrics in external monitoring system.
 Of particular interest are the following metrics:

 * list of agents
 * time since the certain agent last apply manifest ( to find stuck agents )
 * time used to compile manifest by puppet master for the certain agent
 * time used by the certain agent to apply manifest

 P.S. sorry for my english, it is not my native language

 --
 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/-/vcbg7SIFH7oJ.
 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.




-- 
Erik Dalén

-- 
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: subscribe = Package

2012-11-27 Thread Erik Dalén


On Tuesday 27 November 2012 at 22:11, jcbollinger wrote:

  
  
 On Tuesday, November 27, 2012 1:05:48 PM UTC-6, joe wrote:
  If you want to make sure all three packages are installed before the file, 
  the best thing in this situation is to order the classes.
  
  
  
 What he has written should work just fine. Relationships to classes sometimes 
 make sense and sometimes do not. Among other things, they do not make sense 
 for signaling relationships (expressed using 'notify' or 'subscribe', or the 
 ~ or ~ operators).
  
 On the other hand, I don't think signaling relationships involving classes 
 are any more meaningful than ordinary ones, inasmuch as classes neither 
 broadcast events nor have a refresh behavior. File resources also have no 
 refresh behavior, so there is really no point in using 'notify' instead of 
 'before' in the example. Thus it could indeed work -- for that example -- to 
 set up a relationship at class level. I think there must be more to this 
 story, though.
Actually, if you notify a class or define you will notify every resource 
contained inside it, causing services to be restarted and refresh only execs to 
be executed.

--  
Erik Dalén

-- 
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 filtering proxy

2012-11-22 Thread Erik Dalén
I wanted to expose the PuppetDB query API to developers but without exposing 
too much information (for example file contents that could contain passwords 
etc.). So I've created a small filtering proxy for it using apache and 
mod_ext_filter. It will allow any queries through but filter out the parameters 
on classes and resources in the replies. So you can still query for hosts 
matching certain criteria but without exposing every hosts entire 
configuration.  

I've seen some people on the #puppet IRC channel that has wanted something 
similar, so I thought I should describe it here.

It uses apache2, mod_ext_filter and mod_proxy_http, so activate them.

Put this filter in /usr/local/bin/puppetdb-resource-filter


#!/usr/bin/ruby

require 'json'

out = JSON.parse($stdin.read).each do |item|
  item['parameters'] = {}
end
puts JSON.generate(out)




And add a apache config containing this (and modify to use HTTPS, password 
auth/ssl cert auth or whatever you want in it):


ExtFilterDefine puppetdb-strip-resource-params mode=output \
  intype=application/json outtype=application/json \
  cmd=/usr/local/bin/puppetdb-resource-filter



VirtualHost *:80
  Proxy *
Order Allow,Deny
Allow from all
  /Proxy

  ProxyPreserveHost On
  Location /
ProxyPass http://localhost:8080/
ProxyPassReverse http://localhost:8080/
 /Location

  # Filter this endpoint
  Location /resources
SetOutputFilter puppetdb-strip-resource-params
  /Location

  # Deny access to this endpoint
  Location /commands
Deny from all
  /Location


/VirtualHost


--  
Erik Dalén


-- 
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] hiera forward reverse lookup webservice

2012-11-21 Thread Erik Dalén
I've just created a small web service for doing hiera lookups. It can be 
installed on your puppet master for example and will fetch facts from PuppetDB 
and look up the desired key in hiera.  

That way you don't need to set up hiera and have access to the data anywhere 
else to be able to lookup keys.

It can also do reverse lookups, telling you what hosts has value x for key y. 
That is really slow for lots of hosts though but it does some caching.

Anyway, available at https://github.com/dalen/hieralookup
patches, praise  criticism welcome :)

--  
Erik Dalén


-- 
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] array and string

2012-10-29 Thread Erik Dalén
or use the join() function from puppetlabs-stdlib module.


--  
Erik Dalén


On Monday 29 October 2012 at 05:08, Johan De Wit wrote:

 Hi,
  
 you can use inline_template, this way you can incorperate ruby code in  
 your manifest
  
 $server_string = inline_template(% server.join(' ') %)
  
 see  
 http://docs.puppetlabs.com/references/latest/function.html#inlinetemplate
  
 hope this helps
  
 Grts
  
 Jo
  
 On 10/29/2012 09:29 AM, Hiu wrote:
  hi all,
   
  I have an array and i would like to convert it into a string format.
   
  e.g.
   
  $server = [node1, node2, node3]
   
  when I write my puppet codes
   
  exec { myscript -S $server:
  path = 
  }
   
  my $server becomes a continual string like: node1node2node3, instead  
  of node1 node2 node3. How can i have a delimiter of space in between  
  the array item?
   
  thanks!
  --  
  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/-/OdJUlKWcv9wJ.
  To post to this group, send email to puppet-users@googlegroups.com 
  (mailto:puppet-users@googlegroups.com).
  To unsubscribe from this group, send email to  
  puppet-users+unsubscr...@googlegroups.com 
  (mailto:puppet-users+unsubscr...@googlegroups.com).
  For more options, visit this group at  
  http://groups.google.com/group/puppet-users?hl=en.
  
  
  
  
 --  
 Johan De Wit
  
 Open Source Consultant
 Red Hat Certified Engineer (805008667232363)
 Puppet Certified Professional 2013 (PCP006)
 _
  
 Open-Future Phone +32 (0)2/255 70 70
 Zavelstraat 72 Fax +32 (0)2/255 70 71
 3071 KORTENBERG Mobile +32 (0)474/42 40 73
 BELGIUM http://www.open-future.be
 _
  
 --  
 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 
 (mailto:puppet-users@googlegroups.com).
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com 
 (mailto: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] About execution sequence in puppet.

2012-10-23 Thread Erik Dalén
If you are running with a master/slave setup functions are executed on the 
puppet master as part of the compilation. So it won't really work, and there is 
no way to change the ordering.

To execute that on the client you will need to create a custom fact, but it 
will always be executed before the puppet run starts. So if you are okay with 
it taking two puppet runs to fully configure the node you can use that method 
and the fact will be available on the second puppet run after the package has 
been installed.

Another way would be to specify which package version you want and install that 
version and use the same version variable in the template.  

--  
Erik Dalén


On Tuesday 23 October 2012 at 12:04, Apple Wang wrote:

 Hi, all
  
 I have some questions about the execution sequence in puppet.
  
 The background:
 I want to install mysql package and configure /etc/my.cnf according to the 
 version of mysql. So I wrote an user defined function to get mysql rpm 
 version. Codes are as follows.
 
 class mysql {
 package { 'mysql':
 ensure = latest,
 }
  
 $mysql_version = get_pkg_version(mysql)
  
 file { '/etc/my.cnf':
 ensure = present,
 mode = '0644',
 content = template('mysql/mysql.cnf'),
 require = Package['mysql'],
 }
 }
  
 Note: get_pkg_version is the user defined function to get mysql rpm version.
 ---
 Issue:
 The first time I execute puppet agent -t, the variable mysql_version couldn't 
 get the version of mysql. And I found it was executed before the installation 
 of mysql package. And the second time I execute puppet agent -t, the variable 
 mysql_version got the version of mysql installed after the first time.
  
 So, my question is that are variables assignment executed before the 
 resources such as Package, Service, File..etc?  
 Is there any method can make $mysql_version = get_pkg_version(mysql) 
 executed after Package['mysql']?
  
 Really looking forward to your answers!
  
 --  
 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/-/6NzlmgjiBHUJ.
 To post to this group, send email to puppet-users@googlegroups.com 
 (mailto:puppet-users@googlegroups.com).
 To unsubscribe from this group, send email to 
 puppet-users+unsubscr...@googlegroups.com 
 (mailto: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-lint status error

2012-09-20 Thread Erik Dalén
I believe it was fixed in https://github.com/rodjek/puppet-lint/pull/141
But it might not have been released yet as a gem.

On 20 September 2012 10:34, Antidot SAS antidot...@gmail.com wrote:
 Hi everyone,


 I have recently updated the puppet-lint:
 # puppet-lint -v
 Puppet-lint 0.2.1
 #

 And now I don't have error status comming up:
 # puppet-lint --no-80chars-check --no-2sp_soft_tabs-check
 --no-hard_tabs-check --no-autoloader_layout-check --fail-on-warnings
 manifests/s_templates/s_ntp.pp ; echo $?
 ERROR: trailing whitespace found on line 1
 ERROR: trailing whitespace found on line 4
 WARNING: class not documented on line 33
 0


 Is this normal?

 --
 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.



-- 
Erik Dalén

-- 
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] Re: [Puppet-dev] Announce: PuppetDB 1.0 Available

2012-09-20 Thread Erik Dalén
Great work!

But what are the changes since 0.11.0?

It would also be interesting to see a roadmap of post 1.0 features
that are planned.

On 21 September 2012 02:03, Moses Mendoza mo...@puppetlabs.com wrote:
 PuppetDB 1.0 is now available!

 PuppetDB, a component of the Puppet Data Library, is a centralized storage
 daemon for auto-generated data. This initial release of PuppetDB targets the
 storage of catalogs and facts.

 Much more information is available on the Puppet Labs blog:

 http://puppetlabs.com/blog/introducing-puppetdb-put-your-data-to-work/

 ...and on the docs site:

 http://docs.puppetlabs.com/puppetdb/1/

 ...and there will also be 2 talks involving PuppetDB at next week's 
 PuppetConf.

 What can it do for you?

 *  It’s a drop-in, 100% compatible replacement for storeconfigs
 *  It’s a drop-in, 100% compatible replacement for inventory service
 *  It's already in production at many sites, handling thousands of nodes and
millions of resources
 *  It hooks into your Puppet infrastructure using Puppet’s pre-existing
extension points (catalog/facts/resource/node terminuses)
 *  It’s much faster, much more space-efficient, and much more scalable
than current storeconfigs and the current inventory service.
*  We can handle a few thousand nodes, with several hundred
   resources each, with a 30m runinterval on our laptops during
   development.
 *  It stores the entire catalog, including all dependency and
containment information
 *  It exposes well-defined, HTTP-based methods for accessing stored 
 information
 *  Documented at http://docs.puppetlabs.com/puppetdb
 *  It presents a superset of the storeconfigs and inventory service
APIs for use in scripts or by other tools
*  In particular, we support arbitrarily nested boolean operators
 *  It decouples catalog and fact storage from the compilation process
*  PuppetDB obsoletes previous puppetq functionality
 *  It works Very Hard to store everything you send it; we auto-retry
all storage requests, persist storage requests across restarts,
and preserve full traces of all failed requests for post-mortem analysis
 *  It’s secured using Puppet’s built-in SSL infrastructure
 *  It’s heavily instrumented and easy to integrate its performance info into
your monitoring frameworks

 We encourage you to try it out, hammer it with data, and let us know
 if you run into any issues!

 # Downloads

 Available in native package format at

 http://yum.puppetlabs.com

 http://apt.puppetlabs.com

 Source (same license as Puppet):  http://github.com/puppetlabs/puppetdb

 Available for use with Puppet Enterprise 2.5.1 and later at

 http://yum-enterprise.puppetlabs.com/ and 
 http://apt-enterprise.puppetlabs.com/

 Puppet module (Puppet Enterprise support is forthcoming):

 http://forge.puppetlabs.com/puppetlabs/puppetdb

 # Documentation (including how to install): 
 http://docs.puppetlabs.com/puppetdb

 # Issues can be filed at:
 http://projects.puppetlabs.com/projects/puppetdb/issues

 # See our development board on Trello:
 http://links.puppetlabs.com/puppetdb-trello

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Developers group.
 To post to this group, send email to puppet-...@googlegroups.com.
 To unsubscribe from this group, send email to 
 puppet-dev+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/puppet-dev?hl=en.




-- 
Erik Dalén

-- 
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] Any progress in change management?

2012-09-10 Thread Erik Dalén
We use git+gerrit and one environment per git branch for this purpose.
Gives us both change management and code review. We also have a
automatic lint  syntax check for each review request coming in to
gerrit.

On 10 September 2012 11:36, Hannes Schaller ad...@cyberkov.at wrote:
 Hello!

 I stumbled across
 http://projects.puppetlabs.com/projects/1/wiki/Change_Management today but I
 couldn't find any newer version in the new wiki.

 As I am currently facing changes which could cause problems in existing
 infrastructure I would like to implement some approval concept on a per
 resource or module basis.

 For now I am going with a define called featurebit which checks on a
 global variable in the ENC and then includes the real class but I don't
 think this is a good solution (I'd prefer something like the approved
 function as mentioned on the wiki page) and running the hosts via cron on a
 regular basis in noop mode.


 If someone knows about best practices can you please give me some directions
 where I could go or what approach would fit better to my needs?

 I also thought about some meta class that would set a default for every
 possible Ressource to be noop but that would be just insane ;-)

 Thanks for your help in advance!

 Cheers
 Hannes

 --
 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.




-- 
Erik Dalén

-- 
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: puppetlsabs/puppet-mysql error: access denied for user root

2012-09-06 Thread Erik Dalén
It is probably because $HOME isn't set properly when it is running as
an agent. There is an open pull request to fix this:
https://github.com/puppetlabs/puppetlabs-mysql/pull/92

On 6 September 2012 15:15, Luca Gioppo lucagio...@gmail.com wrote:
 Ok problem solved
 Evidently pupped uses the /etc/my.cfg to get the password to access to the
 DB
 This info is not written down in the puppet-mysql template (I believe that
 few people use the database creation of the module).
 Also there is a bit of mess right now on the writing of that file it seems
 that it get written by too many pieces.
 In the end is possible to add the password key in that file and all goes
 well.
 As a workaround this can be a good solution, but for long term approach I
 think that writing down in clear in the host the root passowrd is not a good
 approach, but anyway...
 Thanks
 Luca

 Il giorno giovedì 6 settembre 2012 10:15:38 UTC+2, Luca Gioppo ha scritto:

 On a second run of puppet after adding the mysql::db is not possible to
 create the db getting the error below

 class { 'mysql::server':
  config_hash = {root_password = 'changeme',}
 }
 mysql::db { 'mydatabase':
  user = 'myapp1',
  password = 'supersecret',
  host = 'webapp1.puppetlabs.com',
 }

 Error: Execution of '/usr/bin/mysql -NBe create database `mydatabase`
 character set utf8' returned 1: ERROR 1045 (28000): Access denied for user
 'root'@'localhost' (using password: NO)

 Executing the command from shell (after replacing the quotes ` with '  )
 and including all the command in double quote the db gets created.
 It seems that the puppet process cannot find the password that is present
 in the /root/.my.conf

 For sure there is some problem in my installation any help?
 Thanks
 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/-/zZzw5IGBF0IJ.

 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.



-- 
Erik Dalén

-- 
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: Trying to setup puppetdbquery on puppet-3.0.0-rc5

2012-09-04 Thread Erik Dalén
I've released a new version now that contains a fix for this, thanks
for the report.

On 1 September 2012 11:03, Erik Dalén erik.gustav.da...@gmail.com wrote:
 I'll try to take a look at this during the weekend and see if I can
 create something that is compatible with both puppet 2.7 and 3.0. Can
 probably try to make the requests more like the puppetdb-terminus does
 them as it works on both.

 On 31 August 2012 18:28, Chris Price ch...@puppetlabs.com wrote:
 Chuck,

 The cause of this issues is that we introduced our own HTTP connection
 wrapper in 3.0 (rather than using Net::HTTP directly).  This allows us to do
 a better job of centralizing the logic related to managing SSL setup and
 error handling.

 Our Connection class provides a subset of the methods available on Ruby's
 HTTP class, and it looks like puppetdbquery is using one of the methods that
 don't currently exist in our new API.

 The possible solutions would be to add the missing #start method to our new
 class, or to tweak puppetdbquery so that it doesn't rely on the #start
 method.  I'll ping the folks on our platform team and see what their
 thoughts are.

 Thanks for the heads up!
 Chris


 On Thursday, August 30, 2012 6:04:27 AM UTC-7, Chuck wrote:

 I have puppetdbquery working on my puppet-2.7.16 puppet master but I am
 getting an error when using it with puppet-3.0.0-rc5

 https://github.com/dalen/puppet-puppetdbquery

 This is the error I am getting:

   err: Could not retrieve catalog from remote server: Error 400 on SERVER:
 undefined method `start' for
 #Puppet::Network::HTTP::Connection:0x7fa6e25db7c8

 How would I go about finding the actual cause of this issue?


 Thanks,

 --
 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/-/cnmWN3qKeJYJ.

 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.



 --
 Erik Dalén



-- 
Erik Dalén

-- 
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: Trying to setup puppetdbquery on puppet-3.0.0-rc5

2012-09-01 Thread Erik Dalén
I'll try to take a look at this during the weekend and see if I can
create something that is compatible with both puppet 2.7 and 3.0. Can
probably try to make the requests more like the puppetdb-terminus does
them as it works on both.

On 31 August 2012 18:28, Chris Price ch...@puppetlabs.com wrote:
 Chuck,

 The cause of this issues is that we introduced our own HTTP connection
 wrapper in 3.0 (rather than using Net::HTTP directly).  This allows us to do
 a better job of centralizing the logic related to managing SSL setup and
 error handling.

 Our Connection class provides a subset of the methods available on Ruby's
 HTTP class, and it looks like puppetdbquery is using one of the methods that
 don't currently exist in our new API.

 The possible solutions would be to add the missing #start method to our new
 class, or to tweak puppetdbquery so that it doesn't rely on the #start
 method.  I'll ping the folks on our platform team and see what their
 thoughts are.

 Thanks for the heads up!
 Chris


 On Thursday, August 30, 2012 6:04:27 AM UTC-7, Chuck wrote:

 I have puppetdbquery working on my puppet-2.7.16 puppet master but I am
 getting an error when using it with puppet-3.0.0-rc5

 https://github.com/dalen/puppet-puppetdbquery

 This is the error I am getting:

   err: Could not retrieve catalog from remote server: Error 400 on SERVER:
 undefined method `start' for
 #Puppet::Network::HTTP::Connection:0x7fa6e25db7c8

 How would I go about finding the actual cause of this issue?


 Thanks,

 --
 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/-/cnmWN3qKeJYJ.

 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.



-- 
Erik Dalén

-- 
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] using puppet augeas to add entry in /etc/syslog.conf

2012-08-31 Thread Erik Dalén
If you know some ruby coding you could make a type and provider using
either parsedfile or augeas like the augeasproviders:
https://github.com/domcleal/augeasproviders

You could possibly also use the file_line type from puppetlabs-stdlib.

On 28 August 2012 23:20, Clay clay...@gmail.com wrote:
 Hi ,
 Im trying to add a entry in /etc/syslog.conf  using puppet augeas like this
   *.warning;mail.none;authpriv.none;cron.none@syslog_host
 ,

 seems the way to do this with augeas is :

augeas { syslog_conf:
 lens= syslog.lns,
 incl = /etc/syslog.conf,
 changes = [
 ins entry after entry[last()],
 set entry[last()]/selector[1]/facility '*',
 set entry[last()]/selector[1]/level warning,
 set entry[last()]/selector[2]/facility mail,
 set entry[last()]/selector[2]/level none,
 set entry[last()]/selector[3]/facility authpriv,
 set entry[last()]/selector[3]/level none,
 set entry[last()]/selector[4]/facility cron,
 set entry[last()]/selector[4]/level none,
 set entry[last()]/action/hostname syslog_host,
 ],
 onlyif = match entry[hostname = 'syslog_host'] size == 0,
 }

 which is a lot of entries just for one line of  config file,  also augeas
 has some problem on Solaris 10 to parse /etc/syslog.conf ,

 it there a better way ?   I know could use file server or template, but I'm
 just trying to  add an entry to the existing syslog.conf file, rather than
 store them in puppet master.
 there's a  puppet module at https://github.com/mstrauss/puppet-editfile ,
 which I haven't tried yet.

 Is there a plan to add editfile feature to puppet , this is becoming
 rather frustrating .

 Thanks.

 --
 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/-/YqXFiwuWtxQJ.
 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.



-- 
Erik Dalén

-- 
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] Uber Frustration with Puppet.

2012-08-30 Thread Erik Dalén
Have you had a look at the functions in puppetlabs-stdlib?
There's a bunch of functions for dealing with hashes and iterating
over them there, keys() for example could be helpful in this case.

On 30 August 2012 07:50, Douglas Garstang doug.garst...@gmail.com wrote:
 Boy, am I frustrated. I'm about ready to throw puppet out the window
 here. I'm trying to configure glusterfs, and you know, it kinda made
 sense to separate the data from the manifests, so I went ahead and put
 this into a YAML file, which hiera loads...

 glusterfs_volumes:
   gfsvol01:
 volume_name: gfsvol01
 master_node: gfs01.us1.xxx.com # Make sure only one node
 runs the gluster commands.
 nodes:
   - name: gfs01.us1.xxx.com
 bricks:
   - device: /dev/bcvg/disk1
 brick_name: /var/bricks/gfsvol01-0
   - device: /dev/bcvg/disk2
 brick_name: /var/bricks/gfsvol01-1
   - name: gfs02.us1.xxx.com
 bricks:
   - device: /dev/bcvg/disk3
 brick_name: /var/bricks/gfsvol01-0
   - device: /dev/bcvg/disk4
 brick_name: /var/bricks/gfsvol01-1

 For the last couple of days I have been dealing with the inadequacies
 of puppet in dealing with working with this kind of data structure.
 You can't easily iterate through it, and every time you do, you have
 to write a new definition that takes an array. The whole thing ends up
 turning into a giant complicated mess.

 I tried writing some custom functions in ruby that do things like,
 return a list of nodes for a volume, or return a list of bricks for a
 node, but it really irks me that I have to keep writing ruby scripts
 for this (since ruby makes my eyes bleed).

 So... what are my options here? Aren't we supposed to strive for
 separating the manifest from the data? I could probably get away with
 a few definitions that take a set of parameters. However, when the
 time comes to say, add a new node to the cluster, we have to modify
 the manifest. At one point, I had this working so that all you had to
 do was add a node to the yaml file, make ZERO changes to the manifest
 file, and after running puppet, it would add the node to the cluster.

 It may make my life easier if I flatten the yaml file, but then I'm
 changing the data to suit the limitations of the DSL.

 At this point, I'm very close to simply sticking with the yaml file,
 have puppet push that out to the clients, write some python scripts to
 do all the magic (reading the yaml file), and have puppet run those
 scripts with Exec {}.

 Is proper array/hash iteration ever going to be added to puppet?

 Doug.

 --
 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.




-- 
Erik Dalén

-- 
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] Variables and scope with inherits

2012-08-13 Thread Erik Dalén
When you inherit from a class the class you inherit from is evaluated
first, which is why it is able to set the parameter defaults for the
subclass.

So when those if statements in foo::params are evaluated the class foo
simply haven't been evaluated yet, so you can't reference any
variables in it. Neither class parameters or normal variables.

If you replace $foo::bar with just $bar in the if statement it should work.

On 13 August 2012 08:51, Svein sv...@soleim.at wrote:
 I want to have a parametrized class with lookup from params.pp but I keep
 getting into problems.



 init.pp:
 class foo (
   $bar = $foo::params::bar,
   $foofoo = $foo::params::foofoo
 ) inherits foo::params   {
   file {'/tmp/foobar':
 content = template(foo/foobar.erb),
   }

 }
 params:
 class foo::params {
   $bar = true
   if $foo::bar {
 $foobar = 'yes'
 $foofoo = 'foo'
}
   else {
 $foobar = 'no'
 $foofoo = 'bar'
   }
 }

 foobar.erb:
 % if scope.lookupvar('foo::boo') -%
 %= scope.lookupvar('foo::foofoo') %
 % end -%
 %= scope.lookupvar('foo::params::foobar') %
 %= scope.lookupvar(foo::foofoo) %

 When I run puppet on the class I get:
 puppet apply --modulepath=/modules/ foo/test/init.pp
 warning: Scope(Class[Foo::Params]): Could not look up qualified variable
 'foo::bar'; class foo has not been evaluated at
 /modules/foo/manifests/params.pp:3
 warning: Scope(Class[Foo::Params]): Could not look up qualified variable
 'foo::bar'; class foo has not been evaluated at
 /modules/foo/manifests/params.pp:3
 notice: Finished catalog run in 0.02 seconds

 and the file looks like:
 /tmp/foobar:
 bar
 no
 bar


 If I use include params.pp instead of inherits puppet gives:
 puppet apply --modulepath=/modules/ foo/test/init.pp
 warning: Scope(Class[Foo]): Could not look up qualified variable
 'foo::params::bar'; class foo::params has not been evaluated at
 /modules/foo/manifests/init.pp:2
 warning: Scope(Class[Foo]): Could not look up qualified variable
 'foo::params::bar'; class foo::params has not been evaluated at
 /modules/foo/manifests/init.pp:2
 warning: Scope(Class[Foo]): Could not look up qualified variable
 'foo::params::foofoo'; class foo::params has not been evaluated at
 /modules/foo/manifests/init.pp:3
 warning: Scope(Class[Foo]): Could not look up qualified variable
 'foo::params::foofoo'; class foo::params has not been evaluated at
 /modules/foo/manifests/init.pp:3

 and the file looks like.
 /tmp/foobar:
 undef
 no
 undef


 What I want it to look like is of cause:
 bar
 yes
 bar

 --
 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/-/5v355b9Eo0QJ.
 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.



-- 
Erik Dalén

-- 
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.



  1   2   >