[Puppet-dev] Re: [voxpupuli] Puppet Apache Module

2018-08-30 Thread Martin Alfke
Hi Davin,

according to RedHat RHEL 6 has End of maintenance support 2 (Product 
retirement) until November 30, 2020 and End of extended lifecycle support at 
June 30, 20124.
(https://access.redhat.com/support/policy/updates/errata#Life_Cycle_Dates)

Will you support the latest apache module with RHEL 6 support until end of 
RedHat support?

Best,
Martin


> On 23. Aug 2018, at 17:29, Davin Hanlon  wrote:
> 
> Hello everyone!
> 
> Read on if you use the Puppet Apache module.
> 
> Quick note to let you know of some major work that we're performing to the 
> module. As you probably know, Apache 2.2 has been end-of-lifed since the 
> start of 2018 
> (https://httpd.apache.org/#apache-httpd-22-end-of-life-2018-01-01). 
> Therefore, we're taking steps to remove support for that version of Apache 
> from the module. This also impacts the operating systems that we will support 
> for the module. The following operating systems won't be supported by the 
> Apache module after the changes:
>   • RHEL 5
>   • RHEL 6
>   • CentOS 5
>   • CentOS 6
>   • Oracle Linux 6
>   • Scientific Linux 6
>   • SLES 11
> Any users that use either Apache 2.2 or use one of the above operating 
> systems should pin to an older version of the module. We will continue to 
> support these operating systems for older versions of the module.
> 
> Feel free to reach out if you've any questions or comments.
> 
> Thanks,
> The Puppet Modules Team
> -- 
> Davin Hanlon
> Product Owner, Modules
> Puppet. The shortest path to better software.
> _._,_._,_
> Groups.io Links:
> You receive all messages sent to this group.
> 
> View/Reply Online (#249) | Reply To Group | Reply To Sender | Mute This Topic 
> | New Topic
> 
> Your Subscription | Contact Group Owner | Unsubscribe [tux...@gmail.com]
> _._,_._,_

-- 
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/89A95B8D-D171-4CC3-B956-FB544E5A2AC4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] [Puppet-Users] Puppet Platform 6 Update

2018-07-18 Thread Martin Alfke



> On 18. Jul 2018, at 00:43, Eric Sorenson  wrote:
> 
> On Jul 17, 2018, at 2:26 AM, Martin Alfke  wrote:
>> 
>>> On 17. Jul 2018, at 01:40, Eric Sorenson  wrote:
>>> 
>>> So my question is - 
>>> - do you current use/rely on 'gem install puppet' for your workflows? If 
>>> so, what do you do with it? (does anybody use a 'gem install puppet' as 
>>> their production "puppet agent" daemon?)
>> 
>> We install puppet as a gem in CI/CD unit testing.
>> 
> 
> Hi Martin! Does this use depend on types and providers in puppet's lib/ 
> directory? Or is it just having the core puppet code available?

AFAIK it is needed to compile the catalog using rspec-puppet. (I hope I am 
right on this).
On acceptance testing (with beaker) we install the OS puppet-agent package.

> 
> 
>>> - given the above, what would be the easiest/most intuitive way to get 
>>> those extracted types into your puppet installation? some ideas we've 
>>> kicked around are 
>>>  * a puppet type 'meta module' that, akin to a rpm/deb metapackage, doesn't 
>>> have content, just dependencies on the actual modules at particular pinned 
>>> versions that match the agent package versions
>>>  * a Puppetfile that you could point r10k at to get the modules installed
>>>  * individual gems for each of the extracted modules with Gemfile 
>>> dependencies (note: this is a Bad Idea™)
>> 
>> We need at least a note how we have to add the module with the separated 
>> types/providers.
> 
> Yes absolutely
> 
>> 
>>> 
>>> WDYT?
>>> --eric0
>>> 
>>> 
>>>> On Jul 16, 2018, at 10:20 AM, Josh Cooper  wrote:
>>>> 
>>>> I wanted to share some significant developments as we progress towards a 
>>>> Puppet Platform 6 release. I encourage you to try out nightly builds 
>>>> available in the puppet6 repos:
>>>> 
>>>> http://nightlies.puppet.com/yum/puppet6-nightly/
>>>> http://nightlies.puppet.com/apt/puppet6-nightly/
>>>> http://nightlies.puppet.com/downloads/{mac,windows}/puppet6-nightly/
>>>> 
>>>> 1. Unvendoring Semantic Puppet
>>>> 
>>>> Previously, the puppet repo, puppet-agent and puppetserver 
>>>> vendored/packaged different versions of the semantic_puppet gem. We've 
>>>> untangled that mess so that in Platform 6:
>>>> 
>>>> * puppet has a runtime gem dependency on the semantic_puppet gem
>>>> * puppet-agent bundles the semantic_puppet 1.0.2 gem
>>>> * puppetserver no longer knows about puppet's transitive gem dependencies
>>>> * we can bump the semantic_puppet version in puppet-agent in the future 
>>>> without breaking puppetserver running on the same host. The same is true 
>>>> for other puppet runtime gem dependencies like fast_gettext and multi_json.
>>>> 
>>>> See https://tickets.puppetlabs.com/browse/PA-1880 for more details.
>>>> 
>>>> 2. Puppet Platform 6 requires Ruby 2.3
>>>> 
>>>> Puppet Platform 6 requires Ruby 2.3 or up, so we can now use modern syntax 
>>>> such as keyword arguments, dig, squiggly heredocs, etc. Puppet will error 
>>>> when running on unsupported ruby versions such as 2.2, which went EOL on 
>>>> March 31, 2018.
>>>> 
>>>> Since puppetserver runs puppet code in a JRuby interpreter and JRuby 1.7 
>>>> conforms to the 1.9.3 Ruby language, we first had to move puppetserver 
>>>> from JRuby 1.7 to 9K. In Platform 5, we made it possible to opt into using 
>>>> JRuby 9K. In Platform 6, we will drop JRuby 1.7 and only support JRuby 
>>>> 9.1.x.x, which conforms to Ruby 2.3.
>>>> 
>>>> To ensure puppet code does not break puppetserver/JRuby, we've started 
>>>> running puppet PRs against JRuby 9K in TravisCI.
>>>> 
>>>> See https://tickets.puppetlabs.com/browse/PUP-6893 and 
>>>> https://tickets.puppetlabs.com/browse/SERVER-2155 for more details.
>>>> 
>>>> 3. Intermediate CA improvements
>>>> 
>>>> Currently, customers can set up Puppet to use an intermediate CA by 
>>>> manually generating and distributing certificates and keys, installing 
>>>> them in the proper locations on disk, for both the master and agent. This 
>>>> is time intensive, error prone, and even once these certs have been put in 
>>>> place, full validation using CRL chains was not possible

Re: [Puppet-dev] [Puppet-Users] Puppet Platform 6 Update

2018-07-17 Thread Martin Alfke



> On 17. Jul 2018, at 01:40, Eric Sorenson  wrote:
> 
> Another effort that's underway but not yet complete is the extraction of 
> non-core types/providers into modules. This addresses some long-standing 
> requests to, for example, be able to change the nagios types and OS-specific 
> resources without needing to get a full agent release out. The extracted 
> types will be available in a modulepath structure in the puppet agent 
> package, so (with a few targeted exceptions) there won't be any user-visible 
> changes to what's available when you get the package, but an implication that 
> hasn't really come up is around using Puppet in rubygem format. The extracted 
> types are available on github and on the forge as separate modules, so if you 
> currently use some of these extracted types, you'd need a way to get them 
> installed locally.
> 
> So my question is - 
> - do you current use/rely on 'gem install puppet' for your workflows? If so, 
> what do you do with it? (does anybody use a 'gem install puppet' as their 
> production "puppet agent" daemon?)

We install puppet as a gem in CI/CD unit testing.

> - given the above, what would be the easiest/most intuitive way to get those 
> extracted types into your puppet installation? some ideas we've kicked around 
> are 
>   * a puppet type 'meta module' that, akin to a rpm/deb metapackage, doesn't 
> have content, just dependencies on the actual modules at particular pinned 
> versions that match the agent package versions
>   * a Puppetfile that you could point r10k at to get the modules installed
>   * individual gems for each of the extracted modules with Gemfile 
> dependencies (note: this is a Bad Idea™)

We need at least a note how we have to add the module with the separated 
types/providers.

> 
> WDYT?
> --eric0
> 
> 
>> On Jul 16, 2018, at 10:20 AM, Josh Cooper  wrote:
>> 
>> I wanted to share some significant developments as we progress towards a 
>> Puppet Platform 6 release. I encourage you to try out nightly builds 
>> available in the puppet6 repos:
>> 
>> http://nightlies.puppet.com/yum/puppet6-nightly/
>> http://nightlies.puppet.com/apt/puppet6-nightly/
>> http://nightlies.puppet.com/downloads/{mac,windows}/puppet6-nightly/
>> 
>> 1. Unvendoring Semantic Puppet
>> 
>> Previously, the puppet repo, puppet-agent and puppetserver vendored/packaged 
>> different versions of the semantic_puppet gem. We've untangled that mess so 
>> that in Platform 6:
>> 
>> * puppet has a runtime gem dependency on the semantic_puppet gem
>> * puppet-agent bundles the semantic_puppet 1.0.2 gem
>> * puppetserver no longer knows about puppet's transitive gem dependencies
>> * we can bump the semantic_puppet version in puppet-agent in the future 
>> without breaking puppetserver running on the same host. The same is true for 
>> other puppet runtime gem dependencies like fast_gettext and multi_json.
>> 
>> See https://tickets.puppetlabs.com/browse/PA-1880 for more details.
>> 
>> 2. Puppet Platform 6 requires Ruby 2.3
>> 
>> Puppet Platform 6 requires Ruby 2.3 or up, so we can now use modern syntax 
>> such as keyword arguments, dig, squiggly heredocs, etc. Puppet will error 
>> when running on unsupported ruby versions such as 2.2, which went EOL on 
>> March 31, 2018.
>> 
>> Since puppetserver runs puppet code in a JRuby interpreter and JRuby 1.7 
>> conforms to the 1.9.3 Ruby language, we first had to move puppetserver from 
>> JRuby 1.7 to 9K. In Platform 5, we made it possible to opt into using JRuby 
>> 9K. In Platform 6, we will drop JRuby 1.7 and only support JRuby 9.1.x.x, 
>> which conforms to Ruby 2.3.
>> 
>> To ensure puppet code does not break puppetserver/JRuby, we've started 
>> running puppet PRs against JRuby 9K in TravisCI.
>> 
>> See https://tickets.puppetlabs.com/browse/PUP-6893 and 
>> https://tickets.puppetlabs.com/browse/SERVER-2155 for more details.
>> 
>> 3. Intermediate CA improvements
>> 
>> Currently, customers can set up Puppet to use an intermediate CA by manually 
>> generating and distributing certificates and keys, installing them in the 
>> proper locations on disk, for both the master and agent. This is time 
>> intensive, error prone, and even once these certs have been put in place, 
>> full validation using CRL chains was not possible.
>> 
>> For Puppet 6, we we are making both tooling and functionality improvements 
>> to this process. In this increment, we have implemented full validation with 
>> chained certificates and CRLs, and we have changed the agent-side SSL 
>> bootstrapping to automatically download these full chains from the master 
>> and store and use them appropriately. It is now no longer necessary for 
>> intermediate CA users to manually distribute SSL files to their agents. On 
>> the server side, we are working to create a puppetserver CLI for setting up 
>> and interacting with the CA. See 
>> https://tickets.puppetlabs.com/browse/SERVER-2171.
>> 
>> 4. Server-stack containerization
>> 
>> We’ve 

Re: [Puppet-dev] Need for feedback regarding sort_merged_arrays vs sort_merge_arrays lookup behavior

2017-08-01 Thread Martin Alfke
Many thanks for the feedback.
We decided to remove sort_merged_arrays option and re-add it once we drop 
support for Puppet < 4.10.5

> On 01 Aug 2017, at 08:56, Thomas Hallgren <thomas.hallg...@puppet.com> wrote:
> 
> I reacted to the formulation "Puppet 4.10.4/5.0.1 or earlier: success - but 
> no functionality". There was never a success but rather a hidden failure 
> (which is worse than an apparent one).
> 
> Puppet never officially named the option to "sort_merge_arrays". The 
> documentation has always had the correct spelling and we fixed the typo as 
> soon as we became aware of it on July 5 (reported in ticket PUP-7751). The 
> fact that you've been using the "correct" misspelling in psick since 
> beginning of June is of course very unfortunate since it means that it has 
> been broken since that time. In my view, our fix didn't break psick. It made 
> the malfunction apparent.
> 
> I agree with Ryan's assessment. There is no way to get consistent behavior 
> when using sort_merged_arrays over multiple versions. It was really broken 
> for some time, and for that, there's no workaround but to refrain from using 
> it.
> 
> - thomas
> 
> On Mon, Jul 31, 2017 at 6:32 PM, Ryan Whitehurst <r...@puppet.com> wrote:
> On Mon, Jul 31, 2017 at 3:53 AM, Martin Alfke <tux...@gmail.com> wrote:
> Hi,
> 
> we (example42) are in need of feedback regarding sort_merged_arrays vs. 
> sort_merge_arrays when having to support multiple Puppet versions.
> 
> http://www.example42.com/2017/07/31/sort_merged_array-fix/
> 
> 
> Given that sort_merge_arrays never actually worked, if you need to support 
> versions before the fix landed, it seems to me that you can't rely on the 
> behavior anyway, so the only actual solution would be to not use 
> sort_merged_arrays at all and instead make sure to sort the results in the 
> puppet code when you use them.
>  
> Best,
> Martin
> 
> --
> 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/4D05248C-E006-4BA8-AE90-4C336D9EC8EF%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> 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/CAHTHiAEV4q2dXNz0Gwxyj2geV6So6pYVQ8JkLdGMumN6Fd1KUg%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 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/CAO5TtCt4t6JSMzA2_3%2Bdc1nRVfTbsVEe9dmiOi%3Dx%3DgC5LgRDxw%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 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/A115FFF2-F230-4646-B1A8-4854FE78B055%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet-dev] Need for feedback regarding sort_merged_arrays vs sort_merge_arrays lookup behavior

2017-07-31 Thread Martin Alfke
Hi,

we (example42) are in need of feedback regarding sort_merged_arrays vs. 
sort_merge_arrays when having to support multiple Puppet versions. 

http://www.example42.com/2017/07/31/sort_merged_array-fix/

Best,
Martin

-- 
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/4D05248C-E006-4BA8-AE90-4C336D9EC8EF%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Puppet 5 release planning

2017-04-08 Thread Martin Alfke

> On 08.04.2017, at 09:07, Thomas Mueller  wrote:
> 
> 
 Would be this the time to also use /etc/puppet and /opt/puppet?
>> 
>> Good question. I am afraid it would break too many things, so
>> /opt/puppetlabs will be around for a while longer.
>> 
>> 
> Please, no new default paths again.

+1

Martin

-- 
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/654C2DD0-4A0F-48B7-9FE1-BE144E04A5A0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Puppet-Rspec - Can it test for smart paramaters

2017-02-08 Thread Martin Alfke
Hi James,
> On 07.02.2017, at 21:58, James Perry  wrote:
> 
> I have started to use Smart Parameters in Puppet, as I am running Foreman 
> with Puppet, and I started writing a new module where I am going to be 
> setting smart parameters. 
> 
> Is there a way with the puppet-rspec tests to check that the smart parameter 
> was set?  If they can be tested to be set I would like to include that as 
> part of the module and associated functions. 

you can test whether your Puppet module will add relevant resources to the 
catalog.
It seems as if you now have a parameterized class and you want to test that 
everything is working when passing values to them.

You can easily do this with the let(:params) syntax in rspec-puppet.

e.g. lets assume the following puppet code:

class my_app (
  $dev_env = false,
){
  if $dev_env {
file { ‘/etc/my_app/debug.conf’:
  ensure => file,
}
  } else {
file { ‘/etc/my_app/debug.conf’:
  ensure => absent,
}
  }
}


Your rspec test can set the value. See following example:

describe ‘my_app’ do
  context ‘with default value’ do
it { is_expected.to 
contain_file(‘/etc/my_app/debug.conf’).with_ensure(‘absent’) }
  end

  context ‘on dev platform’ do
let(:params) {{ :dev_env = true }}
it { is_expected.to 
contain_file(‘/etc/my_app/debug.conf’).with_ensure(‘file’) }
  end
end

hth,
Martin

-- 
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/930E3FA3-57B4-43AC-9C44-F3DBAB5A56EC%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2017-02-05 Thread Martin Alfke
Hi David,

I found some time digging into your proposal.
It seems as if we are following completely different approaches. I hope that my 
email will not upset or offend you.

Usually I hear lot of people complaining, that types and providers are the most 
complex thing todo with Puppet.
Especially since the DSL is easy to read and understand.
When I thought about “making types and providers more easy to use” I always 
think about the simplicity of Puppet DSL and never thought about a new ruby API.

I am happy to chat with you tomorrow. But I don’t see how Types and Providers 
will be more easy using your proposed API.
It seems to me as if you are “hiding” some things which are hard to understand 
- similar to mk_resource_methods which is useful when following some silent 
assumptions.
I always prefer Puppet to be as simple as possible which means: do everything 
as obvious as possible.

Different to your proposal I thought whether it would be a possible way to 
reuse Puppet DSL for types and providers.
Maybe it is a silly idea. I am interested in your opinion.

Think of something like the following (yes, I know, “type” is already a 
reserved word):

type my_module::my_file (
  Enum['file', 'absent' ] $ensure,
  Stdlib::Absolute_path   $path = $title,
  String  $owner,
){
  def create {
exec { "create file ${path}":
  command => "touch ${path}",
  path=> '/usr/bin:/bin',
  creates => $path,
}
  }
  def destroy {
file { $path:
  ensure =>  absent,
}
  }
  property owner {
exec { "chown ${owner} on ${path}":
  command => "chown ${owner} ${path}",
  path=> '/bin:/usr/bin',
  unless  => '',
}
  }
}

(I know that exec should not be used in this way.)


Always think on what users want to do:

People with ruby experience will not find types and providers difficult (in the 
way they are done today).

But Puppet was originally written for Ops people who don’t like scripting or 
coding.
They were happy having a readable, easy to understand DSL instead.
These are the ones which you want to make types/providers more easy.

Looking forward to seeing you tomorrow or later this evening.

Best,
Martin



> On 03 Feb 2017, at 12:12, Martin Alfke <tux...@gmail.com> wrote:
> 
> Hi David,
> 
> many thanks for sharing your ideas.
> 
> As you already know: personally I don’t say that types and providers are way 
> to difficult.
> It is more a matter on how to explain them.
> I will dig through your document during weekend. We can have a chat on Monday 
> in Ghent.
> 
> But besides this:
> is your idea somehow related to the libral project?
> https://github.com/puppetlabs/libral
> 
> Best,
> Martin
> 
> 
>> On 31.01.2017, at 17:04, David Schmitt <david.schm...@puppet.com> wrote:
>> 
>> Hi *,
>> 
>> The type and provider API has been the bane of my existence since I [started 
>> writing native 
>> resources](https://github.com/DavidS/puppet-mysql-old/commit/d33c7aa10e3a4bd9e97e947c471ee3ed36e9d1e2).
>>  Now, finally, we'll do something about it. I'm currently working on 
>> designing a nicer API for types and providers. My primary goals are to 
>> provide a smooth and simple ruby developer experience for both scripters and 
>> coders. Secondary goals were to eliminate server side code, and make puppet 
>> 4 data types available. Currently this is completely aspirational (i.e. no 
>> real code has been written), but early private feedback was encouraging.
>> 
>> To showcase my vision, this 
>> [gist](https://gist.github.com/DavidS/430330ae43ba4b51fe34bd27ddbe4bc7) has 
>> the [apt_key 
>> type](https://github.com/puppetlabs/puppetlabs-apt/blob/master/lib/puppet/type/apt_key.rb)
>>  and 
>> [provider](https://github.com/puppetlabs/puppetlabs-apt/blob/master/lib/puppet/provider/apt_key/apt_key.rb)
>>  ported over to my proposal. The second example there is a more long-term 
>> teaser on what would become possible with such an API. 
>> 
>> The new API, like the existing, has two parts: the implementation that 
>> interacts with the actual resources, a.k.a. the provider, and information 
>> about what the implementation is all about. Due to the different usage 
>> patterns of the two parts, they need to be passed to puppet in two different 
>> calls: 
>> 
>> The `Puppet::SimpleResource.implement()` call receives the `current_state = 
>> get()` and `set(current_state, target_state, noop)` methods. `get` returns a 
>> list of discovered resources, while `set` takes the target state and 
>> enforces those goals on the subject. There is only a single (ruby) object 
>> throughout an agent run, that can easily do caching and what eve

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

2017-02-03 Thread Martin Alfke
Hi David,

many thanks for sharing your ideas.

As you already know: personally I don’t say that types and providers are way to 
difficult.
It is more a matter on how to explain them.
I will dig through your document during weekend. We can have a chat on Monday 
in Ghent.

But besides this:
is your idea somehow related to the libral project?
https://github.com/puppetlabs/libral 

Best,
Martin


> On 31.01.2017, at 17:04, David Schmitt  wrote:
> 
> Hi *,
> 
> The type and provider API has been the bane of my existence since I [started 
> writing native 
> resources](https://github.com/DavidS/puppet-mysql-old/commit/d33c7aa10e3a4bd9e97e947c471ee3ed36e9d1e2
>  
> ).
>  Now, finally, we'll do something about it. I'm currently working on 
> designing a nicer API for types and providers. My primary goals are to 
> provide a smooth and simple ruby developer experience for both scripters and 
> coders. Secondary goals were to eliminate server side code, and make puppet 4 
> data types available. Currently this is completely aspirational (i.e. no real 
> code has been written), but early private feedback was encouraging.
> 
> To showcase my vision, this 
> [gist](https://gist.github.com/DavidS/430330ae43ba4b51fe34bd27ddbe4bc7 
> ) has the 
> [apt_key 
> type](https://github.com/puppetlabs/puppetlabs-apt/blob/master/lib/puppet/type/apt_key.rb
>  
> )
>  and 
> [provider](https://github.com/puppetlabs/puppetlabs-apt/blob/master/lib/puppet/provider/apt_key/apt_key.rb
>  
> )
>  ported over to my proposal. The second example there is a more long-term 
> teaser on what would become possible with such an API. 
> 
> The new API, like the existing, has two parts: the implementation that 
> interacts with the actual resources, a.k.a. the provider, and information 
> about what the implementation is all about. Due to the different usage 
> patterns of the two parts, they need to be passed to puppet in two different 
> calls: 
> 
> The `Puppet::SimpleResource.implement()` call receives the `current_state = 
> get()` and `set(current_state, target_state, noop)` methods. `get` returns a 
> list of discovered resources, while `set` takes the target state and enforces 
> those goals on the subject. There is only a single (ruby) object throughout 
> an agent run, that can easily do caching and what ever else is required for a 
> good functioning of the provider. The state descriptions passed around are 
> simple lists of key/value hashes describing resources. This will allow the 
> implementation wide latitude in how to organise itself for simplicity and 
> efficiency.  
> 
> The `Puppet::SimpleResource.define()` call provides a data-only description 
> of the Type. This is all that is needed on the server side to compile a 
> manifest. Thanks to puppet 4 data type checking, this will already be much 
> more strict (with less effort) than possible with the current APIs, while 
> providing more automatically readable documentation about the meaning of the 
> attributes. 
>   
> 
> Details in no particular order:
> 
> * All of this should fit on any unmodified puppet4 installation. It is 
> completely additive and optional. Currently.
> 
> * The Type definition 
>   * It is data-only.
>   * Refers to puppet data types.
>   * No code runs on the server.
>   * This information can be re-used in all tooling around displaying/working 
> with types (e.g. puppet-strings, console, ENC, etc.).
>   * autorelations are restricted to unmodified attribute values and constant 
> values.
>   * No more `validate` or `munge`! For the edge cases not covered by data 
> types, runtime checking can happen in the implementation on the agent. There 
> it can use local system state (e.g. different mysql versions have different 
> max table length constraints), and it will only fail the part of the resource 
> tree, that is dependent on this error. There is already ample precedent for 
> runtime validation, as most remote resources do not try to replicate the 
> validation their target is already doing anyways.
>   * It maps 1:1 to the capabilities of PCore, and is similar to the libral 
> interface description (see 
> [libral#1](https://github.com/puppetlabs/libral/pull/2) 
> ). This ensures future 
> interoperability between the different parts of the ecosystem.
>   * Related types can share common attributes by sharing/merging the 
> attribute hashes.
>   * `defaults`, `read_only`, and similar data about attributes in the 
> definition are mostly aesthetic at the current point in time, but will make 
> for 

Re: [Puppet-dev] Idea: Deprecation logs

2016-03-22 Thread Martin Alfke
+1

A tool/separate log would be nice.
I now many puppet installations where people are not locking into their log 
files and where they review their deprecation warnings.

On 22 Mar 2016, at 04:44, Rob Nelson  wrote:

> Yes, it should probably break less. But change is eternal, so it's going to 
> happen and its best we deal with it. It's not like this problem is relegated 
> to only CM tools! If something like this happens with Puppet, it may end up 
> being a good model to point other vendors to.
> 
> On Sunday, March 20, 2016, Thomas Gelf  wrote:
> Hi  Rob,
> 
> nice proposal, would definitively help people to deal with the stated
> problem. Another approach could be to break and deprecate less things.
> 
> Sure, I'm just kidding ;-) I love moving things forward. But you know,
> there's a grain of truth in every joke. We should not forget about the
> fact that by the end of the day we are talking about a tool designed to
> manage configuration.
> 
> For many people right now the configuration manager is the fastest
> moving target in their tool stack. Your proposal is telling me that we
> have a cfgmgmt tool struggling with the amount of deprecations it
> produces. Sad story. We work for the tool, not the other way round.
> 
> Cheers,
> Thomas
> 
> Am 18.03.2016 um 19:12 schrieb Rob Nelson:
> > Happy Friday, everyone! This morning I had some semi-intelligible
> > thoughts about feature deprecation in Puppet, specifically because I got
> > bit with an upgrade issue last night. We do user stories a lot at work,
> > so I'm going to frame it that way. I was curious what other opinions
> > people have on this problem and how it can best be addressed. Thanks!
> 
> --
> 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/ncn1cd%24987%241%40ger.gmane.org.
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> 
> Rob Nelson
> rnels...@gmail.com
> 
> 
> -- 
> 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/CAC76iT-k6cg8WEyR0qaeaf2a_qR2ghmhoeRvXE8u%3D53ueAJXeQ%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 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/B351550E-4BCB-4324-862F-A223E9C599FE%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Puppet 4: defined resource types and epp template

2016-02-04 Thread Martin Alfke

On 01 Feb 2016, at 19:15, Henrik Lindberg  
wrote:

> 
> That is exactly what you should do. An external (file based epp) when called, 
> does not get to see variables in the scope from which it was called/used. 
> This design is deliberate. Think of the template as a function you are 
> calling, and you have to give it its arguments.

In this case the documentation on the website is wrong:
https://docs.puppetlabs.com/puppet/latest/reference/lang_template_epp.html#example-template

The example just switches from template() to epp() function.
According to your writing you must pass all parameters to the epp() function.

> 
> Contrast this with the inline_epp, which you can think of as a 
> lambda/code-block. Here the code block gets to see the variables in scope, 
> since it is itself in that scope (part of the same piece of code).
> 
Got it.
To be honest: this is ugly.
I always thought of epp() being a full replacement for template() without the 
scope issue.
This especially feels bad, when we will have performance improvement for epp in 
the future.

I need to rethink whether inline_epp() is the proper replacement for template() 
function.


> This design makes the code more maintainable and templates more reusable. It 
> is also easier to test the templates (there is a command line utility (puppet 
> epp IIRC) that allows you to feed values into a templates and render the 
> result).
> 
> Hope that helps
> - henrik
> 
>> 
>> Best,
>> Martin
>> 
> 
> 
> -- 
> 
> Visit my Blog "Puppet on the Edge"
> http://puppet-on-the-edge.blogspot.se/
> 
> -- 
> 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/n8o7b5%24k5j%241%40ger.gmane.org.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/E26F3ED6-17F6-47FA-A215-2463253858ED%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Puppet 4: defined resource types and epp template

2016-02-04 Thread Martin Alfke

On 04 Feb 2016, at 14:30, Henrik Lindberg <henrik.lindb...@cloudsmith.com> 
wrote:

> On 2016-04-02 11:46, Martin Alfke wrote:
>> 
>> On 01 Feb 2016, at 19:15, Henrik Lindberg <henrik.lindb...@cloudsmith.com> 
>> wrote:
>> 
>>> 
>>> That is exactly what you should do. An external (file based epp) when 
>>> called, does not get to see variables in the scope from which it was 
>>> called/used. This design is deliberate. Think of the template as a function 
>>> you are calling, and you have to give it its arguments.
>> 
>> In this case the documentation on the website is wrong:
>> https://docs.puppetlabs.com/puppet/latest/reference/lang_template_epp.html#example-template
>> 
> The long example is wrong in that it does not show that arguments must be 
> given in a hash.
> 
> The documetation for epp has unfortunately been boiled down to just the bare 
> minimum and the important distinction that variables must be given has been 
> lost in the series of rewrites that were made.
> 
> The implementation clearly restricts epp() to only see global scope.
> 
> The specification is also clear about scoping: 
> https://github.com/puppetlabs/puppet-specifications/blob/master/language/templates.md#visibility-of-scoped-variables

Yes. the written description is clear about that.

> 
> I filed a documentation ticket.
> 
>> The example just switches from template() to epp() function.
>> According to your writing you must pass all parameters to the epp() function.
>> 
> 
> yes, epp() requires that arguments are given in the call. epp() templates 
> only have access to global variables (i.e. $::osfamily and such).
> 
> 
>>> 
>>> Contrast this with the inline_epp, which you can think of as a 
>>> lambda/code-block. Here the code block gets to see the variables in scope, 
>>> since it is itself in that scope (part of the same piece of code).
>>> 
>> Got it.
>> To be honest: this is ugly.
>> I always thought of epp() being a full replacement for template() without 
>> the scope issue.
> 
> The ERB based template() function is for templates in files. The epp() 
> function is also for files. The big difference between them is that all 
> variables used by the template processed by epp() must be given to the 
> function.
> 
> The inline_epp() may in the special case, when it does not declare parameters 
> have access to all variables in scope. This was deemed to be harmless as all 
> of the logic is in one place, and there is never a question of reuse. It is 
> also seen as an easy way to transition to inline_epp() from inline_template().
> 
> With that, I am not sure I understand your comments. What is it that you 
> think is ugly?
> 
>> This especially feels bad, when we will have performance improvement for epp 
>> in the future.
>> 
> 
> I have not seen tickets with reports of performance problems. How bad is it?

You mentioned it somewhere at PuppetConf that in the future the epp() function 
will have a performance benefit over template() function due to template() 
needing the ruby stack whereas epp() is running in the java based parser (as 
far as I have understood this).

> 
> Best
> - henrik
> 
> -- 
> 
> Visit my Blog "Puppet on the Edge"
> http://puppet-on-the-edge.blogspot.se/
> 
> -- 
> 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/n8vjpn%244u0%241%40ger.gmane.org.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/F7162FAD-4521-4CAF-AEA3-B39F87AA4EAD%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet-dev] Puppet 4: defined resource types and epp template

2016-01-31 Thread Martin Alfke
Hi,

I recently had an issue with epp template within a defined resource type.
Let’s assume the following code snippets:

# modules/test/manifests/init.pp
class test {
  ::test::files { 'test':
param1 => 'value',
  }
}

# modules/test/manifests/files.pp
define test::files (
  $param1 = '',
){
  file { "/tmp/${title}":
ensure  => file,
content => epp('test/files.epp'),
  }
}

# modules/test/templates/files.epp
<%= $param1 %>

The parameter Param1 will not get the data provided within define declaration.

Is this desired behaviour?
Should I open a bug?
Is this a known bug?

When passing the param1 data via hash to epp function, data will get added to 
the template.

Best,
Martin

-- 
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/1672269B-ADC4-4CFB-9D82-331FEC337F24%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] EPP templates and ruby code

2015-09-11 Thread Martin Alfke
Hi Michael,

On 10 Sep 2015, at 17:29, Michael Smith <michael.sm...@puppetlabs.com> wrote:

> Looking at the examples for the 'each' function 
> (https://docs.puppetlabs.com/references/latest/function.html#each) you can 
> replace 'times' with 'each' and I think it'll work.

each can be used on arrays. In my case the variable is an integer.
I want to print stuff $i times into the final file.

> 
> On Sep 10, 2015, at 4:34 AM, Martin Alfke <tux...@gmail.com> wrote:
> 
>> Hi,
>> 
>> is there a way to iterate with the ruby .times function inside an EPP 
>> template?
>> 
>> e.g.
>> <% $i.times |$x| { -%>
>> i = <%= $x +1 %>
>> <% } -%>
>> The code above seems to need a puppet4 function with name “times”.
>> Result:
>> Error: Evaluation Error: Unknown function: 'times'.
>> 
>> When changing to ruby code style another error occurs:
>> <% $i.times do |$x| -%>
>> i = <%= $x +1 %>
>> <% end -%>
>> Error: Evaluation Error: Error while evaluating a Function Call, epp(): 
>> Invalid EPP: Syntax error at ‘|'
>> 
>> thanks,
>> Martin
>> 
>> -- 
>> 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/4F22DF3E-4CD3-410E-B602-BD5B94CE089A%40gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/3B71678C-05FD-4E4B-B608-EC4A769A2CDB%40puppetlabs.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/238A23C7-A1D5-4E09-830E-A4F49142E43F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] EPP templates and ruby code

2015-09-11 Thread Martin Alfke
I played around a little bit with the solution mentioned by Michael:

one can use .each on an integer in a template
this results in the same behaviour of .times in ruby.


On 11 Sep 2015, at 11:31, Erik Dalén <erik.gustav.da...@gmail.com> wrote:

> You use the range function from stdlib to create an array. For example: 
> range(1,5).each |$x| {notice($x)}
> 
> On Fri, 11 Sep 2015 at 10:41 Martin Alfke <tux...@gmail.com> wrote:
> Hi Michael,
> 
> On 10 Sep 2015, at 17:29, Michael Smith <michael.sm...@puppetlabs.com> wrote:
> 
> > Looking at the examples for the 'each' function 
> > (https://docs.puppetlabs.com/references/latest/function.html#each) you can 
> > replace 'times' with 'each' and I think it'll work.
> 
> each can be used on arrays. In my case the variable is an integer.
> I want to print stuff $i times into the final file.
> 
> >
> > On Sep 10, 2015, at 4:34 AM, Martin Alfke <tux...@gmail.com> wrote:
> >
> >> Hi,
> >>
> >> is there a way to iterate with the ruby .times function inside an EPP 
> >> template?
> >>
> >> e.g.
> >> <% $i.times |$x| { -%>
> >> i = <%= $x +1 %>
> >> <% } -%>
> >> The code above seems to need a puppet4 function with name “times”.
> >> Result:
> >> Error: Evaluation Error: Unknown function: 'times'.
> >>
> >> When changing to ruby code style another error occurs:
> >> <% $i.times do |$x| -%>
> >> i = <%= $x +1 %>
> >> <% end -%>
> >> Error: Evaluation Error: Error while evaluating a Function Call, epp(): 
> >> Invalid EPP: Syntax error at ‘|'
> >>
> >> thanks,
> >> Martin
> >>
> >> --
> >> 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/4F22DF3E-4CD3-410E-B602-BD5B94CE089A%40gmail.com.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > 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/3B71678C-05FD-4E4B-B608-EC4A769A2CDB%40puppetlabs.com.
> > For more options, visit https://groups.google.com/d/optout.
> 
> --
> 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/238A23C7-A1D5-4E09-830E-A4F49142E43F%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> 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/CAAAzDLc5utqECijD-Zd%2BAUVTbbHC61hxuO%2BxNNT2ovmbzHApuw%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 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/336732C8-90EB-45E9-BD20-B34B0B4E1537%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet-dev] EPP templates and ruby code

2015-09-10 Thread Martin Alfke
Hi,

is there a way to iterate with the ruby .times function inside an EPP template?

e.g.
<% $i.times |$x| { -%>
 i = <%= $x +1 %>
<% } -%>
The code above seems to need a puppet4 function with name “times”.
Result:
Error: Evaluation Error: Unknown function: 'times'.

When changing to ruby code style another error occurs:
<% $i.times do |$x| -%>
 i = <%= $x +1 %>
<% end -%>
Error: Evaluation Error: Error while evaluating a Function Call, epp(): Invalid 
EPP: Syntax error at ‘|'

thanks,
Martin

-- 
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/4F22DF3E-4CD3-410E-B602-BD5B94CE089A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Puppet 4 functions - argument count not working?

2015-09-02 Thread Martin Alfke
Hi Thomas,

many thanks for pointing me to the documentation with the updates.
Your proposed code is exactly what I am looking for.

I really like Puppet 4 Functions!!

Best,
Martin

On 01 Sep 2015, at 14:33, Thomas Hallgren <thomas.hallg...@puppetlabs.com> 
wrote:

> A correction to my last reply. You must use Pattern, not Regexp (a Regexp is 
> for regexp instances whereas a Pattern matches strings).
> 
> - thomas
> 
> 
> On 2015-09-01 14:28, Thomas Hallgren wrote:
>> On 2015-09-01 13:27, Martin Alfke wrote:
>>> Hi Thomas,
>>> On 01 Sep 2015, at 09:59, Thomas Hallgren 
>>> <thomas.hallg...@puppetlabs.com>
>>>  wrote:
>>> 
>>> 
>>>> Hi Martin,
>>>> 
>>>> The function API has evolved slightly since the blog entry that you're 
>>>> referring to was written. The arg_count was removed since it was redundant 
>>>> and confusing after we introduced the 'optional_param' and 
>>>> 'repeated_param'. You can find the documentation for Puppet 4.2 functions 
>>>> here:
>>>> 
>>>> 
>>>> https://docs.puppetlabs.com/references/4.2.latest/developer/Puppet/Functions.html
>>> Many thanks for pointing to the new updated documentation.
>>> 
>>> My idea is to create a functions which has 3 use cases:
>>> - no parameter: return hostname of puppet master
>>> - ip as parameter: return DNS resolved name
>>> - hostname/fqdn as parameter: return IP address from DNS
>>> 
>>> How to check for explizit “no parameter”?
>>> 
>> Create two dispatch entries. One that require a parameter and one where no 
>> parameter is declared. The one without a parameter will be used when no 
>> argument is given. In this scenario, the check for ip or hostname must be 
>> done in the method targeted by the dispatch with one parameter.
>> 
>> Alternatively, you could use three dispatch entries. One without a parameter 
>> (as before) and then two with parameters using mutually exclusive regular 
>> expression types. One matching the IP and another matching hostname/fdqn. 
>> Something like this:
>> 
>>   dispatch :no_param do
>>   end
>> 
>>   dispatch :ip_param do
>>  param 'Regexp[/^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$/]', :ip 
>>   end
>> 
>>   dispatch :fqdn_param do
>>  param 'Regexp[/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/]', fdqn 
>>   end
>> 
>>   def no_param
>>  return puppet master hostname
>>   def
>> 
>>   def ip_param(ip)
>>  ...
>>   end
>> 
>>   def fqdn_param(ip)
>>  ...
>>   end
>> 
>> - thomas
>> 
>> 
>> - thomas
>> 
> 
> 
> -- 
> 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/55E59B25.7030604%40puppetlabs.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/81C3FA66-415A-4BC3-A6C0-DEFC2C5D3692%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Puppet 4 functions - argument count not working?

2015-09-01 Thread Martin Alfke
Hi Thomas,
On 01 Sep 2015, at 09:59, Thomas Hallgren <thomas.hallg...@puppetlabs.com> 
wrote:

> Hi Martin,
> 
> The function API has evolved slightly since the blog entry that you're 
> referring to was written. The arg_count was removed since it was redundant 
> and confusing after we introduced the 'optional_param' and 'repeated_param'. 
> You can find the documentation for Puppet 4.2 functions here:
> 
> https://docs.puppetlabs.com/references/4.2.latest/developer/Puppet/Functions.html

Many thanks for pointing to the new updated documentation.

My idea is to create a functions which has 3 use cases:
- no parameter: return hostname of puppet master
- ip as parameter: return DNS resolved name
- hostname/fqdn as parameter: return IP address from DNS

How to check for explizit “no parameter”?
Should I check for a dummy parameter set to type Undef?

best,
Martin

> 
> Regards,
> Thomas
> 
> 
> On 2015-08-31 17:57, Martin Alfke wrote:
>> Hi,
>> 
>> I am playing with Puppet 4 functions.
>> According to Henriks blog[1] one can provide information on number of 
>> arguments for a function using arg_count inside the dispatch.
>> 
>> The following code will throw an error:
>> 
>> # modules/utils/lib/puppet/functions/resolver.rb
>> require 'socket'
>> Puppet::Functions.create_function(:resolver) do
>>   dispatch :hostname do
>> arg_count 0, 0
>>   end
>>   def hostname()
>> Socket.gethostname
>>   end
>> end
>> 
>> Error: Evaluation Error: Error while evaluating a Function Call, undefined 
>> method `arg_count' for 
>> # at 
>> /etc/puppetlabs/code/environments/production/modules/functions/manifests/init.pp:2:15
>>  on node puppetmaster.example.net
>> 
>> I had aloof on the functions.rb file in PC1 
>> (/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/functions.rb).
>> No arg_count function is available.
>> 
>> Is arg_count a feature which will be available with an upcoming version?
>> 
>> Any other way to provide information regarding amount of arguments?
>> 
>> Best,
>> Martin
>> 
>> [1] 
>> http://puppet-on-the-edge.blogspot.de/2015/01/the-puppet-4x-function-api.html
>> 
> 
> -- 
> 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/55E55AEF.7080008%40puppetlabs.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/A24A95D0-AB1D-48D3-8F64-B9ED0EBF7590%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet-dev] Puppet 4 functions - argument count not working?

2015-08-31 Thread Martin Alfke
Hi,

I am playing with Puppet 4 functions.
According to Henriks blog[1] one can provide information on number of arguments 
for a function using arg_count inside the dispatch.

The following code will throw an error:

# modules/utils/lib/puppet/functions/resolver.rb
require 'socket'
Puppet::Functions.create_function(:resolver) do
  dispatch :hostname do
arg_count 0, 0
  end
  def hostname()
Socket.gethostname
  end
end

Error: Evaluation Error: Error while evaluating a Function Call, undefined 
method `arg_count' for # 
at 
/etc/puppetlabs/code/environments/production/modules/functions/manifests/init.pp:2:15
 on node puppetmaster.example.net

I had aloof on the functions.rb file in PC1 
(/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/functions.rb).
No arg_count function is available.

Is arg_count a feature which will be available with an upcoming version?

Any other way to provide information regarding amount of arguments?

Best,
Martin

[1] 
http://puppet-on-the-edge.blogspot.de/2015/01/the-puppet-4x-function-api.html

-- 
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/DC6ACD6A-0D23-4DD5-AAF7-EE625C7EED56%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Resolved: Re: [Puppet-dev] Puppet agent 1.2.2 + snoopy = causing ruby bug

2015-08-28 Thread Martin Alfke
Hi Trevor,

many thanks for the feedback.
I learned today that the new snoopy version fixes this issue.

Sidenote: The problem is that the platform needs PCI DSS Level 3 certification.
auditd does not fully comply to the requirements.
Neither does any of the other mentioned tools.

Best,
Martin

On 27 Aug 2015, at 14:22, Trevor Vaughan tvaug...@onyxpoint.com wrote:

 Hey Martin,
 
 You're going to run into this with anything that collects *all* commands run 
 on the system if you're using any sort of maintenance infrastructure.
 
 A couple of questions.
 
 1) Are you using Linux? If so, why won't auditd suffice?
 2) I *think* that the requirement is to capture privileged commands from 
 users, not daemons. Can you restrict snoopy to only looking at users with TTY 
 sessions or use ala pam_tty_audit?
 3) Finally, you might want to take a look at roosh, or our fork of sudosh2 
 https://github.com/onyxpoint/sudosh2
 4) If you can't do any of these, you're going to have a really hard time 
 using any system like Puppet
 
 Good luck,
 
 Trevor
 
 On Thu, Aug 27, 2015 at 5:04 AM, Martin Alfke tux...@gmail.com wrote:
 Hi,
 
 we encounter a problem with  puppet agent and snoopy installed and activated.
 Snoopy is required for PCI DSS compliance.
 
 
 apt-cache show snoopy
 Package: snoopy
 Version: 1.8.0-5
 Installed-Size: 24
 Maintainer: Zed Pobre z...@debian.org
 Architecture: amd64
 Depends: libc6 (= 2.2.5), debconf (= 0.5) | debconf-2.0
 Description-en: execve() wrapper and logger
  snoopy is merely a shared library that is used as a wrapper
  to the execve() function provided by libc as to log every call
  to syslog (authpriv).  system administrators may find snoopy
  useful in tasks such as light/heavy system monitoring, tracking other
  administrator's actions as well as getting a good 'feel' of
  what's going on in the system (for example apache running cgi
  scripts).
 Homepage: http://sourceforge.net/projects/snoopylogger/
 
 
 
 /opt/puppetlabs/bin/puppet agent --test --server master.example.net
 Info: Retrieving pluginfacts
 Info: Retrieving plugin
 Info: Caching catalog for master.example.net
 Info: Applying configuration version '1440665887'
 Notice: Welcone to master.example.net
 Notice: /Stage[main]/Main/Node[default]/Notify[Wemlcone to 
 master.example.net]/message: defined 'message' as 'Wemlcone to 
 master.example.net'
 Notice: Applied catalog in 0.02 seconds
 [ASYNC BUG] consume_communication_pipe: read
 
 EBADF
 
 ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]
 
 [NOTE]
 You may have encountered a bug in the Ruby interpreter or extension libraries.
 Bug reports are welcome.
 For details: http://www.ruby-lang.org/bugreport.html
 
 Aborted
 
 The Ruby error varies. Sometimes it is rb_thread_wakeup timer_thread instead 
 of consume_communication_pipe
 
 How to have snoopy and Puppet coexisting?
 
 Best,
 Martin
 
 --
 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/A32579C0-8036-4637-8706-239CA74F93CF%40gmail.com.
 For more options, visit https://groups.google.com/d/optout.
 
 
 
 -- 
 Trevor Vaughan
 Vice President, Onyx Point, Inc
 (410) 541-6699
 
 -- 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%2BFoVVmwx13A0kMW%2BMnjLQsqAqxWMQn3Y2eMbgRqMnVyohnw%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 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/4C8EED69-B8F9-4BBE-B5DE-C7A330C151F6%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Resolved: Re: [Puppet-dev] Puppet agent 1.2.2 + snoopy = causing ruby bug

