Re: [Puppet Users] Pycon 2011

2011-03-12 Thread Richard Crowley
>>> Here are the slides from this unfortunately short and speedy intro: >>>  http://rcrowley.org/talks/pycon-2011/ >>> >> >> How can  I see the short slides ? I can't get beyond 1st slide using >> IE,FF or Chrome. >> > > Never mind. for http://rcrowley.org/talks/pycon-2011/#1, > Just keep increase

Re: [Puppet Users] Pycon 2011

2011-03-12 Thread Richard Crowley
On Friday, March 11, 2011 at 1:02 PM, Richard Crowley wrote: I'm the one giving the talk. Airlines have forced it to be rescheduled > for today at 4:55 in Centenial 2. > > On Friday, March 11, 2011, Corey Osman wrote: > > Hi, someone is giving a talk about puppet at pycon.

Re: [Puppet Users] Pycon 2011

2011-03-11 Thread Richard Crowley
I'm the one giving the talk. Airlines have forced it to be rescheduled for today at 4:55 in Centenial 2. On Friday, March 11, 2011, Corey Osman wrote: > Hi,  someone is giving a talk about puppet at pycon.  Are there any other > puppet users at pycon? > > Sent from my iPhone > > -- > You receive

Re: [Puppet Users] Re: Propagating local config changes from a client to the puppetmaster

2011-03-02 Thread Richard Crowley
On Wednesday, March 2, 2011 at 5:52 PM, Patrick Connolly wrote: Still trying to sort out whether this use-case even makes sense, but what if I were to use Puppet to standardize development environments? > > It may be the case that someone makes a change or sets themselves up with a > tool/config

Re: [Puppet Users] Puppet without FQDN (could not retrieve fact fqdn)

2011-03-02 Thread Richard Crowley
On Wednesday, March 2, 2011 at 4:43 PM, msacks wrote: Hello, > I am testing Puppet and I would like to use it without having to add a > DNS entry. Is there a way around this, or am I required to rely on > DNS? You can run Puppet like this: puppet master --certname=$(cat/etc/puppet/certname) puppe

[Puppet Users] Re: Agent certificate name in a manifest on the master

2011-03-01 Thread Richard Crowley
> Is there a way to access the agent's certname as a variable? > Volcane suggested on IRC: FACTER_certname=$(cat /etc/puppet/certname) puppet agent ... --certname=$(cat /etc/puppet/certname) which works fine. I turned it into a Ruby fact: require 'facter' require 'puppet' Facter.add :certna

[Puppet Users] Agent certificate name in a manifest on the master

2011-03-01 Thread Richard Crowley
Each of my EC2 instances run Puppet as `puppet agent ... --certname=$(cat /etc/puppet/certname)`, which works very well to get each instance to the correct node stanza in nodes.pp. I would like to use this certname value in the default node stanza thus: node default { @@nagios_host { "$setting

[Puppet Users] Re: Stored configs in MySQL

2011-02-10 Thread Richard Crowley
On Thursday, February 10, 2011 at 11:20 AM, Joe McDonagh wrote: Sounds like you're running the wrong version of the mysql rubygem. If > memory serves, this was a known issue. > We're on 2.7.3 packaged by CentOS. http://projects.puppetlabs.com/issues/3238 seems to indicate the problem exists even

[Puppet Users] Re: Stored configs in MySQL

2011-02-10 Thread Richard Crowley
Trouble is, each time a node checks into puppet, a new db handle is > opened without the old one being closed. With a few nodes, it doesn't > take long before there are tens or hundreds of handles, and the db > server won't accept any more. I've just run into this issue as well with the followin

[Puppet Users] Re: Exported resources and the tag function

2011-02-03 Thread Richard Crowley
The other alternative is to call the tag function in a node but it seems the tag is not inherited so rather than defining the tag in the default node, I'd have to do so in every node. The lack of inheritance seems to be by design so I'm fine using a define if I can get it to work. > > I am led

[Puppet Users] Re: Ordering

2011-02-03 Thread Richard Crowley
On Thursday, February 3, 2011 at 9:53 AM, Adam Gibbins wrote: Hi All, > I'm trying to implement a template (for my collectd config) that gives > different results depending on the other modules included on that machine. > I tried to do this by checking for the class tags but it turns out that due

[Puppet Users] Exported resources and the tag function

2011-02-03 Thread Richard Crowley
Should I be able to use the built-in tag function... define nagios::host($hostgroups) { tag "environment:$environment" nagios_host { "$name": address => "$ipaddress_eth0", contact_groups => "ops", hostgroups => $hostgroups, notify => Service["nagios"], require => File["/etc/nagios/hosts"], ta

[Puppet Users] Re: Supporting tar.gz as file source

2011-01-05 Thread Richard Crowley
> It would be neat if puppet could use tar.gz's as a source, instead of > just bare directory trees. So I've lodged a feature request: > https://projects.puppetlabs.com/issues/5786 > > Many of my manifests for applications need to cover the following > process: 1. Download .tar.gz to host > 2.

[Puppet Users] Re: race conditions in using "svn update" in puppetmaster's /etc/puppet directory?

2011-01-03 Thread Richard Crowley
> So, here's my question: if you are currently using the "svn update" > approach to manage /etc/puppet on the puppetmaster, have you taken > conscious steps to help avoid a race condition? If so, what are they? > And if not, why not? > I do something like this to deploy all web apps, the Puppet m

Re: [Puppet Users] Separating puppetmaster file serving and catalogs

2010-12-16 Thread Richard Crowley
> Is it possible to have the fileserving subset of puppetmasters running > without any SSL support? That's throwing security out of the windows of > course, so the proxy should be able to determine (say, by IP rule?) what > clients are allowed and which aren't. This seems like a job for a new file

Re: [Puppet Users] source /etc/profile

2010-12-15 Thread Richard Crowley
On Tue, Dec 14, 2010 at 9:42 AM, Adrian wrote: > Hello , > > There is a way to source /etc/profile inside puppet on demand? > > My problem is that I install Java, afterwards I set JAVA_HOME variable > in /etc/profile. > > After Java is installed, a gem which depends on Java starts to > install ...

Re: [Puppet Users] design advice on coding my first type / provider

2010-12-12 Thread Richard Crowley
> 2. is going to do unnecessary work (and I'll have to create the user > if they don't exist anyway) I've written types that do this with great success. Be careful that performing that repetitive action isn't expensive or otherwise degrading to normal operation. If it creates any kind of race co

Re: [Puppet Users] Re: Python pip package provider

2010-12-09 Thread Richard Crowley
On Thu, Dec 9, 2010 at 12:12 PM, Kevin Beckford wrote: > distribute2 is the way forward, not pip, I believe. Distribute is taking over for setuptools for building packages. Pip is taking over for easy_install for installing packages from the central PyPI repository. -- You received this messag

[Puppet Users] Python pip package provider

2010-12-08 Thread Richard Crowley
(Patrick's Homebrew provider lit a fire under me to finish this.) I've written a provider for Python's pip package management frontend. It's (theoretically) the standard for the future, being more capable and less shit than easy_install. https://github.com/rcrowley/puppet-pip As noted in the REA

Re: [Puppet Users] Same Service in Different Classes

2010-11-15 Thread Richard Crowley
> I define two classes, each of them has the same service defined in it, if I > include both classes for a node it will fail complaining "Duplicated > definition: Service[xxx]". > > Just wondering is there a way to work around this? Define the service in a third class and include that third class

Re: [Puppet Users] Re: Managing private key files; content=>file vs. binary content.

2010-11-10 Thread Richard Crowley
On Wed, Nov 10, 2010 at 10:39 AM, Thomas Bendler wrote: > 2010/11/10 Richard Crowley >> >> [...] >> This works perfectly for PEM-formatted keys because they're ASCII, >> which is a subset of UTF-8.  Binary keys are not (usually) valid UTF-8 >> and thus c

Re: [Puppet Users] Re: Managing private key files; content=>file vs. binary content.

2010-11-10 Thread Richard Crowley
> got the point, thought that you need one specific key on each server. So > that should be even simpler, use file with content and put the key in the > content field: > > $myKey = "-BEGIN RSA PRIVATE > KEY-\nMIICXgIBAAKBgQDTqkVS4/iwKx8LngXQrEShlfSRtcSyOB1IjC5AIGUAJvapq9lz\n..." > > file {

Re: [Puppet Users] Managing private key files; content=>file vs. binary content.

2010-11-10 Thread Richard Crowley
> All good, except that in 0.25 and up (which we're slowly migrating > to), this often doesn't work. The rest APIs require UTF-8 content, and > keys are binary, so catalog requests fail if the key happens to > contain bytes which aren't valid UTF-8. (http:// > projects.puppetlabs.com/issues/4832 ta

Re: [Puppet Users] EC2 with puppet bootstrap notes and scripts

2010-11-08 Thread Richard Crowley
> Why would you use Capistrano to manage puppet.conf on your masters?  Does it > give you some advantage over just using puppet to manage itself? We have about half a dozen different web applications that we deploy, all via git-archive(1) and Capistrano. The Puppet master is one of those and is

Re: [Puppet Users] How can I reload environment variable file using puppet?

2010-11-08 Thread Richard Crowley
> Hi I'm trying to setting http_proxy environment variable by adding it > to the /etc/environment file. > > I was wondering how I can force puppet to reload this file whenever > the file changes. > > I have tried a few things and none of them have worked, > > 1.) >    exec { "source_environment": >

Re: [Puppet Users] EC2 with puppet bootstrap notes and scripts

2010-11-08 Thread Richard Crowley
>> +1.  Catalogs that need to "converge" or are anything but a no-op on >> their second run should be considered broken. > > *) My philosophy is this puppet.conf should be managed by puppet. > *) Sometimes a run won't be completed correctly unless puppet.conf is up to > date at the start of a run.

Re: [Puppet Users] EC2 with puppet bootstrap notes and scripts

2010-11-08 Thread Richard Crowley
>> 3) One last chance just in case something didn't work, timed out, or I >> forgot a require.  (Finishes in seconds for me) > > Honestly, you should be discovering such missing requires in your testing > process. It's not good practice to simply run another one "just in case" in > my opinion. +1.

Re: [Puppet Users] EC2 with puppet bootstrap notes and scripts

2010-11-08 Thread Richard Crowley
>  When a generic EC2 instance is started it has a hostname of > localhost.localdomain (or something like ip-10-111-222-33), a > searchdomain of ec2.internal, and only the loopback address > in /etc/hosts.  To get a puppet client to bootstrap correctly all three > of these things need to be changed

Re: [Puppet Users] Restarting services

2010-11-05 Thread Richard Crowley
On Fri, Nov 5, 2010 at 1:20 PM, byron appelt wrote: > Is it possible to use a Service resource, but not have puppet start or > start the service? I want to declare service resources so that I can > easily make sure that puppet will restart them when packages are > upgraded, etc., but I do not want

Re: [Puppet Users] Lenny and lenny-backports

2010-11-05 Thread Richard Crowley
On Fri, Nov 5, 2010 at 9:52 AM, Walter Heck wrote: > Hi all, > > I'm runnign debian lenny and that has puppet 0.24.5 in it. Lenny- > backports ahs Puppet 2.6.2 in it, which is what I want. How do I make > puppet update itself through puppet recipes? I already had it create > an /etc/apt/preference

Re: [Puppet Users] command line switches for a provider?

2010-11-04 Thread Richard Crowley
On Thu, Nov 4, 2010 at 4:55 PM, bobics wrote: > I'd like to pass command line options for a package installed via a > gem provider.  In particular, I'm updating puppet, the equivalent > command would be: > >    /usr/bin/gem1.8 install puppet -v=2.6.1 --no-rdoc --no-ri > > (The extra docs that gets

Re: [Puppet Users] RFC: Make file content specification methods consistent.

2010-11-01 Thread Richard Crowley
(This is probably too radical but bear with me.) The proposals floating around involving some functions, some + operators, and some parameters that accept strings or arrays seem to create lots of leaky abstractions. For example, if the + operator does anything but concatenate strings or add numbe

Re: [Puppet Users] Accessing Facter in other languages than Ruby?

2010-10-22 Thread Richard Crowley
> We're writing a few scripts at the moment that could really make use of > Facter, however the vast majority of them team (including my self!) are not > proficient in Ruby, however they are highly proficient in other languages such > as (dare I say it!) Python. Many of the facts already fork so w

Re: [Puppet Users] Pulling in a Hash from an external data source?

2010-10-21 Thread Richard Crowley
On Thu, Oct 21, 2010 at 5:17 PM, Matt Wise wrote: > I have a scenario where I'd like to pull in a hash table from an external > file (really, a generate() function.. but for testing purposes, a file will > do)... is there any way to do that? You probably want the extlookup function: http://doc

Re: [Puppet Users] Can a hacker take over by impersonating puppetmaster?

2010-10-04 Thread Richard Crowley
>> I was wondering how easy/hard is it for a hacker to control my hosts >> by impersonating puppetmaster, say by poisoning DNS to point >> puppet.dom.ain to their own server? >> Are there reasosns why that would not work? > > The SSL layer and its key exchange mechanism should handle that. New age

Re: [Puppet Users] why does puppet shuffle its ‘ph ases’ and how can I stop this?

2010-09-27 Thread Richard Crowley
> The code above works (still learning the syntax though!), but what's > bothering me is that parts of this code (let me call them 'phases') > keep on running in different order: With very few exceptions (that are all made for time savings so you can ignore them safely) all resources (what you wer

Re: [Puppet Users] why does puppet shuffle its ‘ph ases’ and how can I stop this?

2010-09-27 Thread Richard Crowley
> With very few exceptions (that are all made for time savings so you > can ignore them safely) all resources (what you were calling phases) > must explicitly declare their dependencies on other resources using > before and require [1] [2]. s/before and require/before or require/ -- You received

Re: [Puppet Users] chroot'ed daemon restart error

2010-09-23 Thread Richard Crowley
On Wed, Sep 22, 2010 at 11:38 AM, Jewels wrote: > Hi all.. > > Having a strange problem and searhed through the groups, can't find > anything. Have a couple of chrooted daemons that are giving an error > with "ensure => running", even with a "hasrestart = true" > > Simply put it errors with a retu

Re: [Puppet Users] Re: nginx + passenger + puppetmaster

2010-09-23 Thread Richard Crowley
On Thu, Sep 23, 2010 at 7:52 AM, Dan Urist wrote: > I've switched to using nginx+unicorn, and haven't had any issues. The > only hassle for me is that I'm running it under Ubuntu, and unicorn > isn't (yet) packaged by Debian/Ubuntu, so I had to install it via gems > and don't have the advantage of

Re: [Puppet Users] A question about synchronization

2010-09-21 Thread Richard Crowley
> Suppose I have 3 nodes, and I want puppet to perform a set of steps on > them in a different order: > Apply step A on each of them, then step B on each of them, then step C > on each of them, and so on. > I'm wondering if puppet supports this scenario. Thanks. In other words, you want to guarant

Re: [Puppet Users] using puppet ssl certs for other applications

2010-08-06 Thread Richard Crowley
I use Puppet's certs to setup stunnels and do all other private communication through those. I also reference them directly rather than copying them around. I haven't gone through the whole firedrill yet but this at least seems like it won't make moving services between hosts more painful. Rich (

Re: [Puppet Users] Re: getting empty files from fileserver

2010-08-03 Thread Richard Crowley
> Passenger is still the preferred way to scale a puppetmaster (until I > progress on the JRuby front). I've had great success running Puppet 0.25.4, 0.25.5, and 2.6.0 under Nginx and Unicorn. Alas, http://projects.puppetlabs.com/issues/4319 is still in play. I use the highly suspect "give up an

Re: [Puppet Users] Re: generating catalog files

2010-08-03 Thread Richard Crowley
>> > Is there a way I can easily generate the catalog for a particular >> > puppet client, without actually running Puppet on that client? `puppet agent --noop` might be just the ticket. You'll run that command on the client, so this may be non-starter, but it won't actually do anything. -- You

Re: [Puppet Users] exec not finding shell builtins/functions?

2010-07-29 Thread Richard Crowley
On Thu, Jul 29, 2010 at 3:23 PM, Greg Graf wrote: > Hello, > > We're running 2.6 on Ubuntu 10.04 and here's what I'm seeing (simplified > test): > > class cdtest { >  exec {'cdtest': command => 'cd' } > } > > # puppet agent --test > info: Caching catalog for servername > info: Applying configurat

Re: [Puppet Users] Design, syntax question for passing values from node.pp

2010-07-23 Thread Richard Crowley
On Fri, Jul 23, 2010 at 1:10 PM, Peter Berghold wrote: > First question that comes to mind: is there a fact for a given node that > determines what file name to use? This sounds like a job for an external node classifier that picks a set of classes to apply to the node. http://docs.reductivelabs

Re: [Puppet Users] manage desktops

2010-06-15 Thread Richard Crowley
On Tue, Jun 15, 2010 at 12:12 PM, Daniel De Marco wrote: > I'm starting to look into puppet to manage a bunch of linux desktops. > They all use dhcp and their IP addresses are not fixed. > > I'm thinking of fixing the hostnames of the machines to some non-existent > domain and then using puppet no

Re: [Puppet Users] Separate install for just client code?

2010-06-15 Thread Richard Crowley
On Tue, Jun 15, 2010 at 2:27 PM, Forrie wrote: > Is there a way to just install the client component of the Puppet gem, > install of both on systems that don't need the server/master > component. There's only the monolithic gem as far as I've ever been able to find, which is what I use because th

Re: [Puppet Users] Nagios checks

2010-05-27 Thread Richard Crowley
On Thu, May 27, 2010 at 12:19 PM, Michael DeHaan wrote: > On Thu, May 27, 2010 at 2:37 PM, Peter Berghold > wrote: >> Has anybody out there written a custom check for Nagios to determine if >> puppetd and/or puppetmasterd is running? I am considering writing one if >> not. I did a minimal check

Re: [Puppet Users] Re: External Nodes

2010-05-13 Thread Richard Crowley
> and so on. For these scripts I need to do a lot of reading and writing > of the nodes. For example, to update the software version, a script > would check the node out of svn, modify the version_core attribute, > comit it back in with a comment saying exactly what it did, and then > trigger a pup