Re: [Puppet Users] Puppet Language Style Guide update

2017-01-12 Thread Peter Faller
Has the Gepetto auto-formatter been updated (or will it be updated) to 
match the style guide? Or is there another way of automatically formatting 
manifests to match the style guide?

>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d36a42d7-d46e-4cc5-b198-8b7b396031e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] 2016.4.2 puppet enterprise

2017-01-12 Thread Rich Burroughs
The address Carthik mentioned was - certification at puppet dot com.

I see the messed up version where it's quoted in your reply, not sure why
that's happening :)


Rich


On Thu, Jan 12, 2017 at 11:41 AM, Ryan Vande  wrote:

> I have a case open with pearson vue over this, I don't mind paying again
> if tha'ts what it takes but I just want a bigger monitor! I'll bring mine
> from home!
>
> Anyway I will send the E-mail explaining, is this a valid E-mail address ?
>  certif...@puppet.com?
>
>
>
> On Monday, January 9, 2017 at 2:25:54 PM UTC-5, Carthik Sharma wrote:
>>
>> Hi Ryan,
>>
>> On Mon, Jan 9, 2017 at 9:40 AM, Ryan Vande  wrote:
>>
>>> I went to take the test last week, they had questions about live
>>> management. To be honest the testing center monitors were so small all of
>>> the content would not fit on the page, I spent so much time resizing
>>> windows, I ran out of time to finish the test.
>>>
>>
>> Could you please email certif...@puppet.com with the details of where
>> you took the test? Sorry to hear you had a poor experience.
>>
>>
>>>
>>> I seen what the test is composed of and went right home and started
>>> writing notes on topics I need to study up on before taking it again (Which
>>> I will refuse to take if I cant get a bigger monitor, its 2017 ! give me a
>>> monitor that fits all the content ! ).
>>>
>>> One of those topics was live management that I need to freshen up on.
>>> Not a big deal, I will go read 3.8 documents on live management.
>>>
>>
>> Here's the list of topics you are expected to know:
>> https://puppet.com/support-services/certification/professional-overview
>> 
>>
>> Live Management isn't one of the topics the latest test addresses,
>> although it was in previous (older, retired) versions of the test.
>>
>> I would really appreciate it if you could please email
>> certif...@puppet.com so we can learn more.
>>
>> Thanks!
>> Carthik.
>>
>> Manager, Training and Education
>> Puppet Inc.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/6e533d1f-f5ee-4bac-b0a2-ef3de59985da%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAGceorypXmP2rhmOwHGz%3DNUPj_MgrwnXuvJkMvodUqEL6c8oSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Open source puppet performance monitoring/tuning?

2017-01-12 Thread Garrett Honeycutt
On 1/12/17 3:46 PM, dkoleary wrote:
> I think I've taken my open source puppet server to the limits; but, I'd like 
> to be able to confirm that and find out what resources are needed.
> 
> Short version of the problem:  When we first started, puppet agent runs would 
> take 5-10 seconds.  Now, while we still have a limited number of modules, 
> we're looking at 1400+ systems under management.  Most runs still take in the 
> 5-10 second range but a growing number are taking 400+ seconds to complete.
> 
> Short version of the question:  How do I know what needs to be tuned or 
> examined?
> 
> An example:  the first paragraph of 
> https://docs.puppet.com/pe/latest/config_puppetserver.html says "Tuning JRuby 
> on Puppet server". What would be the symptom that suggests JRuby needs tuning?
> 
> An ISBN for a book would be great.  I find all sorts of books on learning 
> puppet but not too many on tuning it.
> 
> Any hints or suggestions will be greatly appreciated.
> 
> Doug O'Leary
> 

Hi Doug,

The times for agent runs typically do not correspond to any Puppet
related tuning. The places that the agent comes into contact with the
master during a puppet run, once they have received the catalog is file
serving, filebucketing changed files and sending a report.

Metrics to look for are how long does it take your puppet master to
compile a catalog and are any of your agents timing out when requesting
catalogs.

Try checking out last_run_summary.yaml for figuring out which resources
take the most time during the agent run. Typically I see poorly
configured name servers and requests outside of the network as ways in
which the agent will take longer to run.

This thread might also help.

https://ask.puppet.com/question/3/where-can-i-find-information-about-sizing-for-puppet-servers/

Best regards,
-g

-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/cf9f5d0b-dd54-6deb-de9d-a93a6f5abd20%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Open source puppet performance monitoring/tuning?

2017-01-12 Thread Chuck Anderson
On Thu, Jan 12, 2017 at 12:46:11PM -0800, dkoleary wrote:
> Short version of the problem:  When we first started, puppet agent runs would 
> take 5-10 seconds.  Now, while we still have a limited number of modules, 
> we're looking at 1400+ systems under management.  Most runs still take in the 
> 5-10 second range but a growing number are taking 400+ seconds to complete.
> 
> Short version of the question:  How do I know what needs to be tuned or 
> examined?

Do you use Augeas?  I found that limiting Augeas with lens, incl, and
context improves performance drastically:

augeas { "ipaddr-$dev":
  lens => 'Shellvars.lns',
  incl => "/etc/sysconfig/network-scripts/ifcfg-${dev}",
  context => "/files/etc/sysconfig/network-scripts/ifcfg-${dev}"

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/20170112211254.GI2891%40angus.ind.wpi.edu.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Open source puppet performance monitoring/tuning?

2017-01-12 Thread dkoleary
I think I've taken my open source puppet server to the limits; but, I'd like to 
be able to confirm that and find out what resources are needed.

Short version of the problem:  When we first started, puppet agent runs would 
take 5-10 seconds.  Now, while we still have a limited number of modules, we're 
looking at 1400+ systems under management.  Most runs still take in the 5-10 
second range but a growing number are taking 400+ seconds to complete.

Short version of the question:  How do I know what needs to be tuned or 
examined?

An example:  the first paragraph of 
https://docs.puppet.com/pe/latest/config_puppetserver.html says "Tuning JRuby 
on Puppet server". What would be the symptom that suggests JRuby needs tuning?

An ISBN for a book would be great.  I find all sorts of books on learning 
puppet but not too many on tuning it.

Any hints or suggestions will be greatly appreciated.

Doug O'Leary

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0e2a7c13-312d-4967-8935-f347c4b97a69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] 2016.4.2 puppet enterprise

2017-01-12 Thread Ryan Vande
I have a case open with pearson vue over this, I don't mind paying again if 
tha'ts what it takes but I just want a bigger monitor! I'll bring mine from 
home!

Anyway I will send the E-mail explaining, is this a valid E-mail address ?  
certif...@puppet.com?



On Monday, January 9, 2017 at 2:25:54 PM UTC-5, Carthik Sharma wrote:
>
> Hi Ryan,
>
> On Mon, Jan 9, 2017 at 9:40 AM, Ryan Vande  > wrote:
>
>> I went to take the test last week, they had questions about live 
>> management. To be honest the testing center monitors were so small all of 
>> the content would not fit on the page, I spent so much time resizing 
>> windows, I ran out of time to finish the test.
>>
>
> Could you please email certif...@puppet.com  with the 
> details of where you took the test? Sorry to hear you had a poor experience.
>  
>
>>
>> I seen what the test is composed of and went right home and started 
>> writing notes on topics I need to study up on before taking it again (Which 
>> I will refuse to take if I cant get a bigger monitor, its 2017 ! give me a 
>> monitor that fits all the content ! ). 
>>
>> One of those topics was live management that I need to freshen up on. Not 
>> a big deal, I will go read 3.8 documents on live management. 
>>
>
> Here's the list of topics you are expected to know:
> https://puppet.com/support-services/certification/professional-overview 
> 
>
> Live Management isn't one of the topics the latest test addresses, 
> although it was in previous (older, retired) versions of the test.
>
> I would really appreciate it if you could please email 
> certif...@puppet.com  so we can learn more. 
>
> Thanks!
> Carthik.
>
> Manager, Training and Education
> Puppet Inc.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6e533d1f-f5ee-4bac-b0a2-ef3de59985da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Regex auto-escape

2017-01-12 Thread Ugo Bellavance
Hi,

I've been working on a public module that manage text entries that have 
SELinux contexts in them. I added basic support to some of the regex 
special characters that may be used in SELinux contexts and here's the 
result: 
https://github.com/ubellavance/puppet-selinux/blob/deleteworks/manifests/fcontext.pp#L49-L50.
 
 After having done something that fits my need up to now, I knew that it 
was probably not perfect so I looked at some lists of contexts and found 
out that there are a lot more than just "(/.*)" entries but I think it 
doesn't make sense to do a regsubst for every special character.  Is there 
something that can be done directly in the module that would automatically 
put a backspace before every regex special character?

Thanks,

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/54910310-4a33-431c-897a-36c5a9020f1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet Language Style Guide update

2017-01-12 Thread Rob Nelson
Jean, thank you for the hard work taking point on this much needed
revision! Looking forward to making good use of this with puppet-lint.


Rob Nelson
rnels...@gmail.com

On Thu, Jan 12, 2017 at 1:50 PM, Jean Bond  wrote:

> Hello!
>
> We've been hard at work on a Puppet 4 update to the Puppet Language Style
> Guide, and today we are pleased to publish the updated style guide. The
> guide has also been moved within the Puppet docs site to reside in
> versioned Puppet docs: https://docs.puppet.com/
> puppet/latest/style_guide.html . As the guide is now with versioned
> Puppet docs, it is no longer versioned in and of itself. Instead, the goal
> is to update and improve the guide on a more continual basis.
>
> As all style guides are (or should be), this style guide is a living
> document. In addition, Puppet 4 style is still evolving and not all
> outstanding questions have been answered. In short, this style guide is
> probably imperfect! If you want to make suggestions or raise issues for
> discussion, we would love to hear from you. To send us style guide
> feedback, please either:
> * respond to this email
> * file a ticket under the epic DOCUMENT-637 (https://tickets.puppetlabs.
> com/browse/DOCUMENT-637)
>
> If you see a simple or error typo in text or in code, feel free to either
> file a ticket or issue a pull request to the latest version of the style
> guide (https://github.com/puppetlabs/puppet-docs/tree/master/source).
>
> My deepest thanks to the community for all of the contributions to this
> revision; your help was invaluable. I look forward to working with the
> community on improving and refining this guide.
>
> Best,
>
> Jean
> --
> *Jean Bond*
> Technical Writer
> Puppet
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/puppet-users/CADpKKKFJ%3DYsvFUV5GemNdCbjMqk1fpfJ%
> 3D9V2V1v0Y5kHiOY9Nw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAC76iT8BRP4zOh8wRgCBKZY-k4AhBaeXcc-ymCV5OTZ2zbLkZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Language Style Guide update

2017-01-12 Thread Jean Bond
Hello!

We've been hard at work on a Puppet 4 update to the Puppet Language Style
Guide, and today we are pleased to publish the updated style guide. The
guide has also been moved within the Puppet docs site to reside in
versioned Puppet docs:
https://docs.puppet.com/puppet/latest/style_guide.html . As the guide is
now with versioned Puppet docs, it is no longer versioned in and of itself.
Instead, the goal is to update and improve the guide on a more continual
basis.

As all style guides are (or should be), this style guide is a living
document. In addition, Puppet 4 style is still evolving and not all
outstanding questions have been answered. In short, this style guide is
probably imperfect! If you want to make suggestions or raise issues for
discussion, we would love to hear from you. To send us style guide
feedback, please either:
* respond to this email
* file a ticket under the epic DOCUMENT-637 (
https://tickets.puppetlabs.com/browse/DOCUMENT-637)

If you see a simple or error typo in text or in code, feel free to either
file a ticket or issue a pull request to the latest version of the style
guide (https://github.com/puppetlabs/puppet-docs/tree/master/source).

My deepest thanks to the community for all of the contributions to this
revision; your help was invaluable. I look forward to working with the
community on improving and refining this guide.

Best,

Jean
-- 
*Jean Bond*
Technical Writer
Puppet

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CADpKKKFJ%3DYsvFUV5GemNdCbjMqk1fpfJ%3D9V2V1v0Y5kHiOY9Nw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Community Roles and Profiles

2017-01-12 Thread Joe
Thank you guys very much, will read up on this.



On Wednesday, January 11, 2017 at 3:52:52 PM UTC-7, Joe wrote:
>
> Hello All,
>
> Does Puppet Community support Roles and Profiles? The Puppet Community 
> does section does not appear to have documentation on them, just looking 
> for confirmation.
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/45b57caa-4112-4ed6-9755-299380f1c84d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Questions on puppetlabs/apache

2017-01-12 Thread Arnau
Hi all,

I'm using puppetlabs/apache 1.7.0, puppet 3.8.7 and hiera 1.3.4.
I'd like to ask you 3 questions:

1) Is there any way to set CustomLog in the httpd.conf without changing the
default template? I don't find a way to add custom entries in the server
conf file.

2) how can I scape %{Refer}in hiera? I have the line:
  vhost_combined: '%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\"
\"%{User-Agent}i\"'

and tried several ways to escape %{Refer} and %{User-Agent} but both are
always interpreted as a vriables, thus become and empty string:

   LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"i\" \"i\"" vhost_combined

I tried %% , \%, \%\{, literal  none worked .

3) apache::vhost is a define, how can I set in hiera a default for all
vhosts? the same way that I do for classes, something like:

apache::vhost::access_log: false

but for a define... is that possible? (without calling create_resource).

TIA,
Arnau

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAM69jx9-xq6RP%3DFeOvQjnhP0-FeT%3D%2BKN4JUVe7xaf456JC53XA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Community Roles and Profiles

2017-01-12 Thread Steve Button
As well as the comment from Thomas, also see the follow up post from Gary 
Larizza

http://garylarizza.com/blog/2014/02/17/puppet-workflow-part-2/

Here's a video from Puppet Conf 2016

https://youtu.be/RYMNmfM6UHw

And from Puppet Conf 2014

https://youtu.be/v9LB-NX4_KQ?t=2011 

That last one is very long, and the link I posted kicks in about 33 minutes 
in when he talks about Roles and Profiles. 

It's worth watching the whole thing, probably in three sittings (bring 
popcorn) as you'll learn all about Hiera, refactoring, modules. Take notes 
- you won't remember it all.

I'm sure other speakers are available, but Gary is possibly the most 
entertaining and funny. Which is quite an achievement on such a dry 
subject. 

So, in answer to your original question the community very much does use 
Roles and Profiles and I've personally found it a very useful pattern. 

Steve


On Wednesday, 11 January 2017 22:52:52 UTC, Joe wrote:
>
>
> Does Puppet Community support Roles and Profiles? 
>

 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/98b149cf-08a8-4f55-9e96-495230af08a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] How to check if an array parameter to a Puppet resource contains a value?

2017-01-12 Thread kiran G
I am writting a custom puppet  module 
which includes an ::apache::vhost resource, and would like to verify in my 
rspec tests that the directories parameter contains a certain value, 
without reproducing the entire directories configuration which is mostly 
hardcoded in the spec test.



class foo::apache {

 # prepend 'from ' to each element in array of subnets
 # Change this ugliness to use map once we've upgraded to puppet v4
 # open to suggetions on better way to do this too...
 $subnets = $::foo::subnets
 $subnets_yaml = inline_template('<%= subnets.map {|s| "from " +s}.to_yaml 
%>')
 $allowed_subnets_directives = parseyaml($subnets_yaml)

 ::apache::vhost { 'foo_vhost':
 directories => [
 -- snip --
 # How can I check just the path & allow keys of this element?
 { 'path' => '~^.*$',
 'Order' => 'deny,allow',
 'allow' => concat(['from localhost'],
 $allowed_subnets_directives),
 'provider' => 'location',
 },
 ]
 } # foo_vhost
} # foo::apache

I've removed most of the manifest for brevity.


I can test the entire directives parameter with something along the lines of





describe 'foo::apache' do
 it { is_expected.to contain_apache__vhost('foo_vhost').with(
 'directories' => [{'path' => '~^.*$',
 'allow' => ['from localhost',
 'from 10.20.30/24',
 ],},
 ]


but the directories parameter is long and static, and I'm keen to avoid 
that.


The rspec include matcher looks like what I need, but I can't work out how 
to use it to verify the parameter, or the $allowed_subnets_directives 
variable in puppet .

Help would be appreciable. Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b2c4e41d-8f8f-4439-bd68-99ae32e33d96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.