2015-08-28 Thread Martin Alfke
Hi,

I have asked the guys around here: within this project they decided to go for 
snoopy due to much easier installation (add a library to ld_preload).
They require to have all exec's logged (either from an application or a user).

I do not believe that something is wrong with auditd.
it is only this specific project which prefers snoopy over auditd.

Best,
Martin


On 28 Aug 2015, at 14:24, Mike Hendon m...@samknows.com wrote:

 The requirements for auditing (Section 10) haven't changed from when this was 
 published:
 http://blog.ptsecurity.com/2010/11/requirement-10-track-and-monitor-all.html
 
 On Friday, 28 August 2015 11:30:27 UTC+1, Trevor Vaughan wrote:
 Interesting! What in, particular, is the issue? It would seem like this is 
 something worth reporting to the auditd folks if it can't meet the 
 requirements properly.
 
 On Fri, Aug 28, 2015 at 3:07 AM, Martin Alfke tux...@gmail.com wrote:
 Hi Trevor,
 
 many thanks for the feedback.
 I learned today that the new snoopy version fixes this issue.
 
 Sidenote: The problem is that the platform needs PCI DSS Level 3 
 certification.
 auditd does not fully comply to the requirements.
 Neither does any of the other mentioned tools.
 
 Best,
 Martin
 
 On 27 Aug 2015, at 14:22, Trevor Vaughan tvau...@onyxpoint.com wrote:
 
  Hey Martin,
 
  You're going to run into this with anything that collects *all* commands 
  run on the system if you're using any sort of maintenance infrastructure.
 
  A couple of questions.
 
  1) Are you using Linux? If so, why won't auditd suffice?
  2) I *think* that the requirement is to capture privileged commands from 
  users, not daemons. Can you restrict snoopy to only looking at users with 
  TTY sessions or use ala pam_tty_audit?
  3) Finally, you might want to take a look at roosh, or our fork of sudosh2 
  https://github.com/onyxpoint/sudosh2
  4) If you can't do any of these, you're going to have a really hard time 
  using any system like Puppet
 
  Good luck,
 
  Trevor
 
  On Thu, Aug 27, 2015 at 5:04 AM, Martin Alfke tux...@gmail.com wrote:
  Hi,
 
  we encounter a problem with  puppet agent and snoopy installed and 
  activated.
  Snoopy is required for PCI DSS compliance.
 
 
  apt-cache show snoopy
  Package: snoopy
  Version: 1.8.0-5
  Installed-Size: 24
  Maintainer: Zed Pobre z...@debian.org
  Architecture: amd64
  Depends: libc6 (= 2.2.5), debconf (= 0.5) | debconf-2.0
  Description-en: execve() wrapper and logger
   snoopy is merely a shared library that is used as a wrapper
   to the execve() function provided by libc as to log every call
   to syslog (authpriv).  system administrators may find snoopy
   useful in tasks such as light/heavy system monitoring, tracking other
   administrator's actions as well as getting a good 'feel' of
   what's going on in the system (for example apache running cgi
   scripts).
  Homepage: http://sourceforge.net/projects/snoopylogger/
 
 
 
  /opt/puppetlabs/bin/puppet agent --test --server master.example.net
  Info: Retrieving pluginfacts
  Info: Retrieving plugin
  Info: Caching catalog for master.example.net
  Info: Applying configuration version '1440665887'
  Notice: Welcone to master.example.net
  Notice: /Stage[main]/Main/Node[default]/Notify[Wemlcone to 
  master.example.net]/message: defined 'message' as 'Wemlcone to 
  master.example.net'
  Notice: Applied catalog in 0.02 seconds
  [ASYNC BUG] consume_communication_pipe: read
 
  EBADF
 
  ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]
 
  [NOTE]
  You may have encountered a bug in the Ruby interpreter or extension 
  libraries.
  Bug reports are welcome.
  For details: http://www.ruby-lang.org/bugreport.html
 
  Aborted
 
  The Ruby error varies. Sometimes it is rb_thread_wakeup timer_thread 
  instead of consume_communication_pipe
 
  How to have snoopy and Puppet coexisting?
 
  Best,
  Martin
 
  --
  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 view this discussion on the web visit 
  https://groups.google.com/d/msgid/puppet-dev/A32579C0-8036-4637-8706-239CA74F93CF%40gmail.com.
  For more options, visit https://groups.google.com/d/optout.
 
 
 
  --
  Trevor Vaughan
  Vice President, Onyx Point, Inc
  (410) 541-6699
 
  -- 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+...@googlegroups.com.
  To view this discussion on the web visit 
  https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoVVmwx13A0kMW%2BMnjLQsqAqxWMQn3Y2eMbgRqMnVyohnw%40mail.gmail.com.
  For more options, visit https://groups.google.com/d/optout.
 
 --
 You received this message because you are subscribed

[Puppet-dev] Puppet agent 1.2.2 + snoopy = causing ruby bug

2015-08-27 Thread Martin Alfke
Hi,

we encounter a problem with  puppet agent and snoopy installed and activated.
Snoopy is required for PCI DSS compliance.


apt-cache show snoopy
Package: snoopy
Version: 1.8.0-5
Installed-Size: 24
Maintainer: Zed Pobre z...@debian.org
Architecture: amd64
Depends: libc6 (= 2.2.5), debconf (= 0.5) | debconf-2.0
Description-en: execve() wrapper and logger
 snoopy is merely a shared library that is used as a wrapper
 to the execve() function provided by libc as to log every call
 to syslog (authpriv).  system administrators may find snoopy
 useful in tasks such as light/heavy system monitoring, tracking other
 administrator's actions as well as getting a good 'feel' of
 what's going on in the system (for example apache running cgi
 scripts).
Homepage: http://sourceforge.net/projects/snoopylogger/



/opt/puppetlabs/bin/puppet agent --test --server master.example.net
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for master.example.net
Info: Applying configuration version '1440665887'
Notice: Welcone to master.example.net
Notice: /Stage[main]/Main/Node[default]/Notify[Wemlcone to 
master.example.net]/message: defined 'message' as 'Wemlcone to 
master.example.net'
Notice: Applied catalog in 0.02 seconds
[ASYNC BUG] consume_communication_pipe: read

EBADF

ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted

The Ruby error varies. Sometimes it is rb_thread_wakeup timer_thread instead of 
consume_communication_pipe

How to have snoopy and Puppet coexisting?

Best,
Martin

-- 
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/A32579C0-8036-4637-8706-239CA74F93CF%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Re: Using data types on hashes

2015-08-27 Thread Martin Alfke

On 27 Aug 2015, at 02:08, Henrik Lindberg henrik.lindb...@cloudsmith.com 
wrote:

 On 2015-26-08 17:56, Martin Alfke wrote:
 Hi Henrik,
 On 26 Aug 2015, at 17:49, Henrik Lindberg henrik.lindb...@cloudsmith.com 
 wrote:
 
 
 Hash[String, Struct[{ uid = Integer, home = Pattern[/^\/.*/]}]] $hash
 
 Am I missing something?
 Within the Struct I provide the key name (uid) and Type (Integer) and the 
 second key (home) with Type (Pattern).
 
 Yes, you are indeed. Your regular expression is however not correct for the 
 home directories that you have given. The regexp /^\/.*/ requires that the 
 string starts with a slash. If you change your input to say
 
 home = '/home/jones'
 
 it should work.

Ah. It does work providing correct data.
The error message if I do provide a string with missing / at start pointed me 
into wrong direction.

Many thanks for your help.
I know learned that using Struct inside has will not give a detailed output on 
a specific sub hash to be wrong.
It complains about the whole hash being wrong without details.

I am now heading for usage of keys function and check the elements of the sub 
hash inside a define.

Best,
Martin


 
 Or change the regular expression. The ^ means anchor at start of string, and 
 \/ means a slash is required, then 0 or more characters. If you accept any 
 String, simply use String. If you want to ensure that it is a valid path you 
 need a way more complex regular expression.
 
 Were you attempting to specify not allowed to start with a slash?
 If so, try Pattern[/^[^\/]+.*/]
 
 
 Within class users I could use the keys function and a define and check 
 for the data types within the define.
 But I thought that the mentioned approach is valid (at least I haven’t 
 found a hint that my approach is not valid).
 
 
 Your approach is valid, you just got tripped up by Integer values not 
 matching with a Pattern.
 
 Good to know…
 
 Sorry that I went of on a tangent after misreading the error message.
 Hope the suggestions above will work out better for you.
 
 Regards
 Henrik
 
 -- 
 
 Visit my Blog Puppet on the Edge
 http://puppet-on-the-edge.blogspot.se/
 
 -- 
 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/mrlkee%244st%241%40ger.gmane.org.
 For more options, visit https://groups.google.com/d/optout.

-- 
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/F38C6FA2-79D5-4DAF-AB8D-C9B8CF1EFE3E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Using data types on hashes

2015-08-26 Thread Martin Alfke
Hi Henrik,
On 26 Aug 2015, at 17:49, Henrik Lindberg henrik.lindb...@cloudsmith.com 
wrote:

 On 2015-24-08 14:38, Martin Alfke wrote:
 Hi,
 
 I am playing around with the Puppet 4 Type system and nested hashes.
 Is it possible to use the Type system on a hash and check sub hashes as 
 Struct?
 
 Yes, certainly.
 
 # nested hashes
 $hash = {
   ‘ben’ = {
 uid = 2204,
 home = ‘/home/ben’,
   },
   ‘jones’ = {
 uid = 2205,
 home = ‘home/jones’,
   }
 }
 
 # class definition
 class users (
   Hash[String, Struct[{ uid = Integer, home = Pattern[/^\/.*/]}]] $hash,
 ){
 …
 }
 …

 That is because you cannot match integer values (such as 2204) with a Pattern 
 (it only matches strings).

??

Hash[String, Struct[{ uid = Integer, home = Pattern[/^\/.*/]}]] $hash

Am I missing something?
Within the Struct I provide the key name (uid) and Type (Integer) and the 
second key (home) with Type (Pattern).

 
 Within class users I could use the keys function and a define and check for 
 the data types within the define.
 But I thought that the mentioned approach is valid (at least I haven’t found 
 a hint that my approach is not valid).
 
 
 Your approach is valid, you just got tripped up by Integer values not 
 matching with a Pattern.

Good to know…

Many thanks,
Martin

-- 
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/A2EA5C24-EA56-4B60-BFD7-EAF440B2FC6A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet-dev] Using data types on hashes

2015-08-24 Thread Martin Alfke
Hi,

I am playing around with the Puppet 4 Type system and nested hashes.
Is it possible to use the Type system on a hash and check sub hashes as Struct?

# nested hashes
$hash = {
  ‘ben’ = {
uid = 2204,
home = ‘/home/ben’,
  },
  ‘jones’ = {
uid = 2205,
home = ‘home/jones’,
  }
}

# class definition
class users (
  Hash[String, Struct[{ uid = Integer, home = Pattern[/^\/.*/]}]] $hash,  
){
…
}

# class declaration
class { ‘users’:
  hash = $hash,
}

In this case I receive the following error:
Error: Expected parameter 'hash' of 'Class[Users]' to have type Hash[String, 
Struct[{'uid'=Integer, 'home'=Pattern[/^\/.*/]}]], got 
Struct[{'ben'=Struct[{'uid'=Integer, 'home'=String}], 
'jones'=Struct[{'uid'=Integer, 'home'=String}]}] at /root/hash.pp:16 on node 
puppetmaster.example.net

When using the Struct one needs to know the keys. But the keys may be any 
arbitrary value.

Within class users I could use the keys function and a define and check for the 
data types within the define.
But I thought that the mentioned approach is valid (at least I haven’t found a 
hint that my approach is not valid).

Any help/feedback appreciated,

best,
Martin

-- 
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/9F591C12-8459-4144-9C9D-80EB32616E74%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Accessing variables from templates in wrapped defines

2015-08-12 Thread Martin Alfke
Hi Ryan,
On 11 Aug 2015, at 19:22, Ryan Whitehurst r...@puppetlabs.com wrote:

 
 Martin Alfke writes:
 
 How can I access the variable from the first define? I can change the second 
 define to have another parameter so it knows about the template variable. Is 
 there any other solution available?
 It's not exactly the same, but this works now, using EPP instead of ERB: 

Many thanks for pointing to EPP.
We can not yet switch to EPP.
We want our example42 modules to be compatible with puppet 3 and 4 and will do 
a version bump very soon offering new language features..

Besides this:
when I saw this construct (accessing variables from another module(!! sic)) my 
in-brain puppet parser already went nuts.
I decided to add the variable as parameter which makes it now far more clear 
where the value is taken from.

Best,
Martin


 scope_epp/manifests/define1.pp
 
 ~~~
 define scope_epp::define1 ($var = 'test') {  scope_epp::define2 { $name:
 epp = 'scope_epp/test.epp',  } }
 ~~~  scope_epp/manifests/define2.pp
 
 ~~~
 define scope_epp::define2 ($epp) {  notify { $name:message = epp($epp, 
 {'name' = $name}),  } }
 ~~~  scope_epp/templates/test.epp
 
 ~~~ %= Scope_epp::Define1[$name]['var'] % ~~~
 
 Then running:
 
 % /opt/puppetlabs/bin/puppet apply -e 'scope_epp::define1 { thing: }' 
 --modulepath=.  Notice: Compiled catalog for localhost in environment 
 production in 0.64 seconds Notice: test Notice: 
 /Stage[main]/Main/Scope_epp::Define1[thing]/Scope_epp::Define2[thing]/Notify[thing]/message:
  defined 'message' as 'test'  You can't use that to access variables from the 
 defined type, but you can access parameters. Now whether you should do that 
 or not…

I prefer to not do that.
;-)

 
 -- 
 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/87mvxxspjc.fsf%40rafiki.corp.puppetlabs.net.
 For more options, visit https://groups.google.com/d/optout.

-- 
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/FADBAE25-E21A-4E0F-A0F8-553C070FD1D8%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet-dev] Accessing variables from templates in wrapped defines

2015-08-11 Thread Martin Alfke
Hi,

I have an issue with templates and variable lookup when used in wrapped defines 
- which was working in older puppet versions (maybe due to the dynamic variable 
lookup):

e.g. The following code:

The first define setting a local variable and calling a second define with a 
parameter:

cat define1/manifests/init.pp
define define1 {
  $var = 'test'
  define2 { “define1_${name}:
template = 'define1/test.erb',
  }
}

The second define using a resource type and makes use of the parameter:

cat define2/manifests/init.pp
define define2 ($template) {
  notify { define2_${name}:
message = template($template),
  }
}

The template which should be used in the second define (handed over as 
parameter):

cat define1/templates/test.erb
test = %= @var %

The result:

puppet apply -e 'define1 { 'test': }'
Notice: Compiled catalog for puppetmaster.example.net in environment production 
in 0.33 seconds
Notice: test =

Notice: 
/Stage[main]/Main/Define1[test]/Define2[define1_test]/Notify[define2_define1_test]/message:
 defined 'message' as 'test =
'
Notice: Applied catalog in 0.03 seconds


If the first define would be a class then I could do a scope.lookupvar.
If I change the template to do scope.lookupvar I receive the following:

puppet apply -e 'define1 { 'test': }'
Warning: Scope(Define2[define1_test]): Could not look up qualified variable 
'define1::var'; class define1 could not be found
Notice: Compiled catalog for puppetmaster.example.net in environment production 
in 0.32 seconds
Notice: test =

Notice: 
/Stage[main]/Main/Define1[test]/Define2[define1_test]/Notify[define2_define1_test]/message:
 defined 'message' as 'test =
'
Notice: Applied catalog in 0.03 seconds

How can I access the variable from the first define?
I can change the second define to have another parameter so it knows about the 
template variable.
Is there any other solution available?

Thanks,
Martin

-- 
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/BB42D49A-3D69-41A3-8197-18B2E182DD4B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Puppet 5 changes

2015-03-05 Thread Martin Alfke
Hi Eric,

On 06 Mar 2015, at 05:30, Eric Sorenson eric.soren...@puppetlabs.com wrote:

 […]

 Similarly, on the network stack, we want to consolidate on the 
 jetty/puppet-server/jruby stack as the single way to run Puppet masters, so 
 the built-in webrick support and Rack support layer will ride off into the 
 sunset.  The webrick one shouldn't be too controversial: it causes a lot of 
 people to start off on a bad path because it tips over so easily. My 
 hypothesis is if you're just dipping a toe in the water to try out Puppet, 
 running standalone with `puppet apply` is probably going to work better than 
 a webrick agent/server setup. 
 
Will we still have the possibility of spinning up a second master process on an 
existing puppet master?
https://docs.puppetlabs.com/guides/install_puppet/upgrading.html#option-2-run-two-instances-of-puppet-master-at-once

Many thanks,


Martin

-- 
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/6109BD18-3FE9-4EA5-A6D4-DDE9E700A9A0%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Puppet provider - xml parsing - help needed

2015-02-26 Thread Martin Alfke
Hi Raphael,

can the Augeas provider “translate” from xml into Puppet DSL and vice versa?
That would be nice.

Best,
Martin


On 26 Feb 2015, at 00:45, Raphaël Pinson raphael.pin...@camptocamp.com wrote:

 Hi Martin,
 
 
 Have you considered using an Augeas provider here, using the Xml lens?
 
 
 Cheers,
 
 Raphaël
 
 
 
 On Wednesday, February 25, 2015 at 6:18:02 PM UTC+1, Martin Alfke wrote:
 Hi, 
 
 I am stuck at a puppet provider where I need to read data from xml. 
 
 Data which needs to get parsed: 
 
 AR 
   AR_ID![CDATA[8]]/AR_ID 
   IP![CDATA[172.16.100.208]]/IP 
   MAC![CDATA[02:00:ac:10:64:d0]]/MAC 
   SIZE![CDATA[1]]/SIZE 
   TYPE![CDATA[IP4]]/TYPE 
   USED_LEASES0/USED_LEASES 
   LEASES/ 
 /AR 
 AR 
   AR_ID![CDATA[9]]/AR_ID 
   IP![CDATA[172.16.100.209]]/IP 
   MAC![CDATA[02:00:ac:10:64:d1]]/MAC 
   SIZE![CDATA[1]]/SIZE 
   TYPE![CDATA[IP4]]/TYPE 
   USED_LEASES0/USED_LEASES 
   LEASES/ 
 /AR 
 
 
 Expected result: 
 
 :addressrange = 
   { ‘1' = 
 { ‘ip' = ‘172.16.100.208’, ‘mac' = ’02:00:ac:10:64:d0’ }, 
  ‘2' = 
 { ‘ip' =  ‘172.16.100.209’, ‘mac' = ’02:00:ac:10:64:d1’ } 
   } 
 
 
 Actual code (Note: I was never good at coding an will never be): 
 
 vnets.collect do |vnet| 
   new( 
 :addressrange = Hash[vnet.xpath('./AR_POOL/AR/AR_ID').collect { |ar| 
 [ar.text, ar.xpath('..').collect { |singlear| singlear.xpath('./*').collect { 
 |arvalue| {arvalue.name, arvalue.text} } } ] } ] 
   ) 
 end 
 
 
 But this code return: 
 :addressrange= 
  {9= 
[[{AR_ID=9}, 
  {IP=172.16.100.209}, 
  {MAC=02:00:ac:10:64:d1}, 
  {SIZE=1}, 
  {TYPE=IP4}]], 
   8= 
[[{AR_ID=8}, 
  {IP=172.16.100.208}, 
  {MAC=02:00:ac:10:64:d0}, 
  {SIZE=1}, 
  {TYPE=IP4}]], 
 
 What would be proper code to build the hash as expected? 
 
 Thanks, 
 
 Martin 
 
 
 -- 
 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/81914d3c-aeab-4991-80ca-4a4544e2f3cb%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 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/40AF60B2-C149-487F-AC52-1567D2BFADDA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet-dev] Puppet provider - xml parsing - help needed

2015-02-25 Thread Martin Alfke
Hi,

I am stuck at a puppet provider where I need to read data from xml.

Data which needs to get parsed:

AR
  AR_ID![CDATA[8]]/AR_ID
  IP![CDATA[172.16.100.208]]/IP
  MAC![CDATA[02:00:ac:10:64:d0]]/MAC
  SIZE![CDATA[1]]/SIZE
  TYPE![CDATA[IP4]]/TYPE
  USED_LEASES0/USED_LEASES
  LEASES/
/AR
AR
  AR_ID![CDATA[9]]/AR_ID
  IP![CDATA[172.16.100.209]]/IP
  MAC![CDATA[02:00:ac:10:64:d1]]/MAC
  SIZE![CDATA[1]]/SIZE
  TYPE![CDATA[IP4]]/TYPE
  USED_LEASES0/USED_LEASES
  LEASES/
/AR


Expected result:

:addressrange = 
  { ‘1' =
{ ‘ip' = ‘172.16.100.208’, ‘mac' = ’02:00:ac:10:64:d0’ },
 ‘2' = 
{ ‘ip' =  ‘172.16.100.209’, ‘mac' = ’02:00:ac:10:64:d1’ }
  }


Actual code (Note: I was never good at coding an will never be):

vnets.collect do |vnet|
  new(
:addressrange = Hash[vnet.xpath('./AR_POOL/AR/AR_ID').collect { |ar| 
[ar.text, ar.xpath('..').collect { |singlear| singlear.xpath('./*').collect { 
|arvalue| {arvalue.name, arvalue.text} } } ] } ]
  )
end


But this code return:
:addressrange=
 {9=
   [[{AR_ID=9},
 {IP=172.16.100.209},
 {MAC=02:00:ac:10:64:d1},
 {SIZE=1},
 {TYPE=IP4}]],
  8=
   [[{AR_ID=8},
 {IP=172.16.100.208},
 {MAC=02:00:ac:10:64:d0},
 {SIZE=1},
 {TYPE=IP4}]],

What would be proper code to build the hash as expected?

Thanks,

Martin

-- 
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/40FA8BCE-74C4-478C-9648-8FE26365BFF9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Solved Re: [Puppet-dev] Re: Puppet provider - xml parsing - help needed

2015-02-25 Thread Martin Alfke
Many thanks for the feedback.
Structure and Data can vary (depending on functionality - in this case ipv4 vs. 
ipv6).

I was only doing one thing wrong in my code (one level of indirection too much)
The following solution works:

:addressrange= Hash[vnet.xpath('./AR_POOL/AR/AR_ID').collect { |ar| 
[ar.text, Hash[ar.xpath('../*').collect { |singlear| [singlear.name.downcase, 
singlear.text.downcase] } ] ] } ]

I know receive all data as nested hash in the address range attribute.

Best,

Martin

On 25 Feb 2015, at 20:18, Thomas Hallgren thomas.hallg...@puppetlabs.com 
wrote:

 I would take a look at nokogiri. It's an XML/HTML parser for Ruby. Some 
 helpful hints 
 here:http://stackoverflow.com/questions/11198239/parsing-xml-with-ruby
 
 - thomas
 
 On 2015-02-25 19:43, Henrik Lindberg wrote:
 On 2015-25-02 18:17, Martin Alfke wrote:
 Hi,
 
 I am stuck at a puppet provider where I need to read data from xml.
 
 Data which needs to get parsed:
 
 AR
   AR_ID![CDATA[8]]/AR_ID
   IP![CDATA[172.16.100.208]]/IP
 MAC![CDATA[02:00:ac:10:64:d0]]/MAC
   SIZE![CDATA[1]]/SIZE
   TYPE![CDATA[IP4]]/TYPE
   USED_LEASES0/USED_LEASES
   LEASES/
 /AR
 AR
   AR_ID![CDATA[9]]/AR_ID
   IP![CDATA[172.16.100.209]]/IP
 MAC![CDATA[02:00:ac:10:64:d1]]/MAC
   SIZE![CDATA[1]]/SIZE
   TYPE![CDATA[IP4]]/TYPE
   USED_LEASES0/USED_LEASES
   LEASES/
 /AR
 
 
 Expected result:
 
 :addressrange =
   { ‘1' =
 { ‘ip' = ‘172.16.100.208’, ‘mac' = ’02:00:ac:10:64:d0’ },
  ‘2' =
 { ‘ip' =  ‘172.16.100.209’, ‘mac' = ’02:00:ac:10:64:d1’ }
   }
 
 
 
 
 What would be proper code to build the hash as expected?
 
 
 That is not easy. Is the structure static and only varying where the actual 
 data is? If so, you could hard code a solution. If you expect there to be 
 variability in the tags/layout you should consider using an XML parser and 
 get the data from it.
 
 To do this with regular expressions you need to match the part:
 
   IP![CDATA[172.16.100.209]]/IP
   MAC![CDATA[02:00:ac:10:64:d1]]/MAC
 
 with something like this (untested):
 
 /IP!\[CDATA|[(.*)\]]/IP.*MAC!\[CDATA\[(.*)\]]/MAC/
 
 Then apply that to iterate over matches - you need to do matching that
 accepts newlines as a match for . etc.
 
 Play with it in Rubular (online ruby regexp tester) until you get it right.
 
 - henrik
 
 -- 
 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/54EE2012.8020206%40puppetlabs.com.
 For more options, visit https://groups.google.com/d/optout.

-- 
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/0C155D6E-1F24-4B82-B2D8-BA2A93801A9C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Puppet 4 delivery and upgrades

2014-11-24 Thread Martin Alfke
On Nov 24, 2014 11:33 AM, Erik Dalén erik.gustav.da...@gmail.com wrote:

 Will there be a version of this AIO package for 3.7.4 (or even 3.7.3) so
we can try out the packaging without trying out all the stuff in puppet 4.0
at the same time?

+1


 On Sat Nov 22 2014 at 11:46:16 AM Martin Alfke tux...@gmail.com wrote:


 On 21 Nov 2014, at 21:46, Eric Sorenson eric.soren...@puppetlabs.com
wrote:

 
  0 - Which platforms will get FOSS AIO packages?
 
  RHEL/Centos 5, 6, 7
  Fedora 20, 21
  Ubuntu 10.04, 12.04, 14.04
  Debian Squeeze, Wheezy
  Windows x86, x64

 OpenSuSE?
 Debian Jessie?

 
  1 - How do I manage gems with AIO ruby?
 
  Use the AIO included gem binary. ('/opt/puppet/agent/bin/gem install
somerandomgem') To make this easier, we can either fix PUP-3688 or add a
module with a minimal 'puppet_gem' provider using the AIO path.

 That would be very ugly (e.g. for installing hiera add ons).
 Why can we not adopt the behaviour of pe_gem provider?

 
  3 - Will it include puppetdb-terminus?
 
  Yes.
 Can we choose from multiple versions?
 e.g. we have new puppet and older puppet (migration process) running in
parallel and we want both masters to make use of the same puppetdb.

 
  4 - What will the release cadence look like? What if I want to manage
component upgrades on a different cadence than upstream, e.g. just facter,
or just hiera?
 
  For power users who want more control than that, we’ll have
documentation on how to roll your own. The tooling to create AIO will
itself be open-sourced so you could build a package that picks the versions
you want to include.

 +1


 --
 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/08BAFC24-F5DB-401B-99FD-046B1AAB3917%40gmail.com
.

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

 --
 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/CAAAzDLe72HCy8OBoi1s18eOb1bYOoTVE2VVL%3DhbyVY3LpCdVuA%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 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/CAH_Azc2p_3MuwcUS_zQHTA1_CVpw2r5nuVUQJ-eRjsD%2Bs2Xmzg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Puppet 4 delivery and upgrades

2014-11-22 Thread Martin Alfke

On 21 Nov 2014, at 21:46, Eric Sorenson eric.soren...@puppetlabs.com wrote:

 
 0 - Which platforms will get FOSS AIO packages?
 
 RHEL/Centos 5, 6, 7
 Fedora 20, 21
 Ubuntu 10.04, 12.04, 14.04
 Debian Squeeze, Wheezy
 Windows x86, x64

OpenSuSE?
Debian Jessie?

 
 1 - How do I manage gems with AIO ruby?
 
 Use the AIO included gem binary. ('/opt/puppet/agent/bin/gem install 
 somerandomgem') To make this easier, we can either fix PUP-3688 or add a 
 module with a minimal 'puppet_gem' provider using the AIO path.

That would be very ugly (e.g. for installing hiera add ons).
Why can we not adopt the behaviour of pe_gem provider?

 
 3 - Will it include puppetdb-terminus?
 
 Yes.
Can we choose from multiple versions?
e.g. we have new puppet and older puppet (migration process) running in 
parallel and we want both masters to make use of the same puppetdb.

 
 4 - What will the release cadence look like? What if I want to manage 
 component upgrades on a different cadence than upstream, e.g. just facter, or 
 just hiera?
 
 For power users who want more control than that, we’ll have documentation on 
 how to roll your own. The tooling to create AIO will itself be open-sourced 
 so you could build a package that picks the versions you want to include. 

+1


-- 
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/08BAFC24-F5DB-401B-99FD-046B1AAB3917%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Puppet 4 delivery and upgrades

2014-11-20 Thread Martin Alfke
+1 for RHEL/CentOS 5
and please put some love in SLES too (even though that it is only used in 
Germany).

On 20 Nov 2014, at 06:10, Leonardo Rodrigues de Mello l...@lmello.eu.org 
wrote:

 Thats cool a controlled and independent stack with all the dependencies. 
 Independent of the OS is great. Scl works only on rhel 6 and 7.
 
 Please don't forget rhel 5 packages also. I know it is outdated but it is 
 still widely used .
 
 And bundled software will need to receive security updates, ex ruby openssl, 
 etc .
 
 Best
 Lmello
 
 Best
 
 Em 19/11/2014 13:00, Matthaus Owens matth...@puppetlabs.com escreveu:
 Erik,
 The plan is to deliver the AIO package to not just platforms with
 older rubies, but to all of the deb/rpm platforms we package for
 currently.
 
 On Wed, Nov 19, 2014 at 6:02 AM, Erik Dalén erik.gustav.da...@gmail.com 
 wrote:
 
 
  On Tue Nov 18 2014 at 8:04:13 PM Eric Sorenson
  eric.soren...@puppetlabs.com wrote:
 
  Hi all, as some of you have noticed, our target date in JIRA for Puppet 4
  is not too far off now. (We just moved it out from early December to early
  January based on the remaining must-have workflow). While you can poke
  through tickets to see exactly what's going in, it might be helpful to have
  a little higher level overview of what is happening. Let me try to provide
  that as well as ask some questions of things we're not sure about.
 
  1. Ruby 1.8.7 support is going away.
 
  2. To enable #1 but still support OSes that ship with 1.8.7, we're going
  to be packaging and delivering Puppet 4 an an 'all-in-one' (AIO) package
  bundled together with
   - openssl
   - ruby
   - augeas
   - ruby-augeas
   - ruby-stomp
   - ruby-shadow
   - puppet
   - mcollective
   - facter
   - hiera
  - + misc supporting gems/libs (deep merge, yaml, etc)
  (Question: are there other *agent side* components you feel are essential
  to the functioning of the puppet stack?)
 
 
  puppetdb-terminus - required for masterless setups.
 
  Btw, is there anything stopping you from delivering this AIO package to
  newer systems as well? For example Ubuntu Trusty has ruby 1.9.3 by default
  but also has ruby 2.0.0. But an AIO package with ruby 2.1.x would be a big
  speed increase compared to both those other ruby versions.
 
 
 
  3. The AIO packages will have a filesystem layout that installs the
  programs into /opt/puppetlabs/agent and the configs into
  /etc/puppetlabs/agent ; the packages will be a different basename than
  puppet ('puppet-agent') so won't install automatically on an upgrade, but
  *will* obsolete the puppet packages if you decide to install them. AIO
  packages will be available from the Nightly repos Real Soon Now[tm] and I
  expect Melissa or Haus will update when they're up so everyone can poke at
  'em.
 
  4. We are planning to break cross-major-version compatibility over the
  network. The amount of change we need to support in order to keep moving
  components to the Puppet Server and out of Ruby is the main driver for 
  this,
  but generally, if you can't break compatibility on a major version
  boundary... when CAN you? See PUP-3641 for the overview of that work.
 
  5. The upgrade process would be as Chris described above, where you'd set
  up a new server running puppet 4 (hey it's an opportunity to move your
  puppetmasters to EL 7!) and point the new agents at it, leave the old ones
  running until their agents are drained.
  Question: What can/should we do to make that kind of transition go more
  smoothly? (One idea that just struck me is to have the puppet4 agent have a
  different default value for $server than 'puppet', so it wouldn't need
  post-install configuration to point at the new server)
 
  6. We're going to stop providing the puppetmaster/puppet-server
  (passenger) packaging in favour of the puppetserver packages. There will
  still be rack/passenger support in Puppet 4, but not in Puppet 5.
 
  7. Umm.. I think that's all.
 
 
  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 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/FF17DBFD-7DB1-4241-AC3C-EE9520A2E1C9%40puppetlabs.com.
  For more options, visit https://groups.google.com/d/optout.
 
  --
  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/CAAAzDLcqbDwMZEWZrjyZRYkDLwk6cUn%3DYjFE1YyduQuHzLucRA%40mail.gmail.com.
 
  For more options, visit https://groups.google.com/d/optout.
 
 
 
 

Re: [Puppet-dev] Puppet 4 delivery and upgrades

2014-11-20 Thread Martin Alfke

On 20 Nov 2014, at 13:12, Leonardo Rodrigues de Mello l...@lmello.eu.org 
wrote:

 Breaking this on 4.0 is OK with semver . breaking it on 4.1 would be a mess.

ACK.

Question regarding package resource types using gem provider:

1. are we still able to install into system ruby using gem provider?
2. will there be an add-on to install gem add ons into puppet installation, too?

 
 Best
 Lmello
 
 Em 20/11/2014 10:08, Felix Frank felix.fr...@alumni.tu-berlin.de escreveu:
 On 11/20/2014 12:17 PM, Daniele Sluijters wrote:
  First question is, can you gracefully deprecate a line of agents, i.e.
  retain 3.x agent compatibility throughout 4.x masters, and drop it
  at 5.0.
  I shall assume that the engineering effort to go such a route would
  be a
  magnitude or two above just dropping cross-version support, so doing
  the
  hard cut is likely the right thing to do. But I will go on record
  stating that this is not the kind of decision that should be made
  lightly.
 
 
  But why not do it in Puppet 4 but do it in Puppet 5? This seems
  completely arbitrary like I would prefer if you hold off to Puppet 5,
  but what's to stop it from going I would prefer to hold off until
  Puppet 6 by the time 5 is ready to roll out?
 
  Now, that was your first question, what's the second?
 
 Granted, 5.0 is somewhat arbitrary. Not breaking 3.x support before the
 4.1 master would also go a long way, too, for example.
 
 The point is, do I need to introduce a turning point at which each of my
 agents will either
 a) talk to the obosolete 3.x master only or
 b) talk to the newly added 4.x master only
 
 With a deprecation period, I can replace the 3.x master with 4.0 after
 making sure that no major breakage follows suit, without the pressure of
 updating each last agent (or live with two sets of potentially diverging
 masters). It is only the 4.1 master that will not be viable until agents
 are upgraded.
 
 I regard this as an advantage because such minor updates are generally
 less problematic (and fear inducing to the ops team).
 
 The second question is the one Eric posed initially: Is a major version
 change an opportune time to break the network in this fashion. The
 answer to this is most definitely yes and - again - I'm not actively
 contesting the choice to do this with 4.0.
 
 Cheers,
 Felix
 
 --
 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/546DD9BB.5080901%40alumni.tu-berlin.de.
 For more options, visit https://groups.google.com/d/optout.
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet 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/CAM%3D8oN%2Bc%2BxFA%2B0W014Y7OUufEuiuxw7c2sPXQZ2aRadzf-%2BGdw%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 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/E1661A4A-8685-412E-A45C-AA013FE72A85%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Is there a way to run puppet-agent on a generic Linux OS

2014-09-29 Thread Martin Alfke
Hi,
On 29 Sep 2014, at 04:12, Alick guow@gmail.com wrote:

 
 Hi all
 
 I have a device running on Linux OS ( no RH/Debain/Unbuntu ) ,i wonder to 
 know if there is a way to port/install puppet-agent on it. 

As long as ruby is available for the OS you can install puppet also as gem.
(gem install puppet)

Depending on which Linux OS you run, you might have fewer facts available and 
maybe some types/providers will not work.
We will need more details regarding your OS for more specific details.

hth,

Martin

-- 
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/5CFD2C57-F9ED-426E-A616-0B915B104559%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet-dev] Re: pre-conf dinner and/or drinks

2014-09-19 Thread Martin Alfke
I will join after training class.
@Ben: maybe we can go there together.
 On Sep 19, 2014 3:57 PM, Ben Ford ben.f...@puppetlabs.com wrote:

 Those delivering or attending training classes won't be able to make 3pm.
 But I'll see about bringing a group a little after 4:30 if you'll still be
 around.

 On Fri, Sep 19, 2014 at 1:52 PM, Daniele Sluijters 
 daniele.sluijt...@gmail.com wrote:

 Attached an ICS for tea time. I hope it survives the time zones.

 --
 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/3cd2874b-c18a-4a24-9a35-0ae56cef4c63%40googlegroups.com
 https://groups.google.com/d/msgid/puppet-dev/3cd2874b-c18a-4a24-9a35-0ae56cef4c63%40googlegroups.com?utm_medium=emailutm_source=footer
 .

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




 --
 Ben Ford | Training Solutions Engineer
 Puppet Labs, Inc.
 926 NW 13th Ave, Suite #210
 Portland, OR 97209

 509.592.7291
 ben.f...@puppetlabs.com

  --
 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/CACkW_L4Ufn0H4Royo1mWyoHRm3L8%3DyxBQK1wOC_thbrESefykQ%40mail.gmail.com
 https://groups.google.com/d/msgid/puppet-dev/CACkW_L4Ufn0H4Royo1mWyoHRm3L8%3DyxBQK1wOC_thbrESefykQ%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 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/CAH_Azc0SyW-uJ4s4F6wkwNh2VG8H9j0W5soHwsFFuDLLgN94QA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.