Re: [Puppet Users] Can I re-use a Exec resource from multiple un-related classes?

2012-08-16 Thread Kenneth Lo
Looks like with some testing I answered my own question. :)

As soon as the 'helpFunction' class is included in a node, I can simply notify 
the resource there from other classes as well. If I re-define the Exec resource 
in other classes I would ended up getting multi-define error.

--KL

From: KENNETH LO mailto:k...@paydiant.com>>
Reply-To: "puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>" 
mailto:puppet-users@googlegroups.com>>
Date: Thu, 16 Aug 2012 15:32:01 +
To: "puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>" 
mailto:puppet-users@googlegroups.com>>
Subject: [Puppet Users] Can I re-use a Exec resource from multiple un-related 
classes?

The idea is that let say I have a Class define as "helperFunctions" where I put 
in a bunch of shell script exec resources, along with some file resources as 
requirement.

Can I then have other classes' resource to  Subscribe and/or Notify to specific 
Exec resource within that helperFunction class?

The only interClass dependency I've done based on puppet's example are all per 
class, not per resource… So is this possible and what's the proper syntax for 
it?

Thanks in advance.

--KL
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

--
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to 
puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com<mailto:puppet-users+unsubscr...@googlegroups.com>.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



[Puppet Users] Can I re-use a Exec resource from multiple un-related classes?

2012-08-16 Thread Kenneth Lo
The idea is that let say I have a Class define as "helperFunctions" where I put 
in a bunch of shell script exec resources, along with some file resources as 
requirement.

Can I then have other classes' resource to  Subscribe and/or Notify to specific 
Exec resource within that helperFunction class?

The only interClass dependency I've done based on puppet's example are all per 
class, not per resource… So is this possible and what's the proper syntax for 
it?

Thanks in advance.

--KL
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



RE: [Puppet Users] Re: Passing parameters for a class in Dashboard

2012-08-08 Thread Kenneth Lo
As I said parameters created by dashboard is on top scope.

You can check out puppet’s doc regarding scoping.

Assuming you don’t what to rely on their dynamic lookup (which is what they 
recommended since the feature is retiring) In your module you can reference 
global variable directly with the :: prefix.


--KL

From: Rakesh K [mailto:rkath...@gmail.com]
Sent: Wednesday, August 08, 2012 1:52 AM
To: puppet-users@googlegroups.com
Cc: Kenneth Lo
Subject: Re: [Puppet Users] Re: Passing parameters for a class in Dashboard


Ok.. I understand ... I can simply include the class and assign it to my node.. 
but how will dashboard know which parameters refers to which class?

There could be a parameter like "ensure => present" and it could have been used 
in multiple classes that I have included, how will these things be taken care 
of?

On Tuesday, August 7, 2012 12:08:09 AM UTC+5:30, Kenneth Lo wrote:
In dashboard parameters are assigned via group.

So basically you just create a group, assign some parameters there, include 
some nodes and your class in it.

Parameters created via dashboard group are at the global top scope I believe.

--KL

From: Rakesh K 
Reply-To: "puppet...@googlegroups.com" 
Date: Mon, 6 Aug 2012 05:50:37 -0700
To: "puppet...@googlegroups.com" 
Subject: [Puppet Users] Re: Passing parameters for a class in Dashboard




Or in other words , how do I make sure that following config is applied to my 
node through dashboard

class base1 {

  package { ["rsync", "xinetd"]: ensure => present }
  service { "xinetd": ensure => running }

  include rsyncd
  $password = generate("/usr/bin/pwgen", 8, 1)

  user { "dba":
  ensure => present,
  comment => "DB user",
  gid => "dba",
  shell => "/bin/false",
  require => Group["dba"],
  }

  group { "dba":
  ensure => present,
  }

  file { "/backup-mysql":
ensure => directory,
mode => 0775,
owner => "dba",
group => "dba",
  }

  file { "/home/dba/rsyncd.secret":
content => "backup:${password}",
replace => no,
mode => 0460,
owner=> "root",
group => "dba",
require => User['dba'],
  }

  rsyncd::export { "backup":
path => "/backup-mysql",
chroot => true,
readonly => true,
uid => "dba",
gid => "dba",
users => "backup",
secrets => "/home/dba/rsyncd.secret",
allow => "192.168.0.0/24<http://192.168.0.0/24>",
require => [File["/backup-mysql"], File["/home/dba/rsyncd.secret"]],
  }

}

node 'pclient1.example.com<http://pclient1.example.com>' {
include base1
}





On Monday, August 6, 2012 2:44:00 PM UTC+5:30, Rakesh K wrote:
Hi,

I have recently installed puppet and components including dashboard on my 
server. I am new to puppet and what I am trying to achieve here is passing 
parameters via dashboard

What I can see right now is under Add Class in dashboard, I can only pass the 
class names. Whereas when I can include classes via nodes.pp I can also pass 
parameters.

How can do this from dashboard,

eg. if I want to achieve the following from dashboard how will I be able to do 
it

/etc/puppet/manifests/nodes.pp
class baseclass {
class { 'mysql': }
class { 'mysql::server':
#config_hash => { 'root_password' => 'mypass' }
}
mysql::db { 'mydb':
user => 'myuser',
password => 'mypass',
host => 'localhost',
grant=> ['all'],
}
}

node 'pclient1.example.com<http://pclient1.example.com/>' {
include baseclass
}


And this is how my site.pp looks like

[root@pmast1 ~]# cat /etc/puppet/manifests/site.pp
import 'nodes.pp'
$puppetserver = 'pmast1.example.com<http://pmast1.example.com>'
filebucket { "main":
server => "puppet",
path => false,
}
File { backup => "main" }

Please suggest.
--
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/hqByM-qJEegJ.
To post to this group, send email to puppe...@googlegroups.com.
To unsubscribe from this group, send email to puppet-user...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.
_

Re: [Puppet Users] Re: Passing parameters for a class in Dashboard

2012-08-06 Thread Kenneth Lo
In dashboard parameters are assigned via group.

So basically you just create a group, assign some parameters there, include 
some nodes and your class in it.

Parameters created via dashboard group are at the global top scope I believe.

--KL

From: Rakesh K mailto:rkath...@gmail.com>>
Reply-To: "puppet-users@googlegroups.com" 
mailto:puppet-users@googlegroups.com>>
Date: Mon, 6 Aug 2012 05:50:37 -0700
To: "puppet-users@googlegroups.com" 
mailto:puppet-users@googlegroups.com>>
Subject: [Puppet Users] Re: Passing parameters for a class in Dashboard




Or in other words , how do I make sure that following config is applied to my 
node through dashboard

class base1 {

  package { ["rsync", "xinetd"]: ensure => present }
  service { "xinetd": ensure => running }

  include rsyncd
  $password = generate("/usr/bin/pwgen", 8, 1)

  user { "dba":
  ensure => present,
  comment => "DB user",
  gid => "dba",
  shell => "/bin/false",
  require => Group["dba"],
  }

  group { "dba":
  ensure => present,
  }

  file { "/backup-mysql":
ensure => directory,
mode => 0775,
owner => "dba",
group => "dba",
  }

  file { "/home/dba/rsyncd.secret":
content => "backup:${password}",
replace => no,
mode => 0460,
owner=> "root",
group => "dba",
require => User['dba'],
  }

  rsyncd::export { "backup":
path => "/backup-mysql",
chroot => true,
readonly => true,
uid => "dba",
gid => "dba",
users => "backup",
secrets => "/home/dba/rsyncd.secret",
allow => "192.168.0.0/24",
require => [File["/backup-mysql"], File["/home/dba/rsyncd.secret"]],
  }

}

node 'pclient1.example.com' {
include base1
}





On Monday, August 6, 2012 2:44:00 PM UTC+5:30, Rakesh K wrote:
Hi,

I have recently installed puppet and components including dashboard on my 
server. I am new to puppet and what I am trying to achieve here is passing 
parameters via dashboard

What I can see right now is under Add Class in dashboard, I can only pass the 
class names. Whereas when I can include classes via nodes.pp I can also pass 
parameters.

How can do this from dashboard,

eg. if I want to achieve the following from dashboard how will I be able to do 
it

/etc/puppet/manifests/nodes.pp
class baseclass {
class { 'mysql': }
class { 'mysql::server':
#config_hash => { 'root_password' => 'mypass' }
}
mysql::db { 'mydb':
user => 'myuser',
password => 'mypass',
host => 'localhost',
grant=> ['all'],
}
}

node 'pclient1.example.com' {
include baseclass
}


And this is how my site.pp looks like

[root@pmast1 ~]# cat /etc/puppet/manifests/site.pp
import 'nodes.pp'
$puppetserver = 'pmast1.example.com'
filebucket { "main":
server => "puppet",
path => false,
}
File { backup => "main" }

Please suggest.

--
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/hqByM-qJEegJ.
To post to this group, send email to 
puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



[Puppet Users] conditional require

2012-08-06 Thread Kenneth Lo
On a vanilla resource require statement, is there a way to define a require for 
either 'resource A' or 'resource B' ?

Historically our system setup increment app per version (as opposed to having a 
parameter to define it). Ie. Say, we have a tomcat_6 and tomcat_7 classes for 
tomcat v.6 and v.7 respectively. So obviously if some other resources is 
depending on Tomcat, a particular node would have either 6 or 7.

Note that we have not yet utilize fact for version documentation. Thanks in 
advance.



--KL



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



[Puppet Users] Approach question on managing services

2012-03-22 Thread Kenneth Lo
I want to gather some ideas and/or best practice with the fine folks here in 
the group in terms of how you manage services in your environment.

For essential services like ssh, it's pretty much standard affair with the 
basic Package/Config/Service paradigm. Monitor the package info, make sure it 
away runs and refresh if new config files are pushed.

Now, if you have something that's more application-oriented (ie. Apache, 
tomcat), how do you:


  1.  Maintain status-quo during 'normal' operation condition
  2.  Turn off services monitoring (i.e. Service ensure => running) during 
scheduled maintenance windows
  3.  Same as 2, for reasons that application is experiencing issue (outage) 
that causes by external means, and admin team need to debug on the node.

In our environment right now, we defined different "application groups" via 
ENC, and we load different puppet modules based on that (with general service 
declaration ensure => running). One thing we keep running into is that if we 
want to work on a application setup on a specific node for whatever reason, we 
currently need to make sure that node does not load the said application module.

We accomplish that currently by UNLOADING the module reference for the entire 
group. While this is serviceable, this clearly is not ideal.

I have a couple ideas on improving our model, but I'm also interested to know 
how folks here would handle that. Thanks in advances.


--KL
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



Re: [Puppet Users] puppet <=> puppet dashboard interoperability

2012-03-02 Thread Kenneth Lo
The way I understand it is that, if your puppet installation utilize ENC, you 
simply setup the puppet.conf's [master] external_nodes parameter to point to a 
process that returns a yaml formatted "node catalogs". If your ENC 
configuration is correct (in this case dashboard), puppet would do the rest.

I believe by default installation for dashboard (I use PE), that would be a 
script called external_node, which simply does a curl call to pull your 
configuration list down.

--KL

From: Peter Berghold mailto:salty.cowd...@gmail.com>>
Reply-To: "puppet-users@googlegroups.com" 
mailto:puppet-users@googlegroups.com>>
Date: Fri, 2 Mar 2012 10:55:06 -0500
To: "puppet-users@googlegroups.com" 
mailto:puppet-users@googlegroups.com>>
Subject: [Puppet Users] puppet <=> puppet dashboard interoperability

Is there something on the puppet master or puppet agent that needs to be 
tweaked for class assignments to be picked up form dasbhboard when a puppet 
agent runs?

wondering if I missed something...


--
Peter L. Berghold
Owner, Shark River Technical Solutions LLC

--
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to 
puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



Re: [Puppet Users] Re: About dashboard with parameterized classes

2012-02-29 Thread Kenneth Lo
We have a similar setup. The way we do this is to simply enforce as a
procedure to create a group and each class we declared, then we would
reference the class in that group, and create variables under that group.
>From dashboard's organization standpoint we would only assign nodes to a
group (instead of class)

Note that variables create from dashboard are global as far as I know, so
we would just use naming convention to make things easier.

--KL

On 2/29/12 5:37 AM, "Smith"  wrote:

>Hello,
>
>Thanks for the info !
>But what I'm trying to do is to pass parameters from the dashboard to
>the class.
>
>For example the following :
>
>class ntp ($ntp_servers) {
>...
>}
>
>Add this class to dashboard, in a group called "Global" and set in
>this group a parameter key = ntp_servers with value = some.ntp.server
>
>Maybe this is here that I'm wrong, here is my site.pp
>
>cat /etc/puppet/manifests/site.pp
>node default {
>}
>
>All classes and nodes are managed through the dashboard.
>
>Thanks,
>
>G.
>
>
>
>
>On Feb 27, 6:50 pm, Nan Liu  wrote:
>> On Mon, Feb 27, 2012 at 6:56 AM, Smith  wrote:
>> > Hi all,
>>
>> > I'll use puppet to manage +/- 10 servers, but I'm facing some problems
>> > about facter variables, dashboard and parameters.
>>
>> > I try to use this module :
>>
>> >http://projects.puppetlabs.com/projects/1/wiki/Resolv_Conf_Patterns
>>
>> That example is out of date in terms of best practices, modules should
>> be written without requiring import function.
>>
>> > class resolver {
>> ># noop
>> > }
>>
>> > define resolv_conf($domainname = "$domain", $searchpath, $nameservers)
>> > {
>> >file { "/etc/resolv.conf":
>> >owner   => root,
>> >group   => root,
>> >mode=> 644,
>> >content => template("resolver/resolv.conf.erb"),
>> >}
>> > }
>>
>> There's no reason for the configuration to be a define since there's
>> one specific file /etc/resolv.conf. The parameter should be part of
>> the class and looked up from top scope which will allow you to specify
>> the class and parameter in dashboard.
>>
>> This is probably a better starting
>>point:https://github.com/saz/puppet-resolv_conf, and you'll need to
>>either
>> change the module to accept parameters from top scope or write a
>> wrapper class that passes the parameter from dashboard.
>>
>> Thanks,
>>
>> Nan
>
>--
>You received this message because you are subscribed to the Google Groups
>"Puppet Users" group.
>To post to this group, send email to puppet-users@googlegroups.com.
>To unsubscribe from this group, send email to
>puppet-users+unsubscr...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/puppet-users?hl=en.
>

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



Re: [Puppet Users] Re: Unresponsive Agents - PE 2.0

2012-02-23 Thread Kenneth Lo
If that's the case I believe your pe-puppet-dashboard-workers service died
somehow in your master.

--KL

On 2/23/12 9:51 AM, "Robert Stinnett"  wrote:

>We are using RHEL - 2.6.18-238.1.1.0.1.el5xen
>
>I do not know of any recent kernel patches (let me put it this way --
>I didn't make any!).
>
>If I go to the "Live Management" part of the dashboard I can control
>the agents, etc -- but they won't do anything in the dashboard view
>and it shows up as over 800 tasks are backlogged on them.
>
>I've searched the log files I could find for any error messages, but
>haven't found anything yet.  It seems strange that the agents work in
>command-line mode, and through the live management, but aren't via the
>dashboard/cron process,
>
>Thanks,
>Robert Stinnett
>
>
>On Feb 22, 3:53 pm, Aaron Grewell  wrote:
>> Are you running RHEL 5?  Did you recently patch your kernel?  If so,
>> you've probably been bitten by a kernel bug.  I've successfully used
>> kernel-2.6.18-274.17.1.el5 and backrev versions from the
>> kernel-2.6.18-238.x.x series.
>>
>> On 02/22/2012 12:26 PM, Robert Stinnett wrote:
>>
>>
>>
>>
>>
>>
>>
>> > Hi there,
>>
>> > I am relatively new to Puppet (totally new) and had been cruising
>> > right along for a few days until about a week ago when our puppet
>> > agents went unresponsive.  I've restarted both them and the servers
>> > several times to no avail.  Can anyone point me down the path of how
>> > to diagnose this issue?  We are currently evaluating Puppet to bring
>> > into our Enterprise for managing server provisions/configs/etc.
>>
>> > Thanks,
>> > Robert Stinnett
>
>--
>You received this message because you are subscribed to the Google Groups
>"Puppet Users" group.
>To post to this group, send email to puppet-users@googlegroups.com.
>To unsubscribe from this group, send email to
>puppet-users+unsubscr...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/puppet-users?hl=en.
>

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



Re: [Puppet Users] Re: Cannot see node on Live Management

2012-02-21 Thread Kenneth Lo
Just try restart the mcollective service on the agent and check if you see
any error there.

You should also check if there are anything in-between your agent and
master that's blocking traffic. Mcollective traffic goes from agent to the
master, not the other way around.

--KL

On 2/21/12 10:46 AM, "Mark B"  wrote:

>The pe-activemq is running on the server and the pe-mcollective is
>running on the agent. The reports from the client are showing up on
>the puppet console. Just not seeing the node on live management
>screen. Is there a way to manually do a new puppet run to try and
>force it?
>
>On Feb 21, 10:17 am, Kenneth Lo  wrote:
>> In PE, pe-activemq is the server service (master need that service) and
>> pe-mcollective is the client service (agents).
>>
>> If you don't see your agents listed in LM normally means that the
>> pe-mcollective service is not running on the clients.
>>
>> What I've experienced with PE is that under normal turn-key config,
>>after
>> your agent initially connected to the master, by default it need to wait
>> for another puppet run for the mcollective class (in default) to pickup
>> the service.
>>
>> --KL
>>
>> On 2/21/12 8:08 AM, "Mark B"  wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> >Yes...I was able to do the mco ping and the only node that responded
>> >was the puppet master ..not the client. Both activemq and mcollective
>> >appear to be working.
>>
>> >is there a pe-users group? I thought that is what this was ?
>>
>> >On Feb 20, 2:58 pm, Justin Stoller  wrote:
>> >> Have you tried su-ing to thepeadminuser on the master node and trying
>> >> `mco ping`?
>>
>> >> Live Management is basically a front end for actions thepeadminuser
>> >>can
>> >> do. Dropping down to that level may let you debug the issue easier.
>>
>> >> Other things to check are that activemq is working and correctly
>> >>configured
>> >> on the master, as well as mcollective on all of your agent nodes.
>>
>> >> You may also find more users that understand your question on the
>> >>pe-users
>> >> list (I assume if you're using Live Management you're using PE)
>>
>> >>  - Justin
>>
>> >> On Mon, Feb 20, 2012 at 11:35 AM, Littman, Mark B
>> >>wrote:
>>
>> >> > Yes it is in the default group. I am wondering if it is a
>>permissions
>> >> > issue for the puppet user account? Does that need anything special
>> >>for live
>> >> > management ?
>>
>> >> > Reminder: it shows on all other tabs on the puppet console...just
>>not
>> >>live
>> >> > management.
>>
>> >> > -Original Message-
>> >> > From: puppet-users@googlegroups.com
>> >>[mailto:puppet-users@googlegroups.com]
>> >> > On Behalf Of Michael Stahnke
>> >> > Sent: Monday, February 20, 2012 2:31 PM
>> >> > To: puppet-users@googlegroups.com
>> >> > Subject: Re: [Puppet Users] Cannot see node on Live Management
>>
>> >> > On Mon, Feb 20, 2012 at 4:29 AM, Mark B 
>>wrote:
>> >> > > The node and reports show up on the dashboard but not on the live
>> >> > > management tab.
>>
>> >> > > Does anyone have any suggestions? is this a permissions issue?
>>
>> >> > Is the node in the default group in the dashboard?  Puppet runs
>>setup
>> >>the
>> >> > mcollective/live management bits.  The class is called
>>pe_mcollective.
>>
>> >> > > --
>> >> > > You received this message because you are subscribed to the
>>Google
>> >> > Groups "Puppet Users" group.
>> >> > > To post to this group, send email to
>>puppet-users@googlegroups.com.
>> >> > > To unsubscribe from this group, send email to
>> >> > puppet-users+unsubscr...@googlegroups.com.
>> >> > > For more options, visit this group at
>> >> >http://groups.google.com/group/puppet-users?hl=en.
>>
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> >>Groups
>> >> > "Puppet Users" group.
>> >> > To post to this group, send email to puppet-users@googlegroups.com.
>> >> > To unsubscribe from this 

[Puppet Users] mcollective plugin question

2012-02-21 Thread Kenneth Lo
We've been using mcollective primarily for coordinate service restart across 
nodes as well as facts-finding, which are all well and good.

One thing we would like to utilize this tool is to create an arbitrary shell 
command plugins/services so our master can really act as a command center.

I spoke with a couple folks and know that this is just as a matter of writing 
the plugin itself, but I'm wondering if folks here already have a solution for 
it or if you have any pointers we can check.  :)

Thx in advance.

--KL

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



Re: [Puppet Users] Re: Cannot see node on Live Management

2012-02-21 Thread Kenneth Lo
In PE, pe-activemq is the server service (master need that service) and
pe-mcollective is the client service (agents).

If you don't see your agents listed in LM normally means that the
pe-mcollective service is not running on the clients.

What I've experienced with PE is that under normal turn-key config, after
your agent initially connected to the master, by default it need to wait
for another puppet run for the mcollective class (in default) to pickup
the service.

--KL

On 2/21/12 8:08 AM, "Mark B"  wrote:

>Yes...I was able to do the mco ping and the only node that responded
>was the puppet master ..not the client. Both activemq and mcollective
>appear to be working.
>
>is there a pe-users group? I thought that is what this was ?
>
>On Feb 20, 2:58 pm, Justin Stoller  wrote:
>> Have you tried su-ing to the peadmin user on the master node and trying
>> `mco ping`?
>>
>> Live Management is basically a front end for actions the peadmin user
>>can
>> do. Dropping down to that level may let you debug the issue easier.
>>
>> Other things to check are that activemq is working and correctly
>>configured
>> on the master, as well as mcollective on all of your agent nodes.
>>
>> You may also find more users that understand your question on the
>>pe-users
>> list (I assume if you're using Live Management you're using PE)
>>
>>  - Justin
>>
>> On Mon, Feb 20, 2012 at 11:35 AM, Littman, Mark B
>>wrote:
>>
>>
>>
>>
>>
>>
>>
>> > Yes it is in the default group. I am wondering if it is a permissions
>> > issue for the puppet user account? Does that need anything special
>>for live
>> > management ?
>>
>> > Reminder: it shows on all other tabs on the puppet console...just not
>>live
>> > management.
>>
>> > -Original Message-
>> > From: puppet-users@googlegroups.com
>>[mailto:puppet-users@googlegroups.com]
>> > On Behalf Of Michael Stahnke
>> > Sent: Monday, February 20, 2012 2:31 PM
>> > To: puppet-users@googlegroups.com
>> > Subject: Re: [Puppet Users] Cannot see node on Live Management
>>
>> > On Mon, Feb 20, 2012 at 4:29 AM, Mark B  wrote:
>> > > The node and reports show up on the dashboard but not on the live
>> > > management tab.
>>
>> > > Does anyone have any suggestions? is this a permissions issue?
>>
>> > Is the node in the default group in the dashboard?  Puppet runs setup
>>the
>> > mcollective/live management bits.  The class is called pe_mcollective.
>>
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > Groups "Puppet Users" group.
>> > > To post to this group, send email to puppet-users@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > puppet-users+unsubscr...@googlegroups.com.
>> > > For more options, visit this group at
>> >http://groups.google.com/group/puppet-users?hl=en.
>>
>> > --
>> > You received this message because you are subscribed to the Google
>>Groups
>> > "Puppet Users" group.
>> > To post to this group, send email to puppet-users@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > puppet-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> >http://groups.google.com/group/puppet-users?hl=en.
>>
>> > --
>> > You received this message because you are subscribed to the Google
>>Groups
>> > "Puppet Users" group.
>> > To post to this group, send email to puppet-users@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > puppet-users+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> >http://groups.google.com/group/puppet-users?hl=en.
>
>--
>You received this message because you are subscribed to the Google Groups
>"Puppet Users" group.
>To post to this group, send email to puppet-users@googlegroups.com.
>To unsubscribe from this group, send email to
>puppet-users+unsubscr...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/puppet-users?hl=en.
>

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



Re: [Puppet Users] Question about reusing classes/modules

2012-02-13 Thread Kenneth Lo
Eric:

Can you elborate on why global variables is a bad idea? Most of my 
environment's key-value pairs are set via dashboard as ENC, which I think are 
all global.

--KL

From: Eric Shamow mailto:e...@puppetlabs.com>>
Reply-To: "puppet-users@googlegroups.com" 
mailto:puppet-users@googlegroups.com>>
Date: Sat, 11 Feb 2012 20:48:24 -0500
To: "puppet-users@googlegroups.com" 
mailto:puppet-users@googlegroups.com>>
Subject: Re: [Puppet Users] Question about reusing classes/modules

I would avoid this approach - global variables aren't a good idea.

Hiera would be a better approach:

http://www.devco.net/archives/2011/06/05/hiera_a_pluggable_hierarchical_data_store.php
http://www.devco.net/archives/2011/06/06/puppet_backend_for_hiera.php

-Eric

--

Eric Shamow
Professional Services
http://puppetlabs.com/
(c)631.871.6441


On Saturday, February 11, 2012 at 7:08 PM, krish wrote:

My scenario is this: I have 4 environments, Dev, Test, QA, Prod. Each
of these environments lives in 2 sites, LA and NY. I have 5
applications that are site and env specific.

I want to use puppet to template-ize the config files that is required
for each env, per site, per app, so 40 files.

The config file is basically key=value pairs. Here's a simple example
of what each file may look like:

site=LA
env=Dev
app=App1
masterServer=host1
clientServer1=host2
clientServer2=host3


How about having these key value pairs in site.pp with a case environment
Then they become global to all modules.



--
Krish
olindata.com

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


--
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to 
puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



Re: [Puppet Users] Another dashboard question..

2012-02-10 Thread Kenneth Lo
I'm still relatively new on puppet, but we've been using dashboard quite 
extensively so I'm hoping I'm providing the correct answer:

>From dashboard a class is simply a place-holder for referencing puppet module 
>from the backend.

A group is where you can assign classes into nodes, as well as creating 
parameters that your backend modules and templates can use as global variable. 
It also support inhertiance where nodes/class does not (from dashboard)

--KL

From: Peter Berghold mailto:salty.cowd...@gmail.com>>
Reply-To: "puppet-users@googlegroups.com" 
mailto:puppet-users@googlegroups.com>>
Date: Fri, 10 Feb 2012 13:49:12 -0500
To: "puppet-users@googlegroups.com" 
mailto:puppet-users@googlegroups.com>>
Subject: [Puppet Users] Another dashboard question..

what does dashboard consider a "class?" what does dashboard consider a "group?" 
 Is there documentation for all this that I've missed?


--
Peter L. Berghold
Owner, Shark River Technical Solutions LLC

--
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to 
puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



[Puppet Users] What is the fully-qualified variable name format for external and factors variable in template erb file?

2012-02-06 Thread Kenneth Lo
Trying to cleanup warning messages like the following:

Dynamic lookup of $domain at 
/etc/puppetlabs/puppet/modules/centrifydc/templates/centrifydc.conf.erb:222 is 
deprecated.  Support will be removed in Puppet 2.8.  Use a fully-qualified 
variable name (e.g., $classname::variable) or parameterized classes.


Do I simply replace <%= domain %> with <%= ::domain %>  ?

Same goes with variables define via dashboard?

Thx in advance.

--KL
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



Re: [Puppet Users] Chef knife equivalent in puppet

2012-02-01 Thread Kenneth Lo

Hi Nan:

I'm interested to know more regarding your comment. In my environment
we've decided to use dashboard for ENC and "the one true source" for
customization (parameters, node configuration etc).

Where is the place to check on tutorial and documentation your suggestion?
I have no real prior knowledge on ruby. Thx in advance.

--KL

On 1/31/12 11:03 PM, "Nan Liu"  wrote:

>
>
>If you use an ENC such as dashboard, you can use rake task or REST API
>to modify the system's class.
>
>HTH,
>
>Nan
>
>--
>You received this message because you are subscribed to the Google Groups
>"Puppet Users" group.
>To post to this group, send email to puppet-users@googlegroups.com.
>To unsubscribe from this group, send email to
>puppet-users+unsubscr...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/puppet-users?hl=en.
>

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



[Puppet Users] What's the proper puppet way to reference definition resource WITHOUT calling it from site/node.pp

2012-01-23 Thread Kenneth Lo

The way my environment setup is that we have puppet dashboard handles ALL node 
registration as well as class assignment. We simply declare different groups, 
assign them with classes, and assign nodes into those groups for different 
roles.

So we have zero usage for another node resources and we would like to keep it 
that way.

The pro puppet book example for utilizing the apache definition shows that you 
simply call the definition in node.pp with proper parameters, and I want to do 
something similar without calling it in a separate node.pp file.

In term of approach what I can think of right now is to create another class 
(let's say apache-invoke), and I would have template parameters created via 
puppet dashboard's parameter (on some nodes/groups),  and have this new class 
call the apache definition. Then I can have whatever nodes I need to have 
apache to be part of this new groups.

I'm not sure if there are another way that's better/proper. Please let me know, 
thx.


--KL
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



RE: [Puppet Users] Recommendation for general practice for application deployment?

2011-12-23 Thread Kenneth Lo
"What are the problems this requirement is intended to solve?"


What I was told from my eng team is that tomcat's hot-deployment for our app 
will eventually break, so we want to always make sure tomcat is stop before the 
deployment, and starting up fresh.

We will probably go with Doug's suggestion earlier and re-package our app and 
process via rpm directly.

--KL

From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On 
Behalf Of Nigel Kersten
Sent: Friday, December 23, 2011 2:00 PM
To: puppet-users@googlegroups.com
Subject: Re: [Puppet Users] Recommendation for general practice for application 
deployment?


On Tue, Dec 20, 2011 at 8:26 AM, Kenneth Lo 
mailto:k...@paydiant.com>> wrote:
Hi:

I have a pretty general high-level question regarding application deployment 
using puppet infrastructure.

Being new with puppet here we have a pretty simple module setup where we are 
utilizing a basic package-file-service combo for an tomcat application server, 
and with some additional war files for our apps.

One of the engineering requirement regarding app deployment is to make sure 
tomcat shutdown cleanly before we move in with the new app war files.

What are the problems this requirement is intended to solve?





The way we handle new app release is via file resource that point to different 
puppet source based on the release tag.

So the question is, given the service resource is also within the same module 
with the file, how do I make sure we can do the following sequentially?:

1. Shutdown the tomcat instance (service resource in tomcat module)
2. Update the application war file  (file resource in tomcat module)
3. Start the tomcat instance

We've been using mcollective to manually shutdown the service before applying 
puppet run, but I'm not sure if the sequence is correct. Thanks in advance.


--KL
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.
--
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to 
puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com<mailto:puppet-users%2bunsubscr...@googlegroups.com>.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



--
Nigel Kersten
Product Manager, Puppet Labs

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

No virus found in this message.
Checked by AVG - www.avg.com<http://www.avg.com>
Version: 2012.0.1901 / Virus Database: 2109/4698 - Release Date: 12/23/11
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



[Puppet Users] Recommendation for general practice for application deployment?

2011-12-20 Thread Kenneth Lo
Hi:

I have a pretty general high-level question regarding application deployment 
using puppet infrastructure.

Being new with puppet here we have a pretty simple module setup where we are 
utilizing a basic package-file-service combo for an tomcat application server, 
and with some additional war files for our apps.

One of the engineering requirement regarding app deployment is to make sure 
tomcat shutdown cleanly before we move in with the new app war files.

The way we handle new app release is via file resource that point to different 
puppet source based on the release tag.

So the question is, given the service resource is also within the same module 
with the file, how do I make sure we can do the following sequentially?:

1. Shutdown the tomcat instance (service resource in tomcat module)
2. Update the application war file  (file resource in tomcat module)
3. Start the tomcat instance

We've been using mcollective to manually shutdown the service before applying 
puppet run, but I'm not sure if the sequence is correct. Thanks in advance.


--KL
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

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



Re: [Puppet Users] Re: new user: need Conditional statement example within a file resource type

2011-12-14 Thread Kenneth Lo
right, the reason I did not opt for this syntax is because my file
resource is actually quite large, and I think the other method Stefan
suggested has better readability.


On Wed, Dec 14, 2011 at 7:34 AM, Felix Frank
 wrote:
> This should also work:
>
> file { "somefile": source => ..., owner => ... }
>
> if $::hasfile {
>  File["somefile"] { ensure => present }
> }
> else {
>  File["somefile"] { ensure => absent }
> }
>
> It's up to you to decide which is more obscure.
>
> Cheers,
> Felix
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>

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



Re: [Puppet Users] Re: new user: need Conditional statement example within a file resource type

2011-12-14 Thread Kenneth Lo
This works. thx!

Another rookie question, what is the :: in front of the variable name
signify in general?

--KL

On Tue, Dec 13, 2011 at 3:37 PM, Stefan Heijmans
 wrote:
> How about something like;
>
>
> $hasfile = true
> if $::hasfile {
>    $fileensure = 'present'
> }
> else {
>    $fileensure = 'absent'
> }
>
> file { "somefile" :
>
>         ensure => $::fileensure,
>         source => "puppet:///somefile",
>         owner => "root",
>         .
>         .
>         .
> }
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/CWF3DekKQwAJ.
>
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

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



[Puppet Users] new user: need Conditional statement example within a file resource type

2011-12-13 Thread Kenneth Lo
Searching old archive I find this topic:

http://groups.google.com/group/puppet-users/browse_thread/thread/187ee3897a26ae2a/32fea612e79dda80?hl=en&lnk=gst&q=puppet+case+statement+in+file+resource#32fea612e79dda80


I understand that  "case statements must be outside of resource
statements" per that discussion and I understand the usage for the
selector in-statement solution, however that's just for assignment
though.

Consider this simple file resource, I just want to have a external
variable that control whether I need the file in the system:

file { "somefile" :

case ${hasfile} {
   "true": { ensure => present }
   default: { ensure => absent }
}
source => "puppet:///somefile",
owner => "root",
.
.
.
}


Obviously I had a syntax error here because case statement is not
happy within the resource.

So, what's a recommended puppet way to do something like this? thx in
advance.

--KL

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