Re: [Puppet Users] Ordering agent runs

2015-10-06 Thread Martin Alfke

On 06 Oct 2015, at 11:39, rjl  wrote:

> Hi All,
> I have an odd requirement to contend with. We have puppet clients that have 
> peers. While a catalog is being executed on one client, its peer must not 
> execute its catalog until the other is complete. Each client has only one 
> peer. Has anyone done something similar? I have not yet been able to derive a 
> good solution.
> 
> Scratching my head…

Hi rjl,

you might want to view or attend PuppetConf keynote.
https://puppetlabs.com/introducing-puppet-application-orchestration

Best,
Martin

> 
> Thanks in advance.
> 
> rjl
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "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/941fa895-4356-4bb3-bf03-264fee982d5b%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/AD749615-4ABC-429F-8C15-0B22EC6E05C5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Ordering agent runs

2015-10-06 Thread Rick Lindal
Thanks for the link Martin. We are using open source.

On Tue, Oct 6, 2015 at 1:03 PM, Martin Alfke  wrote:

>
> On 06 Oct 2015, at 11:39, rjl  wrote:
>
> > Hi All,
> > I have an odd requirement to contend with. We have puppet clients that
> have peers. While a catalog is being executed on one client, its peer must
> not execute its catalog until the other is complete. Each client has only
> one peer. Has anyone done something similar? I have not yet been able to
> derive a good solution.
> >
> > Scratching my head…
>
> Hi rjl,
>
> you might want to view or attend PuppetConf keynote.
> https://puppetlabs.com/introducing-puppet-application-orchestration
>
> Best,
> Martin
>
> >
> > Thanks in advance.
> >
> > rjl
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "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/941fa895-4356-4bb3-bf03-264fee982d5b%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/ONKtSBuE_6M/unsubscribe.
> To unsubscribe from this group and all its topics, 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/AD749615-4ABC-429F-8C15-0B22EC6E05C5%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 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/CAKHF65jso%2B%3Dex1eawJ4O9uSGotq-N3N-w%3DEv3qdwu8_EeySW7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Ordering agent runs

2015-10-06 Thread rjl
Hi All,
I have an odd requirement to contend with. We have puppet clients that have 
peers. While a catalog is being executed on one client, its peer must not 
execute its catalog until the other is complete. Each client has only one 
peer. Has anyone done something similar? I have not yet been able to derive 
a good solution.

Scratching my head...

Thanks in advance.

rjl

-- 
You received this message because you are subscribed to the Google Groups 
"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/941fa895-4356-4bb3-bf03-264fee982d5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] ANNOUNCE: puppet-retrospec -- automate your unit test creation and other cool stuff

2015-10-06 Thread Henrik Lindberg

On 2015-05-10 17:53, Corey Osman wrote:

I'll be at the contributor summit and conference on thursday-friday.

Whats the best way to get a hold of you?



I will be at the contributor summit as well. I am the "tall Swedish 
dude" :-) and you can ping me as @hel on twitter, but it should not be 
difficult to find me at the summit.


- henrik


Corey

On Friday, October 2, 2015 at 4:08:58 PM UTC-7, Henrik Lindberg wrote:

On 2015-01-10 7:24, Corey Osman wrote:
 > Last year I had an idea to create a tool to automate the buildout
of puppet unit tests by inspecting puppet code inside puppet
manifests. Along with this idea I also wanted to retrofit any puppet
module with the latest best practices, gems, rake commands and other
stuff in development within the community. So today I am releasing a
revamped version of this tool in the form of a retrospec plugin.
 >
 > I am happy to announce availability of this tool for mass
consumption. I have been using my own tool over the past few months
almost every day and I can no longer keep this tool a secret as I
know it will save you hours of time and frustration.
 >
 > The reason I built this tool is simply because unit testing is
too difficult for the average puppet coder. There are just too many
blogs, ruby versions, gems, and other tools to learn. When I first
started unit testing,
 > I documented my problems and setup procedures and eventually
committed them to code to make them easily reproducible. I have
reduced the typical learning curve of several weeks down to a few
simple key strokes.
 >
 > I’m confident that you will love this tool and use it everyday to
assist in the creation of your modules.
 >
 > To get started: 'gem install puppet-retrospec && retrospec
puppet' inside your favorite puppet module directory.
 >
 > https://github.com/nwops/puppet-retrospec
  (puppet module unit
test generator plugin)
 >
 > https://github.com/nwops/retrospec
  (file generator framework)
 >
 >
 > Corey
 >

Hi Corey, the tool looks really cool. If you are at Puppet Conf next
week, hit me up and I can help with getting this working for 4.x (and
future parser in 3.8). You should be able to support both just like
puppet does.

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 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/e139c89a-7db0-4548-81e1-63f7532e3319%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.



--

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 
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/mv15h1%24hg5%242%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Is there a more elegant way of declaring this variable and its value?

2015-10-06 Thread Fabien Delpierre
Ah, I see. That's a bigger deal than just a few lines of duplicated code in 
Hiera. We are looking at upgrading our server but we'll approach this much 
more carefully.
Thanks for the insight!



On Tuesday, October 6, 2015 at 2:53:53 PM UTC-4, Henrik Lindberg wrote:
>
> On 2015-06-10 6:03, Fabien Delpierre wrote: 
> > Interesting, thank you. How would I know if I'm using parser=future? Our 
> > agents are Puppet v3.4.3. And I'm guessing parser=future is relative to 
> > the version you're currently using so I might not have access to the 
> > feature anyway. 
> > 
>
> The setting parser=future is available in 3.x, but in version 3.4 it was 
> not near production quality. If you want to use it you should update to 
> the latest 3.8. It is a server side setting. Note that turning it on 
> requires you to carefully test, and you are most likely to encounter 
> several issues that needs attention. When you do this, you are also 
> "future proofing" your logic as it will make it much easier to 
> transition to puppet 4.x. 
>
> Regards 
> - henrik 
>
> > On Mon, Oct 5, 2015 at 6:48 PM, Henrik Lindberg 
> > > 
> > wrote: 
> > 
> > On 2015-05-10 8:51, Fabien Delpierre wrote: 
> > 
> > Hey folks, 
> > I have something like this in a manifest: 
> > 
> > class foo( 
> > $python_pips   = { 
> >   pbr => { ensure => '1.3.0', install_args => ['-I'] }, 
> >   linecache2 => { ensure => '1.0.0', install_args => ['-I'] 
> }, 
> >   elasticsearch => { ensure => '1.6.0', install_args => 
> > ['-I'] }, 
> > }, 
> > ) { 
> > require python 
> > create_resources('python::pip', $python_pips) 
> > } 
> > 
> > I'm using this module: 
> https://github.com/stankevich/puppet-python 
> > 
> > I'm wondering if there's a more elegant way of telling the 
> > python::pip 
> > resource to use the -I flag when installing those three pip 
> > packages. 
> > It's going to get even uglier since the $python_pips variable 
> will 
> > ultimately live in Hiera, and I have some environments that 
> > require a 
> > proxy to access the Internet, so in Hiera for those environments 
> > it's 
> > going to look like this: 
> > 
> > foo::python_pips: 
> > "pbr": 
> >   ensure: 1.3.0 
> >   install_args: ['-I'] 
> >   proxy: 'http://proxy.example.com:3128; 
> > "linecache2": 
> >   ensure: 1.0.0 
> >   install_args: ['-I'] 
> >   proxy: "http://proxy.example.com:3128; 
> > "elasticsearch": 
> >   ensure: 1.6.0 
> >   install_args: ['-I'] 
> >   proxy: "http://proxy.example.com:3128; 
> > 
> > I don't like all this repetition. Wanted to double check if I 
> > can make 
> > this easier on the eyes before I move on. 
> > I appreciate any input! 
> > 
> > 
> > If you are using 3.x with parser=future, or 4.x you can do like 
> this: 
> > 
> > python::pip { 
> >default: 
> >  install_args => ['-I'], 
> >  proxy=> 'http://proxy.example.com:3128' ; 
> > 
> >"pbr":   ensure => '1.3.0' ; 
> >"linecached":ensure => '1.0.0' ; 
> >"elasticsearch": ensure => '1.6.0' ; 
> > } 
> > 
> > The 'default' title defines attributes that are common to all other 
> > bodies in the same resource expression. 
> > 
> > 
> > - henrik 
> > 
> > -- 
> > You received this message because you are subscribed to the 
> Google 
> > Groups "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from 
> > it, send 
> > an email to puppet-users...@googlegroups.com  
> >  > 
> >  >  >>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/puppet-users/aa823d3e-71bd-4cba-887c-d044656d945a%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/puppet-users/aa823d3e-71bd-4cba-887c-d044656d945a%40googlegroups..com?utm_medium=email_source=footer>.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
> > 
> > 
> > 
> > -- 
> > 
> > Visit my Blog "Puppet on the Edge" 
> > http://puppet-on-the-edge.blogspot.se/ 
> > 
> > -- 
> > You received this message because you are subscribed to a topic in 
> > the Google Groups "Puppet Users" group. 
> > To unsubscribe from this topic, visit 
> > 
> https://groups.google.com/d/topic/puppet-users/LxqXmdzQQJc/unsubscribe. 
> > 

Re: [Puppet Users] Is there a more elegant way of declaring this variable and its value?

2015-10-06 Thread Henrik Lindberg

On 2015-06-10 6:03, Fabien Delpierre wrote:

Interesting, thank you. How would I know if I'm using parser=future? Our
agents are Puppet v3.4.3. And I'm guessing parser=future is relative to
the version you're currently using so I might not have access to the
feature anyway.



The setting parser=future is available in 3.x, but in version 3.4 it was 
not near production quality. If you want to use it you should update to 
the latest 3.8. It is a server side setting. Note that turning it on 
requires you to carefully test, and you are most likely to encounter 
several issues that needs attention. When you do this, you are also 
"future proofing" your logic as it will make it much easier to 
transition to puppet 4.x.


Regards
- henrik


On Mon, Oct 5, 2015 at 6:48 PM, Henrik Lindberg
>
wrote:

On 2015-05-10 8:51, Fabien Delpierre wrote:

Hey folks,
I have something like this in a manifest:

class foo(
$python_pips   = {
  pbr => { ensure => '1.3.0', install_args => ['-I'] },
  linecache2 => { ensure => '1.0.0', install_args => ['-I'] },
  elasticsearch => { ensure => '1.6.0', install_args =>
['-I'] },
},
) {
require python
create_resources('python::pip', $python_pips)
}

I'm using this module: https://github.com/stankevich/puppet-python

I'm wondering if there's a more elegant way of telling the
python::pip
resource to use the -I flag when installing those three pip
packages.
It's going to get even uglier since the $python_pips variable will
ultimately live in Hiera, and I have some environments that
require a
proxy to access the Internet, so in Hiera for those environments
it's
going to look like this:

foo::python_pips:
"pbr":
  ensure: 1.3.0
  install_args: ['-I']
  proxy: 'http://proxy.example.com:3128;
"linecache2":
  ensure: 1.0.0
  install_args: ['-I']
  proxy: "http://proxy.example.com:3128;
"elasticsearch":
  ensure: 1.6.0
  install_args: ['-I']
  proxy: "http://proxy.example.com:3128;

I don't like all this repetition. Wanted to double check if I
can make
this easier on the eyes before I move on.
I appreciate any input!


If you are using 3.x with parser=future, or 4.x you can do like this:

python::pip {
   default:
 install_args => ['-I'],
 proxy=> 'http://proxy.example.com:3128' ;

   "pbr":   ensure => '1.3.0' ;
   "linecached":ensure => '1.0.0' ;
   "elasticsearch": ensure => '1.6.0' ;
}

The 'default' title defines attributes that are common to all other
bodies in the same resource expression.


- henrik

--
You received this message because you are subscribed to the Google
Groups "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/aa823d3e-71bd-4cba-887c-d044656d945a%40googlegroups.com

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



--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
You received this message because you are subscribed to a topic in
the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/puppet-users/LxqXmdzQQJc/unsubscribe.
To unsubscribe from this group and all its topics, 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/muuune%24i62%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 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/CADLuRbwuzSh60RUmuojdnkzroNNAsGYedXbRTcK8SWwK%3D6jBpw%40mail.gmail.com

Re: [Puppet Users] Is there a more elegant way of declaring this variable and its value?

2015-10-06 Thread Fabien Delpierre
That looks like what I need, I will test it all later. Thanks João and 
Andreas!


On Tuesday, October 6, 2015 at 8:29:16 PM UTC-4, Andreas Ntaflos wrote:
>
> On 2015-10-05 17:51, Fabien Delpierre wrote: 
> > Hey folks, 
> > I have something like this in a manifest: 
> > 
> > class foo( 
> >   $python_pips   = { 
> > pbr => { ensure => '1.3.0', install_args => ['-I'] }, 
> > linecache2 => { ensure => '1.0.0', install_args => ['-I'] }, 
> > elasticsearch => { ensure => '1.6.0', install_args => ['-I'] }, 
> >   }, 
> >   ) { 
> >   require python 
> >   create_resources('python::pip', $python_pips) 
> > } 
> > 
> > I'm using this module: https://github.com/stankevich/puppet-python 
> > 
> > I'm wondering if there's a more elegant way of telling the python::pip 
> > resource to use the -I flag when installing those three pip packages. 
>
> The create_resources function supports a third argument for just this 
> use case: a hash with defaults for each created resource 
> (
> https://docs.puppetlabs.com/references/3.stable/function.html#createresources).
>  
>
> This works just fine in Puppet 3.x. 
>
> In your case you would do: 
>
> ``` 
> $python_pips = { 
>   pbr => { ensure => '1.3.0' }, 
>   linecache2 => { ensure => '1.0.0' }, 
>   elasticsearch => { ensure => '1.6.0' }, 
> } 
>
> $python_pip_defaults = { 
>   install_args => [ '-I' ], 
> } 
>
> require python 
>
> create_resources('::python::pip', $python_pips, $python_pip_defaults) 
> ``` 
>
> You can define that defaults hash in Hiera as well: 
>
> ``` 
> foo::python_pip_defaults: 
>   install_args: [ '-I' ] 
>   proxy: 'http://proxy.example.com:3128' 
>
> foo::python_pips: 
>   "pbr": 
> ensure: 1.3.0 
>   "linecache2": 
> ensure: 1.0.0 
>   "elasticsearch": 
> ensure: 1.6.0 
> ``` 
>
> Then in your profile (or whatever kind of wrapper class you use): 
>
> ``` 
> $pips = hiera_hash('foo::python_pips', {}) 
> $pip_defaults = hiera_hash('foo::python_pip_defaults', {}) 
>
> create_resources('::python::pip', $pips, $pip_defaults) 
> ``` 
>
> We make use of this pattern extensively in our profile classes whenever 
> there are resources to create (usually defined or native types). 
>
> HTH Andreas 
>
>

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


Re: [Puppet Users] Is there a more elegant way of declaring this variable and its value?

2015-10-06 Thread Andreas Ntaflos
On 2015-10-05 17:51, Fabien Delpierre wrote:
> Hey folks,
> I have something like this in a manifest:
> 
> class foo(
>   $python_pips   = {
> pbr => { ensure => '1.3.0', install_args => ['-I'] },
> linecache2 => { ensure => '1.0.0', install_args => ['-I'] },
> elasticsearch => { ensure => '1.6.0', install_args => ['-I'] },
>   },
>   ) {
>   require python
>   create_resources('python::pip', $python_pips)
> }
> 
> I'm using this module: https://github.com/stankevich/puppet-python
> 
> I'm wondering if there's a more elegant way of telling the python::pip
> resource to use the -I flag when installing those three pip packages.

The create_resources function supports a third argument for just this
use case: a hash with defaults for each created resource
(https://docs.puppetlabs.com/references/3.stable/function.html#createresources).
This works just fine in Puppet 3.x.

In your case you would do:

```
$python_pips = {
  pbr => { ensure => '1.3.0' },
  linecache2 => { ensure => '1.0.0' },
  elasticsearch => { ensure => '1.6.0' },
}

$python_pip_defaults = {
  install_args => [ '-I' ],
}

require python

create_resources('::python::pip', $python_pips, $python_pip_defaults)
```

You can define that defaults hash in Hiera as well:

```
foo::python_pip_defaults:
  install_args: [ '-I' ]
  proxy: 'http://proxy.example.com:3128'

foo::python_pips:
  "pbr":
ensure: 1.3.0
  "linecache2":
ensure: 1.0.0
  "elasticsearch":
ensure: 1.6.0
```

Then in your profile (or whatever kind of wrapper class you use):

```
$pips = hiera_hash('foo::python_pips', {})
$pip_defaults = hiera_hash('foo::python_pip_defaults', {})

create_resources('::python::pip', $pips, $pip_defaults)
```

We make use of this pattern extensively in our profile classes whenever
there are resources to create (usually defined or native types).

HTH Andreas

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


signature.asc
Description: OpenPGP digital signature


Re: [Puppet Users] Is there a more elegant way of declaring this variable and its value?

2015-10-06 Thread Joao Morais

On 05/10/15 19:48, Henrik Lindberg wrote:

On 2015-05-10 8:51, Fabien Delpierre wrote:


foo::python_pips:
   "pbr":
 ensure: 1.3.0
 install_args: ['-I']
 proxy: 'http://proxy.example.com:3128;
   "linecache2":
 ensure: 1.0.0
 install_args: ['-I']
 proxy: "http://proxy.example.com:3128;
   "elasticsearch":
 ensure: 1.6.0
 install_args: ['-I']
 proxy: "http://proxy.example.com:3128;

I don't like all this repetition. Wanted to double check if I can make
this easier on the eyes before I move on.
I appreciate any input!



If you are using 3.x with parser=future, or 4.x you can do like this:

python::pip {
   default:
 install_args => ['-I'],
 proxy=> 'http://proxy.example.com:3128' ;

   "pbr":   ensure => '1.3.0' ;
   "linecached":ensure => '1.0.0' ;
   "elasticsearch": ensure => '1.6.0' ;
}


The syntax below does the same on 3.x? Note the resource name capitalized.

Python::Pip {
install_args => ['-I'],
proxy=> 'http://proxy.example.com:3128',
}

https://docs.puppetlabs.com/puppet/3.8/reference/lang_defaults.html


--
You received this message because you are subscribed to the Google Groups "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/56144D0B.40503%40joaomorais.com.br.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Multi environment and multi system

2015-10-06 Thread Joao Morais

On 05/10/15 21:22, Garrett Honeycutt wrote:

On 10/2/15 8:08 PM, Joao Morais wrote:


How to manage a Puppet Server with multi-environment and multi-system?


Hi Joao,

What do you mean by base configuration and system configuration?


Hi Garrett. Base configuration is common manifests and hieradata shared 
by all installations of all systems, like hardening and Apache httpd. 
There are some corporative rules achieved by this base configuration.



Also, are you using separate repo's for each module?


Yes. The `environments` repo has manifests, hieradata and a `Puppetfile` 
file used by r10k to manage modules.



--
You received this message because you are subscribed to the Google Groups "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/5613A18A.9050907%40joaomorais.com.br.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Multi environment and multi system

2015-10-06 Thread Joao Morais

On 06/10/15 07:25, Joao Morais wrote:

On 05/10/15 21:22, Garrett Honeycutt wrote:

On 10/2/15 8:08 PM, Joao Morais wrote:


How to manage a Puppet Server with multi-environment and multi-system?


Hi Joao,

What do you mean by base configuration and system configuration?


Hi Garrett. Base configuration is common manifests and hieradata shared
by all installations of all systems, like hardening and Apache httpd.
There are some corporative rules achieved by this base configuration.


... and about system configuration: out Puppet Server manages several 
VMs hosting software for several different and unrelated clients. A 
system configuration is something like JBoss properties, datasources, 
logging and other system related configurations which we need to promote 
from one environment to another.



Also, are you using separate repo's for each module?


Yes. The `environments` repo has manifests, hieradata and a `Puppetfile`
file used by r10k to manage modules.




--
You received this message because you are subscribed to the Google Groups "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/5613A2FC.1030604%40joaomorais.com.br.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Warning: Unable to fetch my node definition, but the agent run will continue:

2015-10-06 Thread jcbollinger


On Monday, October 5, 2015 at 9:45:34 AM UTC-5, Dale Bradman wrote:
>
> Hi Szerémi,
>
> I am new to Puppet. Could you explain this a little more please?
>
> I have my Puppet master and the node I am trying to run 'puppet agent 
> --test' on however I am seeing the same error as Shawn.
>
>

To expand on Felix's diagnosis, Shawn's Puppet master is configured to use 
an "external node classifier" (ENC), which is an external program provided 
by the site (sometimes via a separate pre-packaged utility such as The 
Foreman) or provided as part of the Puppet Enterprise package.  When so 
configured, the master will run the ENC for each catalog request it 
receives, passing it the requesting node's name (which by default is its 
hostname), and expecting to receive back YAML-formatted data describing 
classes that should be applied to the node and global variable values that 
apply to it.

In Shawn's case, the ENC is returning an error code when run with argument 
'puppetnode.localdomain', which apparently is the node's self-reported 
name, as borne by its certificate.  Why an error occurs depends entirely on 
the particular ENC program in use, but at a high level there are only two 
possibilities:

   1. the ENC doesn't know how to classify the specified node, or
   2. the ENC encountered an internal error.

One plausible reason for such a failure is that the ENC itself needs to be 
configured with information about the node in question.  Another is that it 
is currently *mis*configured -- for example, perhaps it disagrees with the 
node about the node's name.


John

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


[Puppet Users] err: Failed to apply catalog: Parameter source failed on File[...]: Cannot use URLs of type 's001ap38-test' as source for fileserving at /etc/puppet/modules/httpd/manifests/init.pp:12

2015-10-06 Thread Wei Chen
Hi all,

As I run following command:

puppet agent --server s001ap38-test --no-daemonize --verbose --onetime

I got error as follow:
...
err: Failed to apply catalog: Parameter source failed on 
File[/etc/httpd/conf.d/s001is35-test.conf]: Cannot use URLs of type 
's001ap38-test' as source for fileserving at 
/etc/puppet/modules/httpd/manifests/init.pp:12
...

My init.pp looks as follow:

class httpd {
package { httpd:
ensure => present,
}

file { "/etc/httpd/conf.d/s001is35-test.conf":
owner => "root",
group => "root",
mode => 0440,
source => 
"s001ap38-test://$puppetmaster/modules/httpd/files/s001is35-test.conf",
require => Package["httpd"],
}
}

Note: the $puppetmaster is defined in "site.pp" as follow:
import 'nodes.pp'
$puppetmaster = 's001ap38-test'


I want to know what is the reason to the error? I guess the sentence 
"source => 
"s001ap38-test://$puppetmaster/modules/httpd/files/s001is35-test.conf"," in 
the init.pp could be the reason. But I have no idea how to fix it. Could 
someone help?

Regards


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


Re: [Puppet Users] Is there a more elegant way of declaring this variable and its value?

2015-10-06 Thread Fabien Delpierre
Interesting, thank you. How would I know if I'm using parser=future? Our
agents are Puppet v3.4.3. And I'm guessing parser=future is relative to the
version you're currently using so I might not have access to the feature
anyway.

On Mon, Oct 5, 2015 at 6:48 PM, Henrik Lindberg <
henrik.lindb...@cloudsmith.com> wrote:

> On 2015-05-10 8:51, Fabien Delpierre wrote:
>
>> Hey folks,
>> I have something like this in a manifest:
>>
>> class foo(
>>$python_pips   = {
>>  pbr => { ensure => '1.3.0', install_args => ['-I'] },
>>  linecache2 => { ensure => '1.0.0', install_args => ['-I'] },
>>  elasticsearch => { ensure => '1.6.0', install_args => ['-I'] },
>>},
>>) {
>>require python
>>create_resources('python::pip', $python_pips)
>> }
>>
>> I'm using this module: https://github.com/stankevich/puppet-python
>>
>> I'm wondering if there's a more elegant way of telling the python::pip
>> resource to use the -I flag when installing those three pip packages.
>> It's going to get even uglier since the $python_pips variable will
>> ultimately live in Hiera, and I have some environments that require a
>> proxy to access the Internet, so in Hiera for those environments it's
>> going to look like this:
>>
>> foo::python_pips:
>>"pbr":
>>  ensure: 1.3.0
>>  install_args: ['-I']
>>  proxy: 'http://proxy.example.com:3128;
>>"linecache2":
>>  ensure: 1.0.0
>>  install_args: ['-I']
>>  proxy: "http://proxy.example.com:3128;
>>"elasticsearch":
>>  ensure: 1.6.0
>>  install_args: ['-I']
>>  proxy: "http://proxy.example.com:3128;
>>
>> I don't like all this repetition. Wanted to double check if I can make
>> this easier on the eyes before I move on.
>> I appreciate any input!
>>
>>
> If you are using 3.x with parser=future, or 4.x you can do like this:
>
> python::pip {
>   default:
> install_args => ['-I'],
> proxy=> 'http://proxy.example.com:3128' ;
>
>   "pbr":   ensure => '1.3.0' ;
>   "linecached":ensure => '1.0.0' ;
>   "elasticsearch": ensure => '1.6.0' ;
> }
>
> The 'default' title defines attributes that are common to all other bodies
> in the same resource expression.
>
>
> - henrik
>
> --
>> You received this message because you are subscribed to the Google
>> Groups "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/aa823d3e-71bd-4cba-887c-d044656d945a%40googlegroups.com
>> <
>> https://groups.google.com/d/msgid/puppet-users/aa823d3e-71bd-4cba-887c-d044656d945a%40googlegroups..com?utm_medium=email_source=footer
>> >.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
> Visit my Blog "Puppet on the Edge"
> http://puppet-on-the-edge.blogspot.se/
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/LxqXmdzQQJc/unsubscribe.
> To unsubscribe from this group and all its topics, 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/muuune%24i62%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 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/CADLuRbwuzSh60RUmuojdnkzroNNAsGYedXbRTcK8SWwK%3D6jBpw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Problems with Puppet Keystone_user[admin] `[]' for nil:NilClass

2015-10-06 Thread Lance Reed
I am stuck trying to get Openstack Keystone to install via puppet.

Maybe someone has seen this before and can shed some light on the
problem as I have searched google and have also tried a large number
of Admin related puppet options.


I am getting this output:

Notice: /Stage[main]/Keystone/Exec[keystone-manage pki_setup]:
Triggered 'refresh' from 37 events
Notice: /Stage[main]/Apache::Service/Service[httpd]: Triggered
'refresh' from 79 events
Notice: /Stage[main]/Keystone::Roles::Admin/Keystone_tenant[services]/ensure:
created
Notice: /Stage[main]/Keystone::Roles::Admin/Keystone_role[admin]/ensure: created
Notice: /Stage[main]/Keystone::Roles::Admin/Keystone_tenant[openstack]/ensure:
created
Error: Could not set 'present' on ensure: undefined method `[]' for
nil:NilClass at
153:/etc/puppet/modules/thirdparty/keystone/manifests/roles/admin.pp
Error: Could not set 'present' on ensure: undefined method `[]' for
nil:NilClass at
153:/etc/puppet/modules/thirdparty/keystone/manifests/roles/admin.pp
Wrapped exception:
undefined method `[]' for nil:NilClass
Error: /Stage[main]/Keystone::Roles::Admin/Keystone_user[admin]/ensure:
change from absent to present failed: Could not set 'present' on
ensure: undefined method `[]' for nil:NilClass at
153:/etc/puppet/modules/thirdparty/keystone/manifests/roles/admin.pp
Notice: /Stage[main]/Keystone::Roles::Admin/Keystone_user_role[admin@openstack]:
Dependency Keystone_user[admin] has failures: true
Warning: 
/Stage[main]/Keystone::Roles::Admin/Keystone_user_role[admin@openstack]:
Skipping because of failed dependencies


Puppet code looks like this:


package { 'rdo-release-kilo':
ensure => 'installed',
source =>
'http://rdo.fedorapeople.org/openstack-kilo/rdo-release-kilo.rpm',
provider => 'rpm'
}

   class { '::keystone::client': }
class { '::keystone::cron::token_flush': }
class { '::keystone::db::mysql':
  password  => 'keystone',
  allowed_hosts => '%',
  require   => Class['::mysql::server'],
}
class { '::keystone':
  verbose => true,
  debug   => true,
  database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
  admin_token => 'admin_token',
  enabled => true,
  service_name=> 'httpd',
  default_domain  => 'default_domain',
  require => Class['::keystone::db::mysql'],
}

include ::apache
class { '::keystone::wsgi::apache':
  ssl => false,
}
class { 'keystone::roles::admin':
  email=> 'yep...@yeppercorp.com',
  password => 'a_big_secret',
}


--
Running this versions of Openstack

openstack-selinux-0.6.35-1.el7.noarch
openstack-keystone-2015.1.1-1.el7.noarch
python-openstackclient-1.0.3-2.el7.noarch

Version of puppet modules:

name": "openstack-keystone",
  "version": "6.0.0",

  "name": "openstack-openstacklib",
  "version": "6.0.0",


Decided to try the RDO RPMs since they seem to be the most bundled.

Open to any and all suggestions on how this might be done better.

Thanks very much in advance to anyone that might have some ideas.

Cheers,

Lance

-- 
You received this message because you are subscribed to the Google Groups 
"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/CAF6vZcGWdBw2L-LdROUtxOzopiHEG1Ts2R%2Bq4dPUQk0Wdi5a2w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.