[Puppet Users] Re: what is the right way to ensure specific version installed on puppet agent?

2013-12-04 Thread shlo . afgin

Thank you very much for your detailed answer.
 

On Wednesday, December 4, 2013 4:56:34 PM UTC+2, jcbollinger wrote:
>
>
>
> On Wednesday, December 4, 2013 1:19:55 AM UTC-6, shlo@gmail.com wrote:
>>
>>
>>
>> Hi,
>>
>> I wanted to install mysql-5.1.66 and make sure mysql-5.5.34 removed so I 
>> make a init.pp file and put in it:
>> class mysql {
>> package { 'mysql':
>> ensure => "5.1.66-2.el6_3", 
>> require => [Package['mysql-libs'], 
>> Package['compat-mysql'], 
>> Package['mysql-5.5.34']],
>> }
>>
>> package { 'mysql-libs':
>> provider => 'yum',
>> ensure => 'purged',
>> }
>>
>> package { 'compat-mysql':
>> provider => 'yum',
>> ensure => 'absent',
>> }
>>
>> package { 'mysql-5.5.34':
>> provider => 'yum',
>> ensure => 'absent',
>> }
>>
>
>
> That last bit is useless, except inasmuch as there is a (definitely 
> useless) reference to Package[''mysql-5.5.34''] earlier.  Puppet's RPM and 
> YUM package providers will recognize  and . as 
> package names.  Ensuring Package['mysql-5.5.34'] absent is always a no-op 
> because although Package['mysql'] might have version 5.5.34, that's doesn't 
> make it a package *named* "mysql-5.5.34".
>
> Moreover, this isn't an issue for the vast majority of RPM packages, 
> because few RPMs accommodate multiple versions of the same package 
> installed.  Unless you're dealing with custom-packaged RPMs specifically 
> built to accommodate multiple versions -- and it doesn't look like you are 
> -- your earlier version-specific declaration of package "mysql" should be 
> sufficient to ensure that the only version of the "mysql" package is the 
> one you specify (5.1.66-2.el6_3).
>
>  
>
>> } 
>>
>> When I test it before, two weeks ago, it work okay. It remove 
>> mysql-5.5.34 and install mysql-5.1.66.
>> Today I saw the puppet agent don't have mysql install at all.
>> I tried to install it from the Unix command line  and got:
>>
>> *No package mysql-server-5.1.66-2.el6_3 available.Error: Nothing to do*
>>
>> I believe that this version of mysql removed from the repository because 
>> it's old, but I don't want the old version to delete from my puppet agent.
>> I want my puppet agent to have mysql-5.1.66 even that it not exist in the 
>> repository.
>> Is it because the puppet did not find mysql in the repository so it 
>> delete it from my agent?
>>
>
>
> No.
>
>  
>
>> or I'm doing something wrong?
>>
>>
>
> Yes.
>
> Your package declarations have a hidden inconsistency that Puppet is 
> unable to diagnose.  You specify that package "mysql-libs" must be purged, 
> but that's not actually what you want, because packages mysql and 
> mysql-server depend on mysql-libs.  By ensuring mysql-libs purged, you 
> force it and all packages that depend on it to be removed (if mysql-libs is 
> present) every time the agent runs.  *That's* why mysql-5.1.66 and 
> mysql-server-5.1.66 got removed.  It is surely not what you actually want, 
> even if the mysql-5.1.66 packages were still available in your configured 
> repositories.  (And this is yet another reason why the declaration of 
> package "mysql-5.5.34" is useless.)
>
> You have committed one of the classic Puppet blunders: writing manifests 
> that focus on state transitions instead of on the desired target state.  I 
> say that because the only reason I can imaging for declaring mysql-libs 
> purged is to facilitate downgrading mysql to version 5.1.66 from a later 
> version.
>
> There are several things you should do:
>
>1. Create and maintain a local package repository for at least those 
>packages you depend upon, plus their dependencies.  Myself, I maintain a 
>complete local mirror of all the essential repositories I depend on.  
> There 
>are multiple advantages, but the most relevant one here is that you can 
>avoid packages being yanked out from under you.
>2. Remove the inconsistency in your declarations.
>
> There are several approaches to (2), but I'd recommend creating a custom 
> fact to report the installed version of mysql-libs, and making its purge 
> conditional on that value.  The Puppet side might look like this:
>
> class mysql {
>   $target_version = '5.1.66'
>   $target_release = '2.el6_3'
>
>   package { 'mysql': ensure => "${target_version}-${target_release)" }
>
>   # assumes that mysql-libs version must match mysql version;
>   # $::mysql_libs_version is a custom fact you must provide:
>   if $::mysql_libs_version != '' and versioncmp($target_version, 
> $::mysql_libs_version) < 0 {
> package { 'mysql-libs':
>   ensure => 'purged'
>   before => Package['mysql']
> }
>   }
>
>   package { 'compat-mysql': ensure => 'absent' }
> }
>
> Note that there is no need for a resource relationship between 
> Package['compat-mysql'] and Package['mysql'], because it doesn't matter in 
> which relative order these resources are applied.  Note also that there is 

Re: [Puppet Users] external node classifier with a back-end

2013-12-04 Thread xav
On Wed, 2013-12-04 at 20:06 -0800, Stuart Cracraft wrote:
> And if you do not want to store secretive (complete) company data in 
> PuppetDB but instead an alternative securable database, what then pray
tell?
> 
> 

Your original question wasn't about security at all.  It was much more
vague than that, so perhaps you could restate the question more clearly?

Going back to your original post, the Puppet Dashboard and/or Foreman
are excellent candidates as ENC's that are backed by Postgresql.  Both
play nicely if you're wanting the functionality of Puppetdb as well. 

However, if your query is about storing data securely, you're looking at
something else entirely such as hiera-gpg or hiera integrated with eyaml
- although that's not an ENC solution, the encryption might be more what
you're after.  I've had good results using hiera-gpg to store passwords
etc., and find editing yaml files and storing them in git a bunch easier
than stuffing around in an ENC gui.

Alternately if you're wanting to use something for exported resources,
how about encrypting that before exporting it so that what's stored is
secured?  Just a thought.

To restate previous clarifications - PuppetDB uses a Postgresql database
to store data.  There's an api to access it, but it's reasonably locked
down.

-- 
You received this message because you are subscribed to the Google Groups 
"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/1386219051.6023.14.camel%40debian.my.home.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] external node classifier with a back-end

2013-12-04 Thread Stuart Cracraft

And if you do not want to store secretive (complete) company data in 
PuppetDB but instead an alternative securable database, what then pray tell?

-- 
You received this message because you are subscribed to the Google Groups 
"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/E22CF187-0DDD-409E-9784-4F9995215551%40me.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] external node classifier with a back-end

2013-12-04 Thread Dan White
Thanks for that clarification.
I was fairly certain it uses PostgreSQL

On Dec 4, 2013, at 8:52 PM, Ken Barber  wrote:

 Anyone have a back-ended external node classifier to a Postgres database
 they could throw my way?
>>> 
>>> Isn't that what PuppetDB is ?
>> 
>> Postgres has better DR.
>> 
>> We like Postgres.
> 
> PuppetDB is not an ENC, also FWIW and to be clear it uses PostgreSQL.
> 
> ken.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/786A6AFC-48CE-4B72-A429-CA1B49202B3C%40comcast.net.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Using scheduled_task for Windows startup

2013-12-04 Thread Jeff Bachtel
Is there a way that I'm not seeing to make scheduled_task create a task
that runs on Windows startup?

Unrelated (but too lazy to send 2 emails) does anyone have an example of
configuring the Windows time service from Puppet?

This is all on 3.3.1,

Jeff

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


Re: [Puppet Users] Re: puppet in java

2013-12-04 Thread Henrik Lindberg

On 2013-04-12 8:27, PRAVEEN D wrote:

Current application is a standalone web application running in one
server, so we use spring framwork to load the properties. New direction
is to go with a distributed and clustered model, that is where we are
getting complicated with the property file management. Let me know your
thoughts on this.

On Thursday, November 28, 2013 2:58:39 PM UTC+5:30, PRAVEEN D wrote:

We have bunch or property files(key/value pairs) used in different
modules in our java web applicaiton. our applicaiton is also
distributed, part of that runs on a head office and some of the
parts run at the branch. All the branches run a local server for day
to day activities.  We are looking to automate these files when
moving to different environments like deve, test, prod. So that we
can manage these property files without restarting the applicaiton.
 From my understanding puppet is able to manage those property files
and can be distributed to any number o nodes.

 From my understanding with puppet, it creates a manifest files and
these are updated by the agents from the puppet master. My question
is how to read these manifest files in java? does this puppet
supports in all operating systems?



How do you get the property file to be where it is supposed to be on the 
target system, and where is it located on the target system? A plain 
file, in a jar, does the jar have to be signed etc.


An explanation of how this is done now helps figuring out a good way of
automating it with Puppet.

Regards
- 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/l7opq9%24baf%241%40ger.gmane.org.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] external node classifier with a back-end

2013-12-04 Thread Ken Barber
>>> Anyone have a back-ended external node classifier to a Postgres database
>>> they could throw my way?
>>
>> Isn't that what PuppetDB is ?
>
> Postgres has better DR.
>
> We like Postgres.

PuppetDB is not an ENC, also FWIW and to be clear it uses PostgreSQL.

ken.

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


Re: [Puppet Users] MySQL server install with datadir != /var/lib/mysql

2013-12-04 Thread Justin
Have you tried creating a symlink (eg. /var/lib/mysql -> /mysql/data)
before installing with yum?
On Dec 3, 2013 8:40 PM, "Thomas"  wrote:

> Has anybody sucessfully used puppetlabs-mysql (or some other method) to
> install MySQL-server on Linux with a my.cnf where datadir != /var/lib/mysql
> ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/004002bb-577c-4d2d-8f51-ce62486dfeb6%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


[Puppet Users] Re: VMware and open source puppet

2013-12-04 Thread Dhanarajan Ponnurangam
Thanks Rich. Seems open source does not support creating VM's.
I learnt that Razor is another package which can be used to create VM's in 
a bare metal. Let me try exploring that. Thanks all for your support.

Regards,
Dhanarajan.p

On Tuesday, 26 November 2013 23:32:34 UTC-8, Dhanarajan Ponnurangam wrote:
>
>
>
> Hi All, 
>
> I am very new to puppet an vmware.
>
> I have a hardware server with ESX5.1 installed in it. I have a Linux 
> server (Centos) running open source puppet.
> I need to create a VM on this hypervisor by using this puppet master.
>
> Can anyone please help me in understand the list of required packages that 
> needs to be installed on the puppet master to get this done.
> It will be great if some one can share the puppet master configurations 
> that needs to be done to create and manage VM's using puppet.
>
> Appreciate your inputs on the same.
>
> Regards,
> Dhanarajan.P
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/0daa2903-1c4e-4e01-9a16-4a37b511ce5f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] puppetmaster and nodes upgraded

2013-12-04 Thread Stuart Cracraft
3.2.1 to 3.3.2

puppetmaster(s) and associated node(s)

passed test(s)

one case was a straight "yum upgrade" with puppet labs yum service (the 
puppet master).

the others from a private/local rpm repo I maintain.

Didn't see anything weird. 

Did have to install libselinux-ruby though...

Stuart

-- 
You received this message because you are subscribed to the Google Groups 
"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/535190a4-4966-4afb-8cfb-56412a078661%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: VMware and open source puppet

2013-12-04 Thread Rich Burroughs
If you are using Puppet Enterprise, it does have support for provisioning
VMs though Puppet:

http://docs.puppetlabs.com/pe/latest/cloudprovisioner_vmware.html

If you're using the open source Puppet, I'm not aware of a way to do that
(I'm not saying there's not a way, just that I don't know of one). But once
you have provisioned the nodes some other way and have them running, you
can manage them through Puppet at that point.


Rich




On Tue, Dec 3, 2013 at 11:24 PM, Dhanarajan Ponnurangam  wrote:

> Thanks Ygor for your reply.
>
> Could you please eloborate on your statement. I understand that ESX is
> installed in the bare metal server. Now I need to create VM's in this
> server through puppet.
> What are the hardware and software resource I may need to accomplish this.
>
> It will be of great help if you can give more inputs on the same.
>
> Regards,
> Dhanarajan.P
>
> On Tuesday, 26 November 2013 23:32:34 UTC-8, Dhanarajan Ponnurangam wrote:
>
>>
>>
>> Hi All,
>>
>> I am very new to puppet an vmware.
>>
>> I have a hardware server with ESX5.1 installed in it. I have a Linux
>> server (Centos) running open source puppet.
>> I need to create a VM on this hypervisor by using this puppet master.
>>
>> Can anyone please help me in understand the list of required packages
>> that needs to be installed on the puppet master to get this done.
>> It will be great if some one can share the puppet master configurations
>> that needs to be done to create and manage VM's using puppet.
>>
>> Appreciate your inputs on the same.
>>
>> Regards,
>> Dhanarajan.P
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "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/83f8fb0a-eea2-4ab0-b34a-85d8b12b024b%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


[Puppet Users] Ensure last line in a file

2013-12-04 Thread Stack Kororā
Greetings,

I am currently managing a configuration file for an application with 
puppet+file_line and so far everything is going well. I have about 30 rules 
that I need to ensure are in the configuration file. The tricky part is 
that the rest of the file I don't care about but some admin somewhere 
*does*. I, as the puppet module dev/admin, may not care about "$someline" 
but AdminA may need "$someline" to exist where AdminB may need "$someline" 
to _not_ exist and AdminC may need "$someline" to exist with a different 
value associated with it (!). Due to this complexity I have given up trying 
the template route (maybe I am doing it wrong...but it was a pain trying to 
deal with all the different parameters...I didn't get far before it was 
over my head in complexity).

In short, I am managing 30 lines of a config file with puppet in a config 
file that may be anywhere between 30-100 lines long depending on the 
system, admin, and use. 

So what is the problem? Well up till this last rule, I haven't cared what 
order these rules exist in the config file. It generally doesn't make a 
difference. But not the latest addition to these rules that I am supposed 
to ensure exists. This new rule is kind of like an iptables "-A INPUT -j 
DROP" rule for this application. If it is anywhere *but* the last line of 
the file, then all the rest of the config lines are ignored. Thankfully the 
program at least complains about this so we can fix it manually, but it 
would be awesome if puppet would ensure that this line was /always/ the 
last line of the file.

I tinkered with a few things (like anchors and stages) but the problem is 
that if the line already exists and isn't at the end, nothing moves it to 
the end. 

Does anyone have any clever ideas on how to ensure that a line exists as 
the very last item of a file? Or maybe there is a suggestion on a better 
method of managing this config file?

Thanks!
~Stack~

-- 
You received this message because you are subscribed to the Google Groups 
"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/838c06ae-d4a2-4abb-a446-ce3b77925dad%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Question about Hiera...

2013-12-04 Thread Rich Burroughs
Is this the one you were using Jerald?

http://docs.puppetlabs.com/hiera/1/complete_example.html

I'm not sure I've seen a better one. There is a chapter on it in the second
edition of Pro Puppet. I am expecting it will be pretty clear but I've not
gotten that far yet :)

http://www.apress.com/9781430260400


Rich



On Wed, Dec 4, 2013 at 11:14 AM, Jerald Sheets  wrote:

> If I'm finding Hiera unnecessarily obtuse and the PuppetLabs documentation
> (after dredging through the docs literally all morning) similarly
> confusing, where could I look to find more clarity and quality tutorial or
> instruction in the Hiera product?
>
>
>
> ---
> Jerald M. Sheets jr.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "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/CAAE6QHz2JDmB%2B%2BRM9uU7%2BKmB6CwphH4AKz_yo3J3D1tw%3D%3D1MuA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Re: [Puppet Users] external node classifier with a back-end

2013-12-04 Thread Stuart Cracraft
Hi Ygor/Dan,

Postgres has better DR.

We like Postgres.

Stuart

On Wednesday, December 4, 2013 2:03:10 PM UTC-8, Ygor wrote:

> Isn't that what PuppetDB is ?
>
> “Sometimes I think the surest sign that intelligent life exists elsewhere 
> in the universe is that none of it has tried to contact us.”
> Bill Waterson (Calvin & Hobbes)
>
> --
> *From: *"Stuart Cracraft" >
> *To: *puppet...@googlegroups.com 
> *Sent: *Wednesday, December 4, 2013 4:33:51 PM
> *Subject: *[Puppet Users] external node classifier with a back-end
>
>
> Hi everybody!
>
> Anyone have a back-ended external node classifier to a Postgres database
> they could throw my way?
>
> Stuart
>
>
>  -- 
> You received this message because you are subscribed 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/7781bed3-7e5a-46e2-8949-e00bfac0fbd0%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Re: [Puppet Users] Re: puppetdb: how to install using the system ruby 1.9.3-p484

2013-12-04 Thread machete
Ok .. thanks ... looks like the linux user is rockin' a different version 
than root and because I am using root to do the install it ... DOH!  Scary, 
I thought all the 1.8.7 stuff was gone ... 



User
 gem environment 
RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.23
  - RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: /usr/local/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
  - GEM PATHS:
 - /usr/local/lib/ruby/gems/1.9.1
 - /home/mongrel/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
 - :update_sources => true
 - :verbose => true
 - :benchmark => false
 - :backtrace => false
 - :bulk_threshold => 1000
  - REMOTE SOURCES:
 - http://rubygems.org/

Root
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
  - GEM PATHS:
 - /usr/lib/ruby/gems/1.8
 - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
 - :update_sources => true
 - :verbose => true
 - :benchmark => false
 - :backtrace => false
 - :bulk_threshold => 1000
 - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
 - http://rubygems.org/

On Wednesday, December 4, 2013 4:51:38 PM UTC-5, Moses Mendoza wrote:
>
> If you installed puppet originally using ruby 1.8.7, then all of your 
> gems, including puppet, will be in the ruby 1.8.7 gem home, and all 
> the binaries, including puppet, that were created by rubygems will be 
> pointing there. Since you built ruby 1.9.3 from source, perhaps you 
> have a separate 'gem' executable in $PREFIX/bin ($PREFIX being what 
> you passed to `configure` ruby) since 1.9.3 ships with rubygems 
> built-in. Long story short, reinstalling your gems using your new ruby 
> 1.9.3 gem executable will cause the new puppet gem (and all new 1.9.3 
> rubygems) to use ruby 1.9.3. Note that unless you remove them, your 
> 1.8.7 ruby, rubygems, and all 1.8.7 installed gems will still exist. 
>
> On Wed, Dec 4, 2013 at 12:33 PM, machete > 
> wrote: 
> > gem list: 
> > 
> > gem list 
> > 
> > *** LOCAL GEMS *** 
> > 
> > bigdecimal (1.1.0) 
> > bundler (1.3.5) 
> > daemon_controller (1.1.7) 
> > facter (1.7.3) 
> > hiera (1.3.0) 
> > io-console (0.3) 
> > json (1.5.5) 
> > json_pure (1.8.1) 
> > minitest (2.5.1) 
> > passenger (4.0.17) 
> > puppet (3.3.2) 
> > rack (1.5.2) 
> > rake (0.9.2.2) 
> > rdoc (3.9.5) 
> > rgen (0.6.6) 
> > 
> > 
> > 
> > 
> > On Wednesday, December 4, 2013 3:31:26 PM UTC-5, machete wrote: 
> >> 
> >> Hey Moses, 
> >> 
> >> Thanks for the quick response. 
> >> 
> >> Puppet was install via ruby gem ... I know, but it is so easy. 
> >> Ruby/rubygem are running from source. 
> >> OS is CentOS 6.4 Linux puppetdb 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 
> >> 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux 
> >> 
> >> 
> >> On Wednesday, December 4, 2013 3:22:56 PM UTC-5, Moses Mendoza wrote: 
> >>> 
> >>> How did you install puppet originally? Are you running from packages, 
> >>> rubygem, or running from source, or some other method? 
> >>> 
> >>> On Wed, Dec 4, 2013 at 11:58 AM, machete  wrote: 
> >>> > Hey what gives ... ? ;) 
> >>> > 
> >>> > I've got a shiny new install of ruby 1.9.3-p484 ... and my 'sudo 
> puppet 
> >>> > resource package puppetdb ensure=latest' loads ruby 1.8.7  
> >>> > 
> >>> > Would someone please point me to the instructions ( or share ) on 
> how 
> >>> > to get 
> >>> > my 'sudo puppet resource package puppetdb ensure=latest' to use my 
> ruby 
> >>> > 1.9.3-p484? 
> >>> > 
> >>> > ~> ruby -v 
> >>> > ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux] 
> >>> > ~> puppet -V 
> >>> > 3.3.2 
> >>> > 
> >>> > 
> >>> > Cheers, 
> >>> > 
> >>> > t 
> >>> > 
> >>> > -- 
> >>> > You received this message because you are subscribed 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/4015678f-f943-4de1-8640-52caa7592f31%40googlegroups.com.
>  
>
> >>> > 
> >>> > For more options, visit https://groups.google.com/groups/opt_out. 
> >>> 
> >>> 
> >>> 
> >>> -- 
> >>> Moses Mendoza 
> >>> Puppet Labs 
> >>> 
> >>> Join us at PuppetConf 2014, September 23-24 in San Francisco 
> > 
> > -- 
> > You received this message because you are subscribed 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

Re: [Puppet Users] external node classifier with a back-end

2013-12-04 Thread Dan White
Isn't that what PuppetDB is ? 


“Sometimes I think the surest sign that intelligent life exists elsewhere in 
the universe is that none of it has tried to contact us.” 
Bill Waterson (Calvin & Hobbes) 

- Original Message -
From: "Stuart Cracraft"  
To: puppet-users@googlegroups.com 
Sent: Wednesday, December 4, 2013 4:33:51 PM 
Subject: [Puppet Users] external node classifier with a back-end 





Hi everybody! 


Anyone have a back-ended external node classifier to a Postgres database 
they could throw my way? 


Stuart 





-- 
You received this message because you are subscribed to the Google Groups 
"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/7781bed3-7e5a-46e2-8949-e00bfac0fbd0%40googlegroups.com
 . 
For more options, visit https://groups.google.com/groups/opt_out . 

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/549109965.4863727.1386194590631.JavaMail.root%40sz0126a.westchester.pa.mail.comcast.net.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: dependency injection in puppet

2013-12-04 Thread David Portabella
> so if you feel your module has too many arguments, adjust the pattern but 
try to 
> understand why it recommends what it does and try to stay within the 
overall goals 

sure, and again, what i like about it is that it allows to have two apps, 
myapp1, 
and myapp2, which uses two differents $jmxtrans_outputs.


you mean something like this?
again, this does not allow to have two apps, myapp1, and myapp2, with two 
differents $jmxtrans::outputs.

node 'mynode' {
  $tomcat_conf = {
hostname => 'host1.example.com',
port => 8080,
jmx_port => 9200,
jmx_username => 'my_tomcat_jmx_username',
jmx_password => 'my_tomcat_jmx_password',
  }

  class {jmxtrans::output:
host  => 'graphite_dev.example.com',
port  => 2003,
username  => 'my_graphite_username',
password  => 'my_graphite_password',
  }

  class { myapp: 
tomcat_conf   => $tomcat_conf,
market=> 'US',
products  => ['p1', 'p2', 'p3']
  }
}

class myapp($tomcat_conf, $market, $products) {
  # it installs several packages, as tomcat, imagemagick... and 
configuration files...

  class { tomcat: 
tomcat_conf  => $tomcat_conf,
  }

  # package { imagemagik: ensure => installed }

  # ...
}


class tomcat($tomcat_conf) {
  # package { tomcat: ensure => installed }
  # config file, using $tomcat_conf.{hostname, port, jmx_port, 
jmx_username, jmx_password}
  #...

  $tomcat_jmx = {
host  => $tomcat_conf[hostname],
port  => $tomcat_conf[jmx_port],
username  => $tomcat_conf[jmx_username],
password  => $tomcat_conf[jmx_password],
  }

  jmxtrans::connection { $name:
input=> $tomcat_jmx,
template_source  => "myapp/tomcat_jmxtrans.json.erb",
#   require => Class[jmxtrans]
  }
}


# todo: replace $template_source with $objects (the objects to be 
monitored, instead of passing a full template)
define jmxtrans::connection ($input, $template_source) {
  notify {"jmxtrans::connection::input: $input": }
  notify {"jmxtrans::connection::output: $jmxtrans::output": }

  file { "/tmp/jmxtrans_${hostname}_${name}.json":
content => "template that uses \ninput_host: 
${input[host]}\ninput_port: ${input[port]}\ninput_username: 
${input[username]}\ninput_password: ${input[password]}\noutput_host: 
${jmxtrans::output[host]}\noutput_port: 
${jmxtrans::output[port]}\noutput_username: 
${jmxtrans::output[username]}\noutput_password: 
${jmxtrans::output[password]}\n",
#   content => template(template_source),
  }
}

class jmxtrans::output ($host, $port, $username, $password) {
}




On Wednesday, December 4, 2013 10:42:39 PM UTC+1, R.I. Pienaar wrote:
>
>
>
> - Original Message - 
> > From: "David Portabella" > 
> > To: puppet...@googlegroups.com  
> > Sent: Wednesday, December 4, 2013 9:35:05 PM 
> > Subject: [Puppet Users] Re: dependency injection in puppet 
> > 
> > calling hiera from inside jmxtrans::connection would contradict the 
> > argument: 
> >   "modules that have configuration should be configurable in a single 
> way 
> > and single place", 
> > explained here: 
> > 
> http://www.devco.net/archives/2012/12/13/simple-puppet-module-structure-redux.php
>  
>
> It also says: 
>
> "As before I will show a simple module for a common scenario. Rather than 
>  considering this module a blueprint for every module out there you should 
>  instead study its design and use it as a starting point when writing your 
>  own modules. You can build on it and adapt it but the basic approach 
> should 
>  translate well to more complex modules." 
>
> so if you feel your module has too many arguments, adjust the pattern but 
> try to 
> understand why it recommends what it does and try to stay within the 
> overall goals 
>
>
> you do not need to pass in all the arguments, your inner modules can 
> reference 
> like $jmxtrans::foo for example this removes a lot of the duplication if 
> you 
> go this route. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/15579f6d-30d2-4237-a02a-855e7db8d2d8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: puppetdb: how to install using the system ruby 1.9.3-p484

2013-12-04 Thread Moses Mendoza
If you installed puppet originally using ruby 1.8.7, then all of your
gems, including puppet, will be in the ruby 1.8.7 gem home, and all
the binaries, including puppet, that were created by rubygems will be
pointing there. Since you built ruby 1.9.3 from source, perhaps you
have a separate 'gem' executable in $PREFIX/bin ($PREFIX being what
you passed to `configure` ruby) since 1.9.3 ships with rubygems
built-in. Long story short, reinstalling your gems using your new ruby
1.9.3 gem executable will cause the new puppet gem (and all new 1.9.3
rubygems) to use ruby 1.9.3. Note that unless you remove them, your
1.8.7 ruby, rubygems, and all 1.8.7 installed gems will still exist.

On Wed, Dec 4, 2013 at 12:33 PM, machete  wrote:
> gem list:
>
> gem list
>
> *** LOCAL GEMS ***
>
> bigdecimal (1.1.0)
> bundler (1.3.5)
> daemon_controller (1.1.7)
> facter (1.7.3)
> hiera (1.3.0)
> io-console (0.3)
> json (1.5.5)
> json_pure (1.8.1)
> minitest (2.5.1)
> passenger (4.0.17)
> puppet (3.3.2)
> rack (1.5.2)
> rake (0.9.2.2)
> rdoc (3.9.5)
> rgen (0.6.6)
>
>
>
>
> On Wednesday, December 4, 2013 3:31:26 PM UTC-5, machete wrote:
>>
>> Hey Moses,
>>
>> Thanks for the quick response.
>>
>> Puppet was install via ruby gem ... I know, but it is so easy.
>> Ruby/rubygem are running from source.
>> OS is CentOS 6.4 Linux puppetdb 2.6.32-71.el6.x86_64 #1 SMP Fri May 20
>> 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
>>
>>
>> On Wednesday, December 4, 2013 3:22:56 PM UTC-5, Moses Mendoza wrote:
>>>
>>> How did you install puppet originally? Are you running from packages,
>>> rubygem, or running from source, or some other method?
>>>
>>> On Wed, Dec 4, 2013 at 11:58 AM, machete  wrote:
>>> > Hey what gives ... ? ;)
>>> >
>>> > I've got a shiny new install of ruby 1.9.3-p484 ... and my 'sudo puppet
>>> > resource package puppetdb ensure=latest' loads ruby 1.8.7 
>>> >
>>> > Would someone please point me to the instructions ( or share ) on how
>>> > to get
>>> > my 'sudo puppet resource package puppetdb ensure=latest' to use my ruby
>>> > 1.9.3-p484?
>>> >
>>> > ~> ruby -v
>>> > ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
>>> > ~> puppet -V
>>> > 3.3.2
>>> >
>>> >
>>> > Cheers,
>>> >
>>> > t
>>> >
>>> > --
>>> > You received this message because you are subscribed 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/4015678f-f943-4de1-8640-52caa7592f31%40googlegroups.com.
>>> >
>>> > For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>> --
>>> Moses Mendoza
>>> Puppet Labs
>>>
>>> Join us at PuppetConf 2014, September 23-24 in San Francisco
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/f1c72cad-09f0-4a17-8f92-7f6e09995f46%40googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
Moses Mendoza
Puppet Labs

Join us at PuppetConf 2014, September 23-24 in San Francisco

-- 
You received this message because you are subscribed to the Google Groups 
"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/CA%2B421WbBMq8C-AUkN2j_gH%3DJKAz6XRr11L1g0UGFaTCYZdmfww%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: dependency injection in puppet

2013-12-04 Thread R.I.Pienaar


- Original Message -
> From: "David Portabella" 
> To: puppet-users@googlegroups.com
> Sent: Wednesday, December 4, 2013 9:35:05 PM
> Subject: [Puppet Users] Re: dependency injection in puppet
> 
> calling hiera from inside jmxtrans::connection would contradict the
> argument:
>   "modules that have configuration should be configurable in a single way
> and single place",
> explained here:
> http://www.devco.net/archives/2012/12/13/simple-puppet-module-structure-redux.php

It also says:

"As before I will show a simple module for a common scenario. Rather than 
 considering this module a blueprint for every module out there you should 
 instead study its design and use it as a starting point when writing your 
 own modules. You can build on it and adapt it but the basic approach should 
 translate well to more complex modules."

so if you feel your module has too many arguments, adjust the pattern but try to
understand why it recommends what it does and try to stay within the overall 
goals


you do not need to pass in all the arguments, your inner modules can reference
like $jmxtrans::foo for example this removes a lot of the duplication if you
go this route.

-- 
You received this message because you are subscribed to the Google Groups 
"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/600648432.1620.1386193359078.JavaMail.zimbra%40devco.net.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: dependency injection in puppet

2013-12-04 Thread David Portabella
calling hiera from inside jmxtrans::connection would contradict the 
argument:
  "modules that have configuration should be configurable in a single way 
and single place",
explained here: 
http://www.devco.net/archives/2012/12/13/simple-puppet-module-structure-redux.php

I agree with that argument, because it makes clear what parameters a class 
needs,
and it makes it easier to unit test,
and it allows to have two apps, myapp1, and myapp2, which uses two 
differents $jmxtrans_outputs.

and that's not with case calling hiera from inside jmxtrans::connection.


On Wednesday, December 4, 2013 10:26:11 PM UTC+1, jcbollinger wrote:
>
>
>
> On Wednesday, December 4, 2013 11:48:50 AM UTC-6, David Portabella wrote:
>>
>> Here: 
>> http://www.devco.net/archives/2012/12/13/simple-puppet-module-structure-redux.php
>> it explains that "modules that have configuration should be configurable 
>> in a single way and single place",
>> and I agree.
>>
>> However, as configuration grows in complexity, this means that the entry 
>> point would have an enourmous list of parameters,
>> that need to be propagated down to its dependencies.
>> for instance, myapp takes a $jmxtrans_output, which it passes to tomcat, 
>> which it passes to jmxtrans::connection.
>> and if I have more dependencies like this one, myapp would not take 4 
>> parameters, but far too many.
>>
>> what is a proper way to inject $jmxtrans_output to jmxtrans::connection 
>> without requiring to declare it in myapp nor tomcat?
>>
>> I could declare to do $jmxtrans_output a global variable, but that is 
>> ugly.
>> what if I have myapp1, and myapp2, which uses two differents 
>> $jmxtrans_output?
>>
>>
>
> You are running into one of the lesser evils of parameterized classes: 
> they can lead you down the path of trying to push all your configuration 
> data in at the front end.  You should be writing classes that pull their 
> configuration data from hiera or another external source, so that your 
> classes do not normally need to accept data that is intended only to be 
> passed on to other classes.  Instead, each class pulls its own data and/or 
> relies on data belonging to other classes and pulled by those.
>
> Indeed, I have long argued, for a variety of reasons, that although 
> parameterized classes themselves are not inherently harmful, you should 
> avoid declaring them via parameterized-style class declarations (leaving 
> you relying on automated data binding for class parameter customization).
>
>
> 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/04b8f22b-c263-4123-bd73-e7402d6a2016%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] external node classifier with a back-end

2013-12-04 Thread Stuart Cracraft

Hi everybody!

Anyone have a back-ended external node classifier to a Postgres database
they could throw my way?

Stuart


-- 
You received this message because you are subscribed to the Google Groups 
"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/7781bed3-7e5a-46e2-8949-e00bfac0fbd0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet fails on aws instance using ruby19 yum install

2013-12-04 Thread Alexander Gray II

>
> same here.  if anyone has an update, please post here.  Thanks.
>>
>

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


[Puppet Users] Re: dependency injection in puppet

2013-12-04 Thread jcbollinger


On Wednesday, December 4, 2013 11:48:50 AM UTC-6, David Portabella wrote:
>
> Here: 
> http://www.devco.net/archives/2012/12/13/simple-puppet-module-structure-redux.php
> it explains that "modules that have configuration should be configurable 
> in a single way and single place",
> and I agree.
>
> However, as configuration grows in complexity, this means that the entry 
> point would have an enourmous list of parameters,
> that need to be propagated down to its dependencies.
> for instance, myapp takes a $jmxtrans_output, which it passes to tomcat, 
> which it passes to jmxtrans::connection.
> and if I have more dependencies like this one, myapp would not take 4 
> parameters, but far too many.
>
> what is a proper way to inject $jmxtrans_output to jmxtrans::connection 
> without requiring to declare it in myapp nor tomcat?
>
> I could declare to do $jmxtrans_output a global variable, but that is ugly.
> what if I have myapp1, and myapp2, which uses two differents 
> $jmxtrans_output?
>
>

You are running into one of the lesser evils of parameterized classes: they 
can lead you down the path of trying to push all your configuration data in 
at the front end.  You should be writing classes that pull their 
configuration data from hiera or another external source, so that your 
classes do not normally need to accept data that is intended only to be 
passed on to other classes.  Instead, each class pulls its own data and/or 
relies on data belonging to other classes and pulled by those.

Indeed, I have long argued, for a variety of reasons, that although 
parameterized classes themselves are not inherently harmful, you should 
avoid declaring them via parameterized-style class declarations (leaving 
you relying on automated data binding for class parameter customization).


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/2a0937e8-9828-4068-ba64-e389794d321e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: templates as static files

2013-12-04 Thread Fabio Sangiovanni
hi john,
thank you very much for your exaustive answer. I'll meditate a little more on 
the matter, but I think the differences between the two parameters are more 
than clear to me now.

thanks again! 

-- 
You received this message because you are subscribed to the Google Groups 
"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/5e87c2d2-2eb9-40d3-85d8-26e9464e09dd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet fails on aws instance using ruby19 yum install

2013-12-04 Thread Glenn Poston
I'm having the exact same issue.  Anyone had success with puppet 3 ruby19 
and Amazon linux?  Any help?

On Monday, October 7, 2013 11:27:41 AM UTC-4, Robert Logan wrote:
>
>
> I've been trying to use the ruby19 and rubygems19 packages from amazons 
> yum repo but cant get around this issue:
>
> [root@ip-10-234-225-44 ~]# puppetd --test
> /usr/share/rubygems1.9/rubygems/custom_require.rb:36:in `require': cannot 
> load such file -- puppet/application/agent (LoadError)
> from /usr/share/rubygems1.9/rubygems/custom_require.rb:36:in 
> `require'
> from /usr/sbin/puppetd:3:in `'
>
> The above occurs using the amazon repo puppet install (2.7.23) at time of 
> writing, and the puppetlabs yum repo below is the same ..
>
> [root@ip-10-234-225-44 ~]# puppet agent --test
> /usr/share/rubygems1.9/rubygems/custom_require.rb:36:in `require': cannot 
> load such file -- puppet/util/command_line (LoadError)
> from /usr/share/rubygems1.9/rubygems/custom_require.rb:36:in 
> `require'
> from /usr/bin/puppet:3:in `'
>
>
> [root@ip-10-234-225-44 ~]# ruby --version
> ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]
> [root@ip-10-234-225-44 ~]# ruby -e 'puts $:'
> /usr/local/share/ruby19/site_ruby
> /usr/local/lib64/ruby19/site_ruby
> /usr/share/ruby/1.9/vendor_ruby
> /usr/lib64/ruby/1.9/vendor_ruby
> /usr/share/rubygems1.9
> /usr/share/ruby/1.9
> /usr/lib64/ruby/1.9
>
> Does anyone have any ideas on this?
>
>
> --
>
> The information in this email is confidential and may be legally 
> privileged.  It is intended solely for the addressee.  Access to this email 
> by anyone else is unauthorised.  If you are not the intended recipient, any 
> disclosure, copying, distribution or any action taken or omitted to be 
> taken in reliance on it, is prohibited and may be unlawful.
>  
> Policy Expert is a trading name of QMetric Group Limited who is authorised 
> and regulated by the Financial Services Authority.  The registered company 
> address of QMetric Group Limited is: 32-38 Dukes Place, London, EC3A 7LP 
> and its company registration number is 07151701.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/0d7b5592-015c-4fb9-ac48-dd6ed86c00b5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: templates as static files

2013-12-04 Thread jcbollinger


On Wednesday, December 4, 2013 12:33:13 PM UTC-6, Fabio Sangiovanni wrote:
>
> hi everyone, 
>
> are there any side effects in using only templates in a module, even when 
> they have just static content? It would be helpful in having less 
> direcories around to look into when dealing with file contents, especially 
> when using hiera as storage for 'source' and 'content' values for file 
> resources. It just seems more tidy to me not to have a mix of static files 
> and templates in a module, comsidering that templates can be a "superset" 
> of the former. 
>
>
The value of a File resource's 'content' property (by which the templated 
output is delivered) is the actual file content, whereas the 'source' 
parameter just contains a URL pointing to the desired content.  Each format 
has both advantages and disadvantages in that area.

Also, templates put far more load on your master for catalog compilation 
than the alternative, even when the template is all-static.  That will tend 
to reduce the catalog-serving capacity of your master, though it may be 
partially offset by the time required later to serve up 'source'd Files.

The 'source' parameter can reference other files available via the target 
node's filesystem (including network shares); there is no analog for 
templates.

Templates do not support 'recursive' File resources.

The template() function will concatenate the output of multiple templates, 
if given, whereas multiple File 'source's constitute prioritized 
alternatives.

The template() function is not a good choice for binary files.

Overall, I think it would be best to say that although specifying File 
'content', possibly via a template, and specifying a File 'source' can 
ultimately produce the same plain file on the target node, 'content' +- 
template() is *not* a superset of 'source'.  Even where the two have 
overlapping applicability, it is not immediately clear to me that a policy 
of always choosing 'content' is wise.  I think that as a module developer, 
you should make an informed decision on a case-by-case basis as to which to 
use.  I do not find the tidiness argument persuasive.


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/cbe7cc83-09b5-4063-82ba-dec335e99f3a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: puppetdb: how to install using the system ruby 1.9.3-p484

2013-12-04 Thread machete
gem list:

gem list

*** LOCAL GEMS ***

bigdecimal (1.1.0)
bundler (1.3.5)
daemon_controller (1.1.7)
facter (1.7.3)
hiera (1.3.0)
io-console (0.3)
json (1.5.5)
json_pure (1.8.1)
minitest (2.5.1)
passenger (4.0.17)
puppet (3.3.2)
rack (1.5.2)
rake (0.9.2.2)
rdoc (3.9.5)
rgen (0.6.6)




On Wednesday, December 4, 2013 3:31:26 PM UTC-5, machete wrote:
>
> Hey Moses,
>
> Thanks for the quick response. 
>
> Puppet was install via ruby gem ... I know, but it is so easy.
> Ruby/rubygem are running from source. 
> OS is CentOS 6.4 Linux puppetdb 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 
> 03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
>
>
> On Wednesday, December 4, 2013 3:22:56 PM UTC-5, Moses Mendoza wrote:
>>
>> How did you install puppet originally? Are you running from packages, 
>> rubygem, or running from source, or some other method? 
>>
>> On Wed, Dec 4, 2013 at 11:58 AM, machete  wrote: 
>> > Hey what gives ... ? ;) 
>> > 
>> > I've got a shiny new install of ruby 1.9.3-p484 ... and my 'sudo puppet 
>> > resource package puppetdb ensure=latest' loads ruby 1.8.7  
>> > 
>> > Would someone please point me to the instructions ( or share ) on how 
>> to get 
>> > my 'sudo puppet resource package puppetdb ensure=latest' to use my ruby 
>> > 1.9.3-p484? 
>> > 
>> > ~> ruby -v 
>> > ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux] 
>> > ~> puppet -V 
>> > 3.3.2 
>> > 
>> > 
>> > Cheers, 
>> > 
>> > t 
>> > 
>> > -- 
>> > You received this message because you are subscribed 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/4015678f-f943-4de1-8640-52caa7592f31%40googlegroups.com.
>>  
>>
>> > 
>> > For more options, visit https://groups.google.com/groups/opt_out. 
>>
>>
>>
>> -- 
>> Moses Mendoza 
>> Puppet Labs 
>>
>> Join us at PuppetConf 2014, September 23-24 in San Francisco 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/f1c72cad-09f0-4a17-8f92-7f6e09995f46%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: puppetdb: how to install using the system ruby 1.9.3-p484

2013-12-04 Thread machete
Hey Moses,

Thanks for the quick response. 

Puppet was install via ruby gem ... I know, but it is so easy.
Ruby/rubygem are running from source. 
OS is CentOS 6.4 Linux puppetdb 2.6.32-71.el6.x86_64 #1 SMP Fri May 20 
03:51:51 BST 2011 x86_64 x86_64 x86_64 GNU/Linux


On Wednesday, December 4, 2013 3:22:56 PM UTC-5, Moses Mendoza wrote:
>
> How did you install puppet originally? Are you running from packages, 
> rubygem, or running from source, or some other method? 
>
> On Wed, Dec 4, 2013 at 11:58 AM, machete > 
> wrote: 
> > Hey what gives ... ? ;) 
> > 
> > I've got a shiny new install of ruby 1.9.3-p484 ... and my 'sudo puppet 
> > resource package puppetdb ensure=latest' loads ruby 1.8.7  
> > 
> > Would someone please point me to the instructions ( or share ) on how to 
> get 
> > my 'sudo puppet resource package puppetdb ensure=latest' to use my ruby 
> > 1.9.3-p484? 
> > 
> > ~> ruby -v 
> > ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux] 
> > ~> puppet -V 
> > 3.3.2 
> > 
> > 
> > Cheers, 
> > 
> > t 
> > 
> > -- 
> > You received this message because you are subscribed 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/4015678f-f943-4de1-8640-52caa7592f31%40googlegroups.com.
>  
>
> > 
> > For more options, visit https://groups.google.com/groups/opt_out. 
>
>
>
> -- 
> Moses Mendoza 
> Puppet Labs 
>
> Join us at PuppetConf 2014, September 23-24 in San Francisco 
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/30bbf00d-d474-43a1-9557-0f46840f35d3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: puppetdb: how to install using the system ruby 1.9.3-p484

2013-12-04 Thread Moses Mendoza
How did you install puppet originally? Are you running from packages,
rubygem, or running from source, or some other method?

On Wed, Dec 4, 2013 at 11:58 AM, machete  wrote:
> Hey what gives ... ? ;)
>
> I've got a shiny new install of ruby 1.9.3-p484 ... and my 'sudo puppet
> resource package puppetdb ensure=latest' loads ruby 1.8.7 
>
> Would someone please point me to the instructions ( or share ) on how to get
> my 'sudo puppet resource package puppetdb ensure=latest' to use my ruby
> 1.9.3-p484?
>
> ~> ruby -v
> ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
> ~> puppet -V
> 3.3.2
>
>
> Cheers,
>
> t
>
> --
> You received this message because you are subscribed to the Google Groups
> "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/4015678f-f943-4de1-8640-52caa7592f31%40googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.



-- 
Moses Mendoza
Puppet Labs

Join us at PuppetConf 2014, September 23-24 in San Francisco

-- 
You received this message because you are subscribed to the Google Groups 
"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/CA%2B421WY-GknrCpQfAKzei8Emtg1y21TDNxn5FRAEQ8YY-oyERg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: puppetdb: how to install using the system ruby 1.9.3-p484

2013-12-04 Thread machete
Hey what gives ... ? ;) 

I've got a shiny new install of ruby 1.9.3-p484 ... and my 'sudo puppet 
resource package puppetdb ensure=latest' loads ruby 1.8.7 

Would someone please point me to the instructions ( or share ) on how to 
get my 'sudo puppet resource package puppetdb ensure=latest' to use my ruby 
1.9.3-p484?

~> ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
~> puppet -V
3.3.2


Cheers,

t

-- 
You received this message because you are subscribed to the Google Groups 
"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/4015678f-f943-4de1-8640-52caa7592f31%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: external node classifiers

2013-12-04 Thread Stuart Cracraft
Chapter 5 at page 119 in the Pro Puppet book of 2011 by Turnbull/McCune 
has good explanation and scripts, in Shell, Perl, Ruby.

On Tuesday, December 3, 2013 3:50:47 PM UTC-8, Stuart Cracraft wrote:

> Hi,
>
> I'd like to use ENC::
>
>   http://docs.puppetlabs.com/guides/external_nodes.html
>
> to keep hardwired customizations away from our classes and other files as 
> much as possible
> particularly for the node name, but potentially as esoteric as a machine 
> configuration, file
> permission, service name, etc - to keep the classes as flexible and 
> general as possible.
>
> My questions:
>
>   + have you done the above?
>   + what were your learnings
>   + do you have sample puppet_node_classifier's you can share?
>   + how to use the definitions from ENC via the pm's puppet.conf's linkage 
> to the ENC
>
>[main]
>:
>node_terminus = exec
>external_nodes = /usr/local/bin/puppet_node_classifier
>:
>
> My current question is how do you use the ENC definitions within the 
> classes?
>
> Is this adequately described in-depth in the yet-to-be-published Puppet 
> book?
>
> Stuart
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/30c4f26c-9fec-4419-a9ab-674c0cefc7aa%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: puppetdb: how to install using the system ruby 1.9.3-p484

2013-12-04 Thread machete
Sorry if that was a vague request .. Here is some more details on the 
env...:


~> ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
~> puppet -V
3.3.2


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


[Puppet Users] puppetdb: how to install using the system ruby 1.9.3-p484

2013-12-04 Thread machete


Hey what gives ... ? ;) 

I've got a shiny new install of ruby 1.9.3-p484 ... and my 'sudo puppet 
resource package puppetdb ensure=latest' loads ruby 1.8.7 

Would some please point me to the instruction ( or share ) on how to get my 
'sudo puppet resource package puppetdb ensure=latest' to use my ruby 
1.9.3-p484?


Cheers,

t

-- 
You received this message because you are subscribed to the Google Groups 
"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/28ec253d-8c6c-4436-9dd9-99a99409ea4e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Question about Hiera...

2013-12-04 Thread Jerald Sheets
If I'm finding Hiera unnecessarily obtuse and the PuppetLabs documentation
(after dredging through the docs literally all morning) similarly
confusing, where could I look to find more clarity and quality tutorial or
instruction in the Hiera product?



---
Jerald M. Sheets jr.

-- 
You received this message because you are subscribed to the Google Groups 
"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/CAAE6QHz2JDmB%2B%2BRM9uU7%2BKmB6CwphH4AKz_yo3J3D1tw%3D%3D1MuA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Puppet Master accepting request without certificates

2013-12-04 Thread kaustubh chaudhari
Ok,

I understood my doubts partially!

When we uninstall puppet agent from windows box, it will not delete the APP 
Data folder for puppet which contains the certificates, to generate new 
certificate request you need to uninstall puppet agent and delete this 
directory.

Further, i understood that puppetdb will deactivate the nodes but it will 
not delete/purge it, to purge we need set "node-purge-ttl" in the puppetdb 
config.

What i was not able to understand is if i have removed the agent 
certificates from the puppet master "puppet cert clean wintest" why the 
request is getting accepted by master?

Can someone please help me to understand this!

-Kaustubh
On Wednesday, December 4, 2013 1:28:26 PM UTC-5, kaustubh chaudhari wrote:
>
> Hi,
>
> Auto sign is not configured.
>
> 1. installed puppet agent on a windows box.
> 2. accepted the certificate
> 3. uninstalled puppet agent from the windows box.
> 4. puppet cert clean "wintest"
> 5. puppet node clean "wintest"
> 6 puppet node deactivate "wintest"
>
> 7. install puppet agent on windows box(did no modification to windows box 
> except reboot)
> 8. puppet agent --test (on wintest)
>
> Puppet master accepts the connections without asking for certs, Puppetdb 
> accepts the facts and reports for this node without hesitation.
>
> ==
> 2013-12-04 13:01:17,274 INFO  [command-proc-51] [puppetdb.command] 
> [393a2937-5df1-4972-87ca-6f5f59170911] [deactivate node] wintest
> 2013-12-04 13:02:16,410 INFO  [command-proc-52] [puppetdb.command] 
> [beb89340-2ef5-473b-9e2e-cd9defada826] [replace facts] wintest
> 2013-12-04 13:02:16,770 INFO  [command-proc-51] [puppetdb.command] 
> [7b45f94d-367a-4ccc-959c-6a3e086f0911] [replace catalog] wintest
> 2013-12-04 13:02:17,340 INFO  [command-proc-52] [puppetdb.command] 
> [31a82ba2-7ede-4252-90d2-6a45984c257b] [store report] puppet v3.3.2 - 
> wintest
> ==
>
> This is so weird, how is this happening? 
>
> Did some one face this issue, can someone help me understand this behavior.
>
> How do i make sure that once deactivate/cleaned from puppet master certs 
> removed, net puppet run should ask for the cert request.
>
> -Kaustubh
>

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


[Puppet Users] templates as static files

2013-12-04 Thread Fabio Sangiovanni
hi everyone, 

are there any side effects in using only templates in a module, even when they 
have just static content? It would be helpful in having less direcories around 
to look into when dealing with file contents, especially when using hiera as 
storage for 'source' and 'content' values for file resources. It just seems 
more tidy to me not to have a mix of static files and templates in a module, 
comsidering that templates can be a "superset" of the former. 
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/7a053d2b-c3fc-4efe-b696-7e8c60816bc5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppet Master accepting request without certificates

2013-12-04 Thread kaustubh chaudhari
Hi,

Auto sign is not configured.

1. installed puppet agent on a windows box.
2. accepted the certificate
3. uninstalled puppet agent from the windows box.
4. puppet cert clean "wintest"
5. puppet node clean "wintest"
6 puppet node deactivate "wintest"

7. install puppet agent on windows box(did no modification to windows box 
except reboot)
8. puppet agent --test (on wintest)

Puppet master accepts the connections without asking for certs, Puppetdb 
accepts the facts and reports for this node without hesitation.

==
2013-12-04 13:01:17,274 INFO  [command-proc-51] [puppetdb.command] 
[393a2937-5df1-4972-87ca-6f5f59170911] [deactivate node] wintest
2013-12-04 13:02:16,410 INFO  [command-proc-52] [puppetdb.command] 
[beb89340-2ef5-473b-9e2e-cd9defada826] [replace facts] wintest
2013-12-04 13:02:16,770 INFO  [command-proc-51] [puppetdb.command] 
[7b45f94d-367a-4ccc-959c-6a3e086f0911] [replace catalog] wintest
2013-12-04 13:02:17,340 INFO  [command-proc-52] [puppetdb.command] 
[31a82ba2-7ede-4252-90d2-6a45984c257b] [store report] puppet v3.3.2 - 
wintest
==

This is so weird, how is this happening? 

Did some one face this issue, can someone help me understand this behavior.

How do i make sure that once deactivate/cleaned from puppet master certs 
removed, net puppet run should ask for the cert request.

-Kaustubh

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


[Puppet Users] dependency injection in puppet

2013-12-04 Thread David Portabella
Here: 
http://www.devco.net/archives/2012/12/13/simple-puppet-module-structure-redux.php
it explains that "modules that have configuration should be configurable in 
a single way and single place",
and I agree.

However, as configuration grows in complexity, this means that the entry 
point would have an enourmous list of parameters,
that need to be propagated down to its dependencies.
for instance, myapp takes a $jmxtrans_output, which it passes to tomcat, 
which it passes to jmxtrans::connection.
and if I have more dependencies like this one, myapp would not take 4 
parameters, but far too many.

what is a proper way to inject $jmxtrans_output to jmxtrans::connection 
without requiring to declare it in myapp nor tomcat?

I could declare to do $jmxtrans_output a global variable, but that is ugly.
what if I have myapp1, and myapp2, which uses two differents 
$jmxtrans_output?


node 'mynode' {
  $tomcat_conf = {
hostname => 'host1.example.com',
port => 8080,
jmx_port => 9200,
jmx_username => 'my_tomcat_jmx_username',
jmx_password => 'my_tomcat_jmx_password',
  }

  $jmxtrans_output = {
host  => 'graphite_dev.example.com',
port  => 2003,
username  => 'my_graphite_username',
password  => 'my_graphite_password',
  }

  class { myapp: 
tomcat_conf   => $tomcat_conf,
jmxtrans_output   => $jmxtrans_output,
market=> 'US',
products  => ['p1', 'p2', 'p3']
  }
}

class myapp($tomcat_conf, $jmxtrans_output, $market, $products) {
  # it installs several packages, as tomcat, imagemagick... and 
configuration files...

  class { tomcat: 
tomcat_conf  => $tomcat_conf,
jmxtrans_output  => $jmxtrans_output,
  }

  # package { imagemagik: ensure => installed }

  # ...
}


class tomcat($tomcat_conf, $jmxtrans_output) {
  # package { tomcat: ensure => installed }
  # config file, using $tomcat_conf.{hostname, port, jmx_port, 
jmx_username, jmx_password}
  #...

  $tomcat_jmx = {
host  => $tomcat_conf[hostname],
port  => $tomcat_conf[jmx_port],
username  => $tomcat_conf[jmx_username],
password  => $tomcat_conf[jmx_password],
  }

  jmxtrans::connection { $name:
input=> $tomcat_jmx,
output   => $jmxtrans_output,
template_source  => "myapp/tomcat_jmxtrans.json.erb",
#   require => Class[jmxtrans]
  }
}


# todo: replace $template_source with $objects (the objects to be 
monitored, instead of passing a full template)
define jmxtrans::connection ($input, $output, $template_source) {
  notify {"jmxtrans::connection::input: $input": }
  notify {"jmxtrans::connection::output: $output": }

  file { "/tmp/jmxtrans_${hostname}_${name}.json":
content => "template that uses \ninput_host: 
${input[host]}\ninput_port: ${input[port]}\ninput_username: 
${input[username]}\ninput_password: ${input[password]}\noutput_host: 
${output[host]}\noutput_port: ${output[port]}\noutput_username: 
${output[username]}\noutput_password: ${output[password]}\n",
#   content => template(template_source),
  }
}


-- 
You received this message because you are subscribed to the Google Groups 
"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/1e11d0f5-0b85-404a-a71c-e76fcce80eb1%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: MySQL server install with datadir != /var/lib/mysql

2013-12-04 Thread Thomas
I agree and was thinking along those lines as well.

For those interested vicinus (on github)  has 
started this and has it working on Ubuntu. See 
https://github.com/puppetlabs/puppetlabs-mysql/issues/380 for 
details
.



On Wednesday, December 4, 2013 11:04:49 AM UTC-5, Walter Heck wrote:
>
> What you could do is let yum just start and install it's stuff in 
> /var/lib/mysql. Then an exec of mysql_install_db with an onlyif attribute 
> that checks for the mysql metadata in /data/mysql.
>
>
> On Wed, Dec 4, 2013 at 4:02 PM, Thomas 
> > wrote:
>
>> Yes it might be tricky to integrate it but I think this would be a useful 
>> enhancement. 
>>
>>
>> On Wednesday, December 4, 2013 7:38:46 AM UTC-5, Luke Bigum wrote:
>>>
>>> It should be theoretically possible. The mysql-server package owns 
>>> /var/lib/mysql, but it is the mysql_install_db script that sets up an empty 
>>> database in $datadir when the service starts if $datadir is empty. If you 
>>> update your config file before you start the mysql server, you should be 
>>> able to point it at any datadir you like. It will leave an empty directory 
>>> at /var/lib/mysql, but hopefully you are ok with that as it's owned by an 
>>> RPM.
>>>
>>> I had a quick look at the module, /var/lib/mysql is hard coded in a lot 
>>> of places and you'd have to override / set most of them as well as in 
>>> my.cnf:
>>>
>>> $ grep -R '/var/lib/mysql' *
>>> manifests/params.pp:  $datadir   = '/var/lib/mysql'
>>> manifests/params.pp:  $socket= 
>>> '/var/lib/mysql/mysql.sock'
>>> manifests/params.pp:  $datadir   = '/var/lib/mysql'
>>> manifests/params.pp:/(SLES|SLED)/=> 
>>> '/var/lib/mysql/mysql.sock',
>>> manifests/params.pp:/(SLES|SLED)/=> 
>>> '/var/lib/mysql/mysqld.pid',
>>> manifests/params.pp:  $datadir  = '/var/lib/mysql'
>>> manifests/params.pp:  $datadir   = '/var/lib/mysql'
>>> manifests/params.pp:  $socket= 
>>> '/var/lib/mysql/mysql.sock'
>>>
>>>
>>> On Wednesday, December 4, 2013 12:30:31 PM UTC, Walter Heck wrote:

 Tried and failed. The problem is that the mysql package automatically 
 uses /var/lib/mysql, so the right sequence is:

 1) yum install mysql-server
 2) service mysqld stop
 3) adjust my.cnf
 4) make moves on filesystem if needed
 5) service mysqld start
 (steps 2 and 3 can be reversed)

 This is hard to puppetise as it is only needed the very first time when 
 mysql is not yet installed. I've only ever had to do this on smaller 
 groups 
 of servers at a time, so always resorted to doing it manually.

 let me know if you figure it out, would be great to see a solution in 
 puppetlabs-mysql.


 On Wednesday, 4 December 2013 02:39:50 UTC+1, Thomas wrote:
>
> Has anybody sucessfully used puppetlabs-mysql (or some other method) 
> to install MySQL-server on Linux with a my.cnf where datadir != 
> /var/lib/mysql ?
>
   -- 
>> 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/mkQygmpa610/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> puppet-users...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/c274653e-dc52-4f18-8908-59024b2450dd%40googlegroups.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> Walter Heck
>
> --
> Check out my startup: Puppet training and consulting @ 
> http://www.olindata.com
> Follow @olindata on Twitter and/or 'Like' our Facebook page at 
> http://www.facebook.com/olindata 
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/6fce8c93-b784-4cf1-85b6-ea9dffba0ae7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: MySQL server install with datadir != /var/lib/mysql

2013-12-04 Thread Walter Heck
What you could do is let yum just start and install it's stuff in
/var/lib/mysql. Then an exec of mysql_install_db with an onlyif attribute
that checks for the mysql metadata in /data/mysql.


On Wed, Dec 4, 2013 at 4:02 PM, Thomas  wrote:

> Yes it might be tricky to integrate it but I think this would be a useful
> enhancement.
>
>
> On Wednesday, December 4, 2013 7:38:46 AM UTC-5, Luke Bigum wrote:
>>
>> It should be theoretically possible. The mysql-server package owns
>> /var/lib/mysql, but it is the mysql_install_db script that sets up an empty
>> database in $datadir when the service starts if $datadir is empty. If you
>> update your config file before you start the mysql server, you should be
>> able to point it at any datadir you like. It will leave an empty directory
>> at /var/lib/mysql, but hopefully you are ok with that as it's owned by an
>> RPM.
>>
>> I had a quick look at the module, /var/lib/mysql is hard coded in a lot
>> of places and you'd have to override / set most of them as well as in
>> my.cnf:
>>
>> $ grep -R '/var/lib/mysql' *
>> manifests/params.pp:  $datadir   = '/var/lib/mysql'
>> manifests/params.pp:  $socket=
>> '/var/lib/mysql/mysql.sock'
>> manifests/params.pp:  $datadir   = '/var/lib/mysql'
>> manifests/params.pp:/(SLES|SLED)/=>
>> '/var/lib/mysql/mysql.sock',
>> manifests/params.pp:/(SLES|SLED)/=>
>> '/var/lib/mysql/mysqld.pid',
>> manifests/params.pp:  $datadir  = '/var/lib/mysql'
>> manifests/params.pp:  $datadir   = '/var/lib/mysql'
>> manifests/params.pp:  $socket=
>> '/var/lib/mysql/mysql.sock'
>>
>>
>> On Wednesday, December 4, 2013 12:30:31 PM UTC, Walter Heck wrote:
>>>
>>> Tried and failed. The problem is that the mysql package automatically
>>> uses /var/lib/mysql, so the right sequence is:
>>>
>>> 1) yum install mysql-server
>>> 2) service mysqld stop
>>> 3) adjust my.cnf
>>> 4) make moves on filesystem if needed
>>> 5) service mysqld start
>>> (steps 2 and 3 can be reversed)
>>>
>>> This is hard to puppetise as it is only needed the very first time when
>>> mysql is not yet installed. I've only ever had to do this on smaller groups
>>> of servers at a time, so always resorted to doing it manually.
>>>
>>> let me know if you figure it out, would be great to see a solution in
>>> puppetlabs-mysql.
>>>
>>>
>>> On Wednesday, 4 December 2013 02:39:50 UTC+1, Thomas wrote:

 Has anybody sucessfully used puppetlabs-mysql (or some other method) to
 install MySQL-server on Linux with a my.cnf where datadir != /var/lib/mysql
 ?

>>>  --
> 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/mkQygmpa610/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/c274653e-dc52-4f18-8908-59024b2450dd%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Walter Heck

--
Check out my startup: Puppet training and consulting @
http://www.olindata.com
Follow @olindata on Twitter and/or 'Like' our Facebook page at
http://www.facebook.com/olindata

-- 
You received this message because you are subscribed to the Google Groups 
"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/CAJojfjqK4uY9ePh%3DSS7HJkfMXUHLNU2g0%2B0SXeFEMt8x5yoLQw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: external node classifiers

2013-12-04 Thread jcbollinger


On Tuesday, December 3, 2013 5:50:47 PM UTC-6, Stuart Cracraft wrote:
>
> Hi,
>
> I'd like to use ENC::
>
>   http://docs.puppetlabs.com/guides/external_nodes.html
>
> to keep hardwired customizations away from our classes and other files as 
> much as possible
> particularly for the node name, but potentially as esoteric as a machine 
> configuration, file
> permission, service name, etc - to keep the classes as flexible and 
> general as possible.
>
> My questions:
>
>   + have you done the above?
>


I'd like to think that I write flexible, general classes.  That's pretty 
much orthogonal to use of an ENC, however, and in fact I do not use an 
ENC.  You are quite right, however, that a big part of making your classes 
flexible and general is to keep data out of classes -- that is, to 
externalize your data.

 

>   + what were your learnings
>   + do you have sample puppet_node_classifier's you can share?
>   + how to use the definitions from ENC via the pm's puppet.conf's linkage 
> to the ENC
>


I don't think I understand the question.  Your puppet.conf specifies the 
ENC to use.  Each time a node requests a catalog from the master, it runs 
the specified ENC program, passing the node's identifier as an argument.  
The master parses the ENC's YAML output to obtain global variable settings 
and the names of classes that should be declared for the given node, 
optionally with associated maps of class parameter values.  These may be 
supplemented by node declarations appearing in your manifests.

You don't actively "use" definitions from an ENC; rather, the master 
automatically incorporates the ENC output as a source of declarations about 
the target node.  ENCs are a non-exclusive alternative to node declarations.

If what you are looking for is simply a way to externalize data used by 
your classes, then hiera is Puppet's built-in facility supporting that.  
Open-source Puppet does not provide a GUI for hiera configuration or hiera 
data manipulation (I don't know about PE), but the general thrust of your 
questions leads me to suspect that that may not be important to you.  Hiera 
supports automatic binding of data to class parameters, but its classic 
usage mode is via a lookup function in your manifest code:

  $my_special_datum = hiera('special')

.  Thus, you can draw data from hiera without using parameterized classes 
or in addition to via automated class parameter binding, if you should wish 
to do so.

 

>
>[main]
>:
>node_terminus = exec
>external_nodes = /usr/local/bin/puppet_node_classifier
>:
>
> My current question is how do you use the ENC definitions within the 
> classes?
>
> Is this adequately described in-depth in the yet-to-be-published Puppet 
> book?
>
>

I can't speak to the content of any unpublished book, but I think the PL 
docs cover the matter pretty well already: 
http://docs.puppetlabs.com/guides/external_nodes.html.


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/0a909355-1436-4a66-91ae-5c0f755268ad%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet 2.7, template, keys of hash

2013-12-04 Thread Felix Frank
Works for me.

$ cat /tmp/test.pp
$config = {
host1 => {
   port => ,
   msg  => 'dfdasfas'
},
host2 => {
   port => ,
   msg  => 'dfdasfas'
},
  }

notify { 'test':
  message => inline_template("keys: <%= @config.keys %>")
}

$ puppet --version
2.7.21
$ puppet apply /tmp/test.pp
notice: keys: host1host2
notice: /Stage[main]//Notify[test]/message: defined 'message' as 'keys:
host1host2'
notice: Finished catalog run in 0.01 seconds

Something's odd.

Cheers,
Felix

On 12/04/2013 02:32 PM, David Portabella wrote:
> $ puppet apply --templatedir=templates/ test.pp 
> 
> this works on puppet 3.2, but it fails on puppet 2.7 with:
> Unknown function keys at /home/vagrant/test.pp:12
> 
> why?
> 
> I guess that this depends on the version of ruby used for handling
> templates. why ruby version does puppet 2.7 and puppet 3 use?
> 
> what is a workaround to make this work on puppet 2.7?
> 

-- 
You received this message because you are subscribed to the Google Groups 
"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/529F45CB.4090602%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: puppet-dashboard cert::create_key_pair and cert::request fails

2013-12-04 Thread Jeremy Anderson
Thanks for the email, Robert -- after I replied to you, I realized I hadn't 
reply-all'd, so anyone on the list searching for this issue wouldn't see 
how I got it working.

I worked around this by moving to the sodabrew version of puppet-dashboard, 
and also flailing around a bit with the config.  sodabrew's version is at:

https://github.com/sodabrew/puppet-dashboard/

Once I followed the steps in that readme, everything worked great.

On Tuesday, December 3, 2013 1:03:39 PM UTC-6, Jeremy Anderson wrote:
>
> Did you ever get this resolved?  I'm running into the same thing.  If/when 
> I get it figured out, I'll post what it was, but I'm hoping that maybe 
> you've solved it in the meantime.
>
> On Monday, October 14, 2013 5:28:54 AM UTC-5, Robert Schaffar-Taurok wrote:
>>
>> Hi!
>>
>> I am already successfully using puppet with puppet-dashboard in my 
>> environment and would like to extend this to display the facts in 
>> puppet-dashboard.
>> I understand that I need a puppetdb for that. Which I installed and I 
>> already get successfull log messages there that facts are stored. So until 
>> now everything seems to work.
>>
>> Now I want to connect dashboard to puppetmaster and from the 
>> documentation I read that I need to do the following:
>>
>> $ sudo -u puppet-dashboard rake cert:create_key_pair $ sudo -u 
>> puppet-dashboard rake cert:request
>>
>> Well, I used the puppetlabs apt repository to install, so the users are 
>> different. But what I do is:
>>
>> cd /usr/share/puppet-dashboard
>> su www-data -c "rake cert:create_key_pair --trace"
>> su www-data -c "rake cert:request --trace"
>>
>> The first thing is that with create_key_pair I get a "Key(s) already 
>> exist." error message.
>> Because for some reason the method is called twice. I ignore this, as 
>> afterwards I successfully find a public and private key in the 
>> /usr/share/puppet-dashboard/certs directory. But nothing else. If there 
>> should be more there at this point, please tell me so. Just the public and 
>> private pem.
>>
>> At issuing the cert:request command, I get the following error:
>>
>> "SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: 
>> certificate verify failed"
>> and I don't find any request on the puppetmaster. (puppet cert list)
>>
>> My setup is that, puppetmaster, puppetdb and puppet-dashboard are all 
>> running on the same host.
>>
>> What I already tried:
>> - Copying certs from the /var/lib/puppet/ssl directory and skip the 
>> create and sign steps. But this doesn't work. Could easily be that I copied 
>> wrong files. The puppet-dashboard issues the same error message on the node 
>> view btw. (With or without keys in the puppet-dashboard/certs directory. 
>> The only time I get another error there is when I give the files in the 
>> certs directory a wrong permission. So it looks like it is looking at the 
>> expected location)
>> - Debugging a little bit. But couldn't find out more. And I don't get a 
>> better error message from the ssl code.
>> - Playing around for a day now. So I'm giving up. I need help :)
>>
>> Installed puppet packages:
>>
>> ii  puppet  3.3.1-1puppetlabs1all 
>>  Centralized configuration management - agent startup and compatibility 
>> scripts
>> ii  puppet-common   3.3.1-1puppetlabs1all 
>>  Centralized configuration management
>> ii  puppet-dashboard1.2.23-1puppetlabs1   all 
>>  Dashboard for Puppet
>> ii  puppetdb1.5.0-1puppetlabs1all 
>>  PuppetDB Centralized Storage.
>> ii  puppetdb-terminus   1.5.0-1puppetlabs1all 
>>  Connect Puppet to PuppetDB by setting up a terminus for PuppetDB.
>> ii  puppetlabs-release  1.0-7 all 
>>  "Package to install Puppet Labs gpg key and apt repo"
>> ii  puppetmaster3.3.1-1puppetlabs1all 
>>  Centralized configuration management - master startup and 
>> compatibility scripts
>> ii  puppetmaster-common 3.3.1-1puppetlabs1all 
>>  Puppet master common scripts
>>
>> Debian Version: wheezy
>>
>> Thanks in advance for any help,
>> Robert
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/2f0503ef-fb50-4649-8cdf-72e4947b9b91%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: MySQL server install with datadir != /var/lib/mysql

2013-12-04 Thread Thomas
Yes it might be tricky to integrate it but I think this would be a useful 
enhancement. 

On Wednesday, December 4, 2013 7:38:46 AM UTC-5, Luke Bigum wrote:
>
> It should be theoretically possible. The mysql-server package owns 
> /var/lib/mysql, but it is the mysql_install_db script that sets up an empty 
> database in $datadir when the service starts if $datadir is empty. If you 
> update your config file before you start the mysql server, you should be 
> able to point it at any datadir you like. It will leave an empty directory 
> at /var/lib/mysql, but hopefully you are ok with that as it's owned by an 
> RPM.
>
> I had a quick look at the module, /var/lib/mysql is hard coded in a lot of 
> places and you'd have to override / set most of them as well as in my.cnf:
>
> $ grep -R '/var/lib/mysql' *
> manifests/params.pp:  $datadir   = '/var/lib/mysql'
> manifests/params.pp:  $socket= 
> '/var/lib/mysql/mysql.sock'
> manifests/params.pp:  $datadir   = '/var/lib/mysql'
> manifests/params.pp:/(SLES|SLED)/=> 
> '/var/lib/mysql/mysql.sock',
> manifests/params.pp:/(SLES|SLED)/=> 
> '/var/lib/mysql/mysqld.pid',
> manifests/params.pp:  $datadir  = '/var/lib/mysql'
> manifests/params.pp:  $datadir   = '/var/lib/mysql'
> manifests/params.pp:  $socket= 
> '/var/lib/mysql/mysql.sock'
>
>
> On Wednesday, December 4, 2013 12:30:31 PM UTC, Walter Heck wrote:
>>
>> Tried and failed. The problem is that the mysql package automatically 
>> uses /var/lib/mysql, so the right sequence is:
>>
>> 1) yum install mysql-server
>> 2) service mysqld stop
>> 3) adjust my.cnf
>> 4) make moves on filesystem if needed
>> 5) service mysqld start
>> (steps 2 and 3 can be reversed)
>>
>> This is hard to puppetise as it is only needed the very first time when 
>> mysql is not yet installed. I've only ever had to do this on smaller groups 
>> of servers at a time, so always resorted to doing it manually.
>>
>> let me know if you figure it out, would be great to see a solution in 
>> puppetlabs-mysql.
>>
>>
>> On Wednesday, 4 December 2013 02:39:50 UTC+1, Thomas wrote:
>>>
>>> Has anybody sucessfully used puppetlabs-mysql (or some other method) to 
>>> install MySQL-server on Linux with a my.cnf where datadir != /var/lib/mysql 
>>> ?
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"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/c274653e-dc52-4f18-8908-59024b2450dd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: MySQL server install with datadir != /var/lib/mysql

2013-12-04 Thread Thomas
Yes that is what I was thinking as well. Unfortunately I don't believe yum 
will permit me to specify --noscripts so I can avoid mysql_install_db from 
running.

On Wednesday, December 4, 2013 7:30:31 AM UTC-5, Walter Heck wrote:
>
> Tried and failed. The problem is that the mysql package automatically uses 
> /var/lib/mysql, so the right sequence is:
>
> 1) yum install mysql-server
> 2) service mysqld stop
> 3) adjust my.cnf
> 4) make moves on filesystem if needed
> 5) service mysqld start
> (steps 2 and 3 can be reversed)
>
> This is hard to puppetise as it is only needed the very first time when 
> mysql is not yet installed. I've only ever had to do this on smaller groups 
> of servers at a time, so always resorted to doing it manually.
>
> let me know if you figure it out, would be great to see a solution in 
> puppetlabs-mysql.
>
>
> On Wednesday, 4 December 2013 02:39:50 UTC+1, Thomas wrote:
>>
>> Has anybody sucessfully used puppetlabs-mysql (or some other method) to 
>> install MySQL-server on Linux with a my.cnf where datadir != /var/lib/mysql 
>> ?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/2dfa86e6-85df-4223-a7eb-64a61357e654%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] MySQL server install with datadir != /var/lib/mysql

2013-12-04 Thread Thomas
No it didn't work and see other replies with additional details thanks to 
the others that have provided more details regarding the problem.

If I'm able to figure out a fix I'll certainly submit a pull request to 
resolve the issue.

What I had done was on RHEL 6.4 deploy an /etc/my.cnf containing datadir = 
/data/mysql but when puppet tries to start the mysql service it fails.

I'm writing a manifest to see if I can perform an exec of mysql_install_db 
along with proper dependencies to get a fresh database configured that 
doesn't point to /var/lib/mysql for it's datadir.

If I get that to work than I'll work on incorporating it into the 
puppetlabs-mysql forge module.

My initial message was just to first check if somebody else had solved this 
problem already... I'll submit an issue on github later so other users of 
the module are aware of a potential solution.

On Tuesday, December 3, 2013 9:51:27 PM UTC-5, Ygor wrote:
>
> One gets the impression that you have tried and have been unsuccessful. 
>
> Details would help with troubleshooting. 
>
> On Dec 3, 2013, at 8:39 PM, Thomas > 
> wrote: 
>
> > Has anybody sucessfully used puppetlabs-mysql (or some other method) to 
> install MySQL-server on Linux with a my.cnf where datadir != /var/lib/mysql 
> ? 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/082504a2-0169-4149-95fc-181e9250efcd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: what is the right way to ensure specific version installed on puppet agent?

2013-12-04 Thread jcbollinger


On Wednesday, December 4, 2013 1:19:55 AM UTC-6, shlo@gmail.com wrote:
>
>
>
> Hi,
>
> I wanted to install mysql-5.1.66 and make sure mysql-5.5.34 removed so I 
> make a init.pp file and put in it:
> class mysql {
> package { 'mysql':
> ensure => "5.1.66-2.el6_3", 
> require => [Package['mysql-libs'], 
> Package['compat-mysql'], 
> Package['mysql-5.5.34']],
> }
>
> package { 'mysql-libs':
> provider => 'yum',
> ensure => 'purged',
> }
>
> package { 'compat-mysql':
> provider => 'yum',
> ensure => 'absent',
> }
>
> package { 'mysql-5.5.34':
> provider => 'yum',
> ensure => 'absent',
> }
>


That last bit is useless, except inasmuch as there is a (definitely 
useless) reference to Package[''mysql-5.5.34''] earlier.  Puppet's RPM and 
YUM package providers will recognize  and . as 
package names.  Ensuring Package['mysql-5.5.34'] absent is always a no-op 
because although Package['mysql'] might have version 5.5.34, that's doesn't 
make it a package *named* "mysql-5.5.34".

Moreover, this isn't an issue for the vast majority of RPM packages, 
because few RPMs accommodate multiple versions of the same package 
installed.  Unless you're dealing with custom-packaged RPMs specifically 
built to accommodate multiple versions -- and it doesn't look like you are 
-- your earlier version-specific declaration of package "mysql" should be 
sufficient to ensure that the only version of the "mysql" package is the 
one you specify (5.1.66-2.el6_3).

 

> } 
>
> When I test it before, two weeks ago, it work okay. It remove mysql-5.5.34 
> and install mysql-5.1.66.
> Today I saw the puppet agent don't have mysql install at all.
> I tried to install it from the Unix command line  and got:
>
> *No package mysql-server-5.1.66-2.el6_3 available.Error: Nothing to do*
>
> I believe that this version of mysql removed from the repository because 
> it's old, but I don't want the old version to delete from my puppet agent.
> I want my puppet agent to have mysql-5.1.66 even that it not exist in the 
> repository.
> Is it because the puppet did not find mysql in the repository so it delete 
> it from my agent?
>


No.

 

> or I'm doing something wrong?
>
>

Yes.

Your package declarations have a hidden inconsistency that Puppet is unable 
to diagnose.  You specify that package "mysql-libs" must be purged, but 
that's not actually what you want, because packages mysql and mysql-server 
depend on mysql-libs.  By ensuring mysql-libs purged, you force it and all 
packages that depend on it to be removed (if mysql-libs is present) every 
time the agent runs.  *That's* why mysql-5.1.66 and mysql-server-5.1.66 got 
removed.  It is surely not what you actually want, even if the mysql-5.1.66 
packages were still available in your configured repositories.  (And this 
is yet another reason why the declaration of package "mysql-5.5.34" is 
useless.)

You have committed one of the classic Puppet blunders: writing manifests 
that focus on state transitions instead of on the desired target state.  I 
say that because the only reason I can imaging for declaring mysql-libs 
purged is to facilitate downgrading mysql to version 5.1.66 from a later 
version.

There are several things you should do:

   1. Create and maintain a local package repository for at least those 
   packages you depend upon, plus their dependencies.  Myself, I maintain a 
   complete local mirror of all the essential repositories I depend on.  There 
   are multiple advantages, but the most relevant one here is that you can 
   avoid packages being yanked out from under you.
   2. Remove the inconsistency in your declarations.

There are several approaches to (2), but I'd recommend creating a custom 
fact to report the installed version of mysql-libs, and making its purge 
conditional on that value.  The Puppet side might look like this:

class mysql {
  $target_version = '5.1.66'
  $target_release = '2.el6_3'

  package { 'mysql': ensure => "${target_version}-${target_release)" }

  # assumes that mysql-libs version must match mysql version;
  # $::mysql_libs_version is a custom fact you must provide:
  if $::mysql_libs_version != '' and versioncmp($target_version, 
$::mysql_libs_version) < 0 {
package { 'mysql-libs':
  ensure => 'purged'
  before => Package['mysql']
}
  }

  package { 'compat-mysql': ensure => 'absent' }
}

Note that there is no need for a resource relationship between 
Package['compat-mysql'] and Package['mysql'], because it doesn't matter in 
which relative order these resources are applied.  Note also that there is 
no longer any declaration of a package "mysql-5.5.34"; it is unneeded.

Additionally, note that it is not normally necessary to explicitly specify 
a provider in your resource declarations.

See http://docs.puppetlabs.com/guides/custom_facts.html for information 
about writing and distributing custom facts.


John

[Puppet Users] Re: puppetdb missing environment fact

2013-12-04 Thread james . eckersall
Thanks Luke. 

I just found a bug report describing that this behaviour has changed in 3.x 
http://projects.puppetlabs.com/issues/17692

For me, being able to determine the agent environment is very useful.
We use git for the Puppet manifests and each branch is an environment.
So we'll create new branches to test and deploy new features.
Then when it's ready to go live to all nodes, we'll merge that branch back 
into master and remove the feature branch.
I rely on being able to query puppetdb or puppet-dashboard to find out 
which nodes are using environment X, so I can safely remove a branch once 
there are no nodes using it.

We also manage Puppet with Puppet and set the environment in puppet.conf 
based on the current environment.  This does still work as the environment 
is available in the manifests.

I also found the following code (at 
https://groups.google.com/forum/#!topic/puppet-users/AM1o4Khloto) for 
turning environment into a fact.
Including it here in case it's useful to others.

require 'puppet'

Facter.add('environment') do
  setcode do
Puppet[:environment]
  end
end


J

-- 
You received this message because you are subscribed to the Google Groups 
"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/c1146880-5afa-486b-bba0-6b45b9a91153%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] How to reject agent (node) certificate request

2013-12-04 Thread kaustubh chaudhari
Hi,

I am using open source puppet.

How can i reject a certificate request generated by agent on the master.

I can see the cert request in :

puppet cert list

However i wish to reject the request so that next time i run the same 
command, i dont see the garbage(unwanted requests)

I know this can be done in PE, not sure how to do this from command line!

-Kaustubh

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


[Puppet Users] puppet 2.7, template, keys of hash

2013-12-04 Thread David Portabella
test.pp
$config = { 
host1 => {
   port => ,
   msg  => 'dfdasfas'
},
host2 => {
   port => ,
   msg  => 'dfdasfas'
},
  }

file { '/tmp/file.txt':
  content => template('file.txt.erb'),
}

file.txt.erb:
keys: <%= @config.keys %>

$ puppet apply --templatedir=templates/ test.pp 

this works on puppet 3.2, but it fails on puppet 2.7 with:
Unknown function keys at /home/vagrant/test.pp:12

why?

I guess that this depends on the version of ruby used for handling 
templates. why ruby version does puppet 2.7 and puppet 3 use?

what is a workaround to make this work on puppet 2.7?


-- 
You received this message because you are subscribed to the Google Groups 
"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/c743e957-c58e-448e-a70f-d83a815197fd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] testing and exported (nagios) resources

2013-12-04 Thread Felix Frank
Hi,

I must be missing an essential piece here.

All three of your puppet stack nodes must be present in each instance,
no? The production master manages all three masters, normally. To change
monitoring of either of them, you update the production manifests.

Of course, if you implement some new monitoring feature on the dev
master, you must have that node run puppet against its local dev master
to export resources, then the nagios server also against the dev master
to import them. But that is just the usual dev workflow, I assume.

So I suspect things aren't so simple for you. I just don't see in what
manner.

Thanks in advance for any clarification,
Felix

On 12/03/2013 02:39 AM, Jason Antman wrote:
> Hello,
> 
> I have 3 puppet stacks (master, puppetdb, enc) - dev, test/qa and prod.
> Dev is used for initial development and testing of code (including
> puppet), which is then promoted to test and then prod.
> 
> I'd like to start using the nagios types to configure monitoring, via
> exported resources (yes I'm aware of the issues with the builtins, but
> they'll have to do for now). I only have one Nagios server, and I'd like
> to reliably monitor at least some stuff on the dev and test puppet
> nodes. So... setting up all 3 puppet stacks to export resources that are
> realized somehow on the Nagios server isn't a possibility, as bad
> manifests/modules could affect the monitoring of one of the dev or test
> hosts.
> 
> What's the safe way to "freeze" exported resources, or prevent them from
> being changed? The best that I can come up with so far is to have the
> nagios server connected to the production puppetmaster, and when I want
> to update the (exported resource) monitoring configuration for one of
> the dev or test nodes, have to do a one-time run on each node in
> question against the prod puppet master.
> 
> Any other thoughts or theories?
> 
> Thanks,
> Jason Antman

-- 
You received this message because you are subscribed to the Google Groups 
"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/529F2CA4.2040203%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] puppet-users-br err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=unknown sta

2013-12-04 Thread Felix Frank
Hi,

on this agent machine, is there a /var/lib/puppet/ssl/certs/ca.pem?

If so, what is the output of

openssl x509 -issuer -subject -noout -in /var/lib/puppet/ssl/certs/ca.pem

Thanks,
Felix

On 11/28/2013 12:09 PM, Caio Pedroso wrote:
> root@Puppetclient:~#  puppet agent --test
> err: Could not retrieve catalog from remote server: SSL_connect
> returned=1 errno=0 state=SSLv3 read server certificate B: certificate
> verify failed: [self signed certificate in certificate chain for
> /CN=Puppet CA: puppetmaster]
> warning: Not using cache on failed catalog
> err: Could not retrieve catalog; skipping run
> err: Could not send report: SSL_connect returned=1 errno=0 state=SSLv3
> read server certificate B: certificate verify failed: [self signed
> certificate in certificate chain for /CN=Puppet CA: puppetmaster]
> 

-- 
You received this message because you are subscribed to the Google Groups 
"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/529F294E.3070109%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Re: Puppet module testing & code coverage...

2013-12-04 Thread Felix Frank
Hi,

On 12/03/2013 06:23 PM, Stuart Cracraft wrote:
> You may want to go to www.amazon.com  and pick up
> How Google Tests Software by Whittaker, Arbon, and Carollo.

I encourage the plugging of pertinent literature, but I feel
uncomfortable about linking to specific retailers. That just crosses the
line to blunt advertising.

> If that's the case, is there any alternative that /will /generate Puppet
> manifest code coverage?

I'm not sure what you expect from 'manifest code coverage'.

If you write a spec to find out how a piece of manifest code (e.g. a
class) behaves, the blog you linked indicates that 'rake spec' is the
task you're looking for.

HTH,
Felix

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


[Puppet Users] Re: puppetdb missing environment fact

2013-12-04 Thread Luke Bigum
'environment' is not a Fact:

laptop:~$ sudo facter -p environment
laptop:~$ 

It is a configuration parameter of Puppet. I'm not sure why older 2.7 hosts 
would be reporting it as a Fact to PuppetDB, unless in 2.7 all top scope 
variables were sent this way.

You could use a Fact to pull out what environment an Agent *would* run with 
using this Fact code:

#Get the configured environment out of puppet.conf
begin
puppet_environment = ''

File.open('/etc/puppet/puppet.conf').each do |line|
if line =~ /^\s*environment\s*=\s*(\S+)/
puppet_environment = $1
end
end

Facter.add(:puppet_environment) do
setcode do
puppet_environment
end
end
rescue
Facter.warn("puppet_environment.rb failed: #{$!}")
end


On Wednesday, December 4, 2013 10:04:53 AM UTC, james.e...@fasthosts.com 
wrote:
>
> Hi,
>
> I'm seeing something rather strange with puppetdb (1.5.2) in regards to 
> the environment fact.
>
> On my puppetdb host:
>
> If I run the following query:
>
> curl -G 'http://localhost:8080/v3/facts' --data-urlencode 'query=["=", 
> "name", "environment"]'
>
> I would expect to receive the environment fact for every node that I'm 
> managing with puppet (>500).
>
> However, that query only returns 11 nodes.  These 11 nodes are running 
> puppet 2.7.22.
>
> I am in the process of upgrading puppet to 3.3.2 from 2.7.22.
>
> All of the nodes running 3.3.2 are missing the environment fact from 
> puppetdb.  All the 2.7.22 nodes have the environment fact stored.
>
> Can anyone think of a reason why the environment fact is missing for my 
> 3.3.2 nodes?
>
> J
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/8e47c15c-9395-4a74-8e61-da15ad433688%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] external node classifiers

2013-12-04 Thread Jason Antman
Stuart,

Yes, many of us use ENCs, though it seems to be mostly limited to larger
shops; these days many people are moving in the direction of hiera
instead. I've been using various ENCs for the past ~4 years.

There are relatively few good choices for already-written ENCs. (well,
if you just want a simple script, you can write it yourself; most of the
"ENCs" that are available provide a web interface for configuring
everything). The most popular options that I know of are Puppet
Dashboard (aka Console in Puppet Enterprise) and Foreman. The current
version of Dashboard (IMHO) has some serious issues, though PL is
actively working on them and I'm told that big improvements can be
expected. Foreman is good, solid software but does a LOT in terms of
provisioning, DNS and DHCP control, etc. as well as a lot of internal
logic about setting variables and classes, etc. so I feel that it's a
bit much if all you want is a plain-and-simple ENC.

I'm in the process of polishing up my company's internal ENC, and plan
on releasing it on github. It's a python/Django app that supports
multiple inheritance and overrides, class and parameter exclusions, and
has full support for parameterized classes and deep data structures.

That being said, I've also written ENCs in the past that were quite
simple - type in a hostname, check off some boxes for classes and
groups, and you're done.

As to samples - unfortunately, no, I don't... but you just need some
script that prints valid YAML according to the spec. Without knowing
more about how you want it to work, I can't provide much of an example.

"My current question is how do you use the ENC definitions within the
classes?"

Well, most of the ENCs I've used in the past (Puppet Dashboard included)
just return a list of classes to apply to the node, and a list of
parameters. The parameters are passed to puppet as top-scope variables.
So your ENC defines a parameter called, say, httpd_version, and
somewhere in your httpd class, you use $::httpd_version. Of course then
you really need to follow the params.pp pattern to declare a default
value, and validate what the ENC passes in. This pattern really sucks.

Lately, especially since puppet3 came out, I've been using an ENC that
supports parameterized classes. So I don't do anything special in my
classes (in fact much of what I use are modules from the Forge), and I
just tell the enc what classes I want, and the parameters that I want
passed in to them. This allows me to use many of the forge modules
(especially the puppetlabs ones) straight from my ENC.

I'd be happy to provide a bit more advice if you have more specific
questions.

-Jason


On 12/03/2013 06:50 PM, Stuart Cracraft wrote:
> Hi,
>
> I'd like to use ENC::
>
>   http://docs.puppetlabs.com/guides/external_nodes.html
>
> to keep hardwired customizations away from our classes and other files
> as much as possible
> particularly for the node name, but potentially as esoteric as a
> machine configuration, file
> permission, service name, etc - to keep the classes as flexible and
> general as possible.
>
> My questions:
>
>   + have you done the above?
>   + what were your learnings
>   + do you have sample puppet_node_classifier's you can share?
>   + how to use the definitions from ENC via the pm's puppet.conf's
> linkage to the ENC
>
>[main]
>:
>node_terminus = exec
>external_nodes = /usr/local/bin/puppet_node_classifier
>:
>
> My current question is how do you use the ENC definitions within the
> classes?
>
> Is this adequately described in-depth in the yet-to-be-published
> Puppet book?
>
> Stuart
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "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/7b5670b1-8ca6-4d63-bb38-3d0e5f5bfae6%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

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


[Puppet Users] Re: MySQL server install with datadir != /var/lib/mysql

2013-12-04 Thread Luke Bigum
It should be theoretically possible. The mysql-server package owns 
/var/lib/mysql, but it is the mysql_install_db script that sets up an empty 
database in $datadir when the service starts if $datadir is empty. If you 
update your config file before you start the mysql server, you should be 
able to point it at any datadir you like. It will leave an empty directory 
at /var/lib/mysql, but hopefully you are ok with that as it's owned by an 
RPM.

I had a quick look at the module, /var/lib/mysql is hard coded in a lot of 
places and you'd have to override / set most of them as well as in my.cnf:

$ grep -R '/var/lib/mysql' *
manifests/params.pp:  $datadir   = '/var/lib/mysql'
manifests/params.pp:  $socket= 
'/var/lib/mysql/mysql.sock'
manifests/params.pp:  $datadir   = '/var/lib/mysql'
manifests/params.pp:/(SLES|SLED)/=> 
'/var/lib/mysql/mysql.sock',
manifests/params.pp:/(SLES|SLED)/=> 
'/var/lib/mysql/mysqld.pid',
manifests/params.pp:  $datadir  = '/var/lib/mysql'
manifests/params.pp:  $datadir   = '/var/lib/mysql'
manifests/params.pp:  $socket= 
'/var/lib/mysql/mysql.sock'


On Wednesday, December 4, 2013 12:30:31 PM UTC, Walter Heck wrote:
>
> Tried and failed. The problem is that the mysql package automatically uses 
> /var/lib/mysql, so the right sequence is:
>
> 1) yum install mysql-server
> 2) service mysqld stop
> 3) adjust my.cnf
> 4) make moves on filesystem if needed
> 5) service mysqld start
> (steps 2 and 3 can be reversed)
>
> This is hard to puppetise as it is only needed the very first time when 
> mysql is not yet installed. I've only ever had to do this on smaller groups 
> of servers at a time, so always resorted to doing it manually.
>
> let me know if you figure it out, would be great to see a solution in 
> puppetlabs-mysql.
>
>
> On Wednesday, 4 December 2013 02:39:50 UTC+1, Thomas wrote:
>>
>> Has anybody sucessfully used puppetlabs-mysql (or some other method) to 
>> install MySQL-server on Linux with a my.cnf where datadir != /var/lib/mysql 
>> ?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/fa6d9246-47c6-407a-a4e5-758cf1621759%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: MySQL server install with datadir != /var/lib/mysql

2013-12-04 Thread Walter Heck
Tried and failed. The problem is that the mysql package automatically uses 
/var/lib/mysql, so the right sequence is:

1) yum install mysql-server
2) service mysqld stop
3) adjust my.cnf
4) make moves on filesystem if needed
5) service mysqld start
(steps 2 and 3 can be reversed)

This is hard to puppetise as it is only needed the very first time when 
mysql is not yet installed. I've only ever had to do this on smaller groups 
of servers at a time, so always resorted to doing it manually.

let me know if you figure it out, would be great to see a solution in 
puppetlabs-mysql.


On Wednesday, 4 December 2013 02:39:50 UTC+1, Thomas wrote:
>
> Has anybody sucessfully used puppetlabs-mysql (or some other method) to 
> install MySQL-server on Linux with a my.cnf where datadir != /var/lib/mysql 
> ?
>

-- 
You received this message because you are subscribed to the Google Groups 
"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/161ec82b-dd7a-4c71-bec3-99c40e6c62d5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Problem with PuppetDB and OpenSSL (solved)

2013-12-04 Thread Ken Barber
For what its worth the bug in openssl-1.0.1e-15 has been fixed in
upstream by openssl-1.0.1e-16:
http://rhn.redhat.com/errata/RHBA-2013-1751.html

On Mon, Dec 2, 2013 at 12:33 PM, Ken Barber  wrote:
> So this seems to be a regression in openssl-1.0.1e-15.el6.x86_64. The
> reason why this works for JDK 7, is because we've had issues with the
> ECC based ciphers in the past, and had to pin JDK 7 to non-ECC
> ciphers.
>
> However we had the anticipation that this might be something that
> would come back, so we provided a configuration option to override
> this. Alas, the solution without downgrading openssl or upgrading to
> JDK 7 is to add the following line to your jetty.ini:
>
> cipher-suites =
> TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,SSL_RSA_WITH_RC4_128_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_RSA_WITH_RC4_128_MD5
>
> ... and then restart your puppetdb instance.
>
> We're looking into a permanent solution now. Of course, upgrade to JDK
> 7 is a good idea regardless, so I would recommend that first. In the
> very near future we are looking to deprecate JDK 6 anyway, so better
> to move now rather then later.
>
> ken.
>
> On Thu, Nov 28, 2013 at 4:04 PM, Ken Barber  wrote:
>> Okay, so this problem seems prolific now. Would you mind raising a
>> redmine ticket on this?
>>
>> http://projects.puppetlabs.com/projects/puppetdb
>>
>>
>> On Thu, Nov 28, 2013 at 3:59 PM, Matthias Saou  wrote:
>>> On Wed, 27 Nov 2013 09:48:52 -0700
>>> Deepak Giridharagopal  wrote:
>>>
 On Nov 27, 2013, at 9:11 AM, Jonathan Gazeley
  wrote:

 > Hmm, well I removed java-1.6.0-openjdk and installed
 > java-1.7.0-openjdk. Reinstalled puppetdb, which pulled
 > java-1.6.0-openjdk back in again, so the two javas were installed
 > simultaneously. Restarted puppetdb and puppetmaster and everything
 > works again I have no idea what was wrong.

 Hmm, pulling in an older version jdk despite the presence of a newer
 one smells like a bug to me...can you file one against PuppetDB?

 We're touching that code right now, as we're actually in the process
 of deprecating use of JDK 1.6 with PuppetDB. So the upgrade situation
 you describe is something we should try and test.
>>>
>>> FWIW, I just did a "yum update" on a RHEL 6 puppet master, which got
>>> all updates from RHEL 6.5, and I started seeing failed puppet runs with
>>> the exact same symptoms.
>>>
>>> This is initially with puppet 3.3.2 and puppetdb 1.4.0.
>>>
>>> Restarting the services didn't help. Rebooting the server to make sure
>>> all new system libs were used didn't help either.
>>> Updating to puppetdb 1.5.2 and running /usr/sbin/puppetdb-ssl-setup -f
>>> didn't help (still the exact same message).
>>>
>>> But this fixed it :
>>>
>>> yum install java-1.7.0-openjdk.x86_64
>>> service puppetdb restart
>>>
>>> Previously, I had only java-1.6.0-openjdk installed, and it had been
>>> updated. I'm guessing the update broke something related to SSL. After
>>> installing 1.7.0, alternatives automatically updated all java related
>>> paths to make 1.7.0 the default, and puppetdb seems to work fine with
>>> it.
>>>
>>> So if you're running PuppetDB on RHEL (or any clone), then make sure
>>> you have the right version of Java available for it.
>>>
>>> Matthias
>>>
>>> --
>>> Matthias Saou  ██  ██
>>>  ██  ██
>>> Web: http://matthias.saou.eu/  ██
>>> Mail/XMPP:  matth...@saou.eu   ██  
>>>██
>>> GPG: 4096R/E755CC63██  ██  ██
>>>  8D91 7E2E F048 9C9C 46AF  ██  ██  ██  ██
>>>  21A9 7A51 7B82 E755 CC63  
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups 
>>> "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to puppet-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/20131128165900.4b11f270%40r2d2.marmotte.net.
>>> For more options, visit https://groups.google.com/groups/opt_out.

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


[Puppet Users] How to yum install puppet 3.2.2

2013-12-04 Thread Claire Speed
Hi,

I've been playing with puppet enterprise but wanted to look at open source 
puppet now to compare.  I'm having a slightly weird problem installing it 
though and wonder if I'm missing something?  I've been trawling through all 
the documentation and google matches I can find, but whatever I do if I yum 
install puppet or puppet-server (CentOS6) I get puppet version 2.7.23 when 
I actually want to have a look at 3.2.2.  I've tried forcing it to the 
specific version but it says the package is not there, although I can see 
on the yum repository that it is.

I'd guess I'm missing something pretty obvious here, but I can't work out 
what!  Can anyone advise?

Thanks

Claire

-- 
You received this message because you are subscribed to the Google Groups 
"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/e211df72-d23f-435b-9a8b-294124ed3370%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Enabling Inventory Support for dashboard give SSL_connect error

2013-12-04 Thread shlo . afgin


I tried to Enabling Inventory Support for dashboard.
I follow the instruction in 
http://docs.puppetlabs.com/dashboard/manual/1.2/configuring.html

In the node page under the 'Inventory' I get:
Could not retrieve facts from inventory service: SSL_connect returned=1 
errno=0 state=SSLv2/v3 read server hello A: unknown protocol

Where the problem can be?
 

-- 
You received this message because you are subscribed to the Google Groups 
"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/aab256a9-7cf6-408b-ac5c-4cdaf0b99d8e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] puppetdb missing environment fact

2013-12-04 Thread james . eckersall
Hi,

I'm seeing something rather strange with puppetdb (1.5.2) in regards to the 
environment fact.

On my puppetdb host:

If I run the following query:

curl -G 'http://localhost:8080/v3/facts' --data-urlencode 'query=["=", 
"name", "environment"]'

I would expect to receive the environment fact for every node that I'm 
managing with puppet (>500).

However, that query only returns 11 nodes.  These 11 nodes are running 
puppet 2.7.22.

I am in the process of upgrading puppet to 3.3.2 from 2.7.22.

All of the nodes running 3.3.2 are missing the environment fact from 
puppetdb.  All the 2.7.22 nodes have the environment fact stored.

Can anyone think of a reason why the environment fact is missing for my 
3.3.2 nodes?

J

-- 
You received this message because you are subscribed to the Google Groups 
"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/0c8c5ba8-a08f-4b87-b817-e52f6806c5bb%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] matching all current "ipaddress_ethX" facts

2013-12-04 Thread Stefan Schulte
On 21.11.2013 13:32, cko wrote:
> Hi,
> 
> I'm currently trying to solve the following problem:
> 
> I wrote a module that matches the "$ipaddress" fact for certain IP
> subnets (like 20.20.2... or 30.30.2..). Depending on the subnet, the
> variable $proxy-server changes.
> 
> The problem is, that some of our physical machines have a random number
> of interfaces connected to many different subnets. In some cases the
> $ipadddress fact returns the correct subnet, lets call it "production
> server lan" and some don't.
> 
> Is there any way to make puppet check every available NIC for a specific
> subnet/ regex? Something like this:
> 
> if $ipaddress_eth*** =~ /^20\.20\.\..*$/ {
>$proxy-server = foo
> }
> .
> 
> -- 

I'd recommend to write a custom fact that returns your "production
server lan" ipaddress first and then check only that fact against your
regular expression. The custom fact may look like this:


 require 'ipaddr'
 require 'facter/util/ip'

 Facter.add(:ipaddress_production) do
   setcode do
 production_networks = [
   IPAddr.new('20.20.2.0/24'),
   IPAddr.new('30.30.2.0/24')
 ]
 production_ip = nil

 Facter::Util::IP.get_interfaces.each do |interface|
   ip = Facter::Util::IP.get_interface_value(interface, 'ipaddress')
   if production_networks.any? { |network| network.include? ip }
 production_ip = ip
   end
 end
 production_ip
   end
 end

-Stefan

-- 
You received this message because you are subscribed to the Google Groups 
"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/529EEEB6.8090601%40taunusstein.net.
For more options, visit https://groups.google.com/groups/opt_out.