[Puppet Users] puppet-agent gone for Ubuntu Jammy 22.04?

2023-10-12 Thread 'Brad Reaves' via Puppet Users
Hi all,

I am getting install failures on Jammy when I try to install the 
puppet-agent package where apt says the package cannot be found in the 
repo. 

I have tried with both the main apt repo and the nightlies, and with both 
"puppet7" and the plain "puppet" (which I presume is the latest from v8.) 
All fail.  

I'm building images with cloud-init, and the same cloud-init config that 
fails on Jammy succeeds on Focal 20.04.

When I manually search through the Packages files on the repo server, I 
indeed find a puppet-agent package listed for Focal but not Jammy. I'm 
running arm64, but the amd64 package lists seem to have the same problem, 
so I don't think this is an "unsupported architecture" issue.

This is not the old issue where Jammy wasn't listed in the install.sh 
script. The package name just isn't in the repo, apart from being 
referenced by other packages.

Is anyone else having this problem? Is there a workaround that isn't "use 
focal" or "build the agent yourself?"

Thanks!
Brad Reaves

-- 
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/b34922df-12de-4763-be3c-e2104b065e41n%40googlegroups.com.


Re: [Puppet Users] Complex edits on /etc/default/grub (Setting transparent_hugepage at boot time)

2015-07-29 Thread Brad Knowles
On Jul 29, 2015, at 5:01 PM, Tom Limoncelli  wrote:

> The Augeas people never fail to impress!

So long as you’re not trying to edit XML files with Augeas.  That’s 80% of the 
way there, maybe even 90% of the way there.

But that last 10-20% will drive you absolutely bloody batshit insane.

--
Brad Knowles 
LinkedIn Profile: <http://tinyurl.com/y8kpxu>

-- 
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/2F2AA56C-7BE5-4FE7-94D2-55EB893E517E%40shub-internet.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP using GPGMail


[Puppet Users] Using puppetlabs-apache to help install and secure Apache httpd 2.2?

2015-06-09 Thread Brad Knowles
Folks,

So, I’m running into some issues with this module, and I wanted to ask for your 
advice.

First, some background.  I’m helping develop the systems that will allow a 
certain government agency to deploy their own public and private cloud systems. 
 One of the web servers they want to include is Apache httpd.  Of course, they 
also have an extensive document that they want us to follow with regards to 
hardening this system, an example of which can be found at 
<https://web.nvd.nist.gov/view/ncp/repository/checklist/download?id=909&checklistId=392>.

Now, I know about the module at <https://forge.puppetlabs.com/arildjensen/cis>, 
but that’s not going to do it for us.  We’re following a government standard 
that is similar to the CIS benchmark, but somewhat different.  Multiple parties 
and organizations have had their fingers in this pie, so off-the-shelf 
solutions in this space won’t help.


The particular problem I’m having at the moment is that, within the “Directory” 
option for a given vhost, we need to control the “order deny,allow” as well as 
the “deny from all” settings.  This is easy enough to do with the 
puppetlabs-apache module for the main vhost definition, because it exposes 
options to do exactly that.

However, we also need to control these settings for all the other configuration 
files in /etc/httpd/*, and the puppetlabs-apache module deploys the 
configuration file /etc/httpd/conf.d/alias.conf directly from a template where 
these values are hard coded (see 
<https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/mod/alias.pp>
 and 
<https://github.com/puppetlabs/puppetlabs-apache/blob/master/templates/mod/alias.conf.erb>).
  And this doesn’t appear to be the only configuration file where it’s doing 
this.

I don’t want  to get into warring modules over who is going to be putting what 
content into this file, and since they aren’t using Augeas to perform this 
function, I don’t think that I can use Augeas myself to do 
configuration-file-surgery on it after-the-fact.


So, is there an easy solution here?  I really don’t want to have to fork the 
puppetlabs-apache module and then have to explain why we can’t use the standard 
puppet module for doing this kind of stuff, but I’ll do that if I have to.

I just would prefer to find a solution to this issue that allows me to avoid 
that fight.


Suggestions?  Thanks!

--
Brad Knowles 
LinkedIn Profile: <http://tinyurl.com/y8kpxu>

-- 
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/727A6A9E-2B3B-4168-A4F3-92B61B4E6843%40shub-internet.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Puppet Users] puppet enterprise free eval hardware requirements

2015-04-02 Thread Brad Knowles
On Apr 1, 2015, at 6:57 PM, Vince Skahan  wrote:

> Thanks - for under 10 clients is 100GB for storage really needed ?Would 
> more like 50 be good enough ?

Sorry, I haven’t looked at the storage requirements.

> Thinking of kickstarting up a centos7 host under qemu-kvm (on a centos7 host) 
> if that matters.

That sounds like it should work fine.  But YMMV.  ;)

--
Brad Knowles 
LinkedIn Profile: <http://tinyurl.com/y8kpxu>

-- 
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/8DE5F90A-4E99-42B8-9D9E-66BFBD07499D%40shub-internet.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Puppet Users] puppet enterprise free eval hardware requirements

2015-03-31 Thread Brad Knowles
On Mar 30, 2015, at 5:32 PM, Vince Skahan  wrote:

> I have a 16-GB ram Intel NUC 
> (http://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/nuc-kit-d54250wyk-product-brief.pdf)
>  running Centos7 and was thinking of spinning up some VMs to try this out.  
> Does this system have enough oomph to run the 10-node-max free eval, or am I 
> going to be stuck with running masterless perhaps ?

When running the eval copy of PE 3.7.2 on AWS, we have found that you can boot 
the master if the VM is an m3.medium (3.5GB), but you run into memory problems 
that cause the system to be unreliable.  If we use m3.larges (7.5GB), the 
systems are just fine.  We haven’t come anywhere close to stressing the CPU or 
RAM of an m3.large in that kind of environment, but AWS doesn’t give you a 
whole lot of options between them.

So, on a 16GB NUC, I would think you could devote 6GB to the puppet master and 
still have enough RAM left over to run 10x nodes with 1GB RAM each, and you 
should be fine.

--
Brad Knowles 
LinkedIn Profile: <http://tinyurl.com/y8kpxu>

-- 
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/CA5EBE9B-7EBE-4CD4-8536-4E37B48CFEAD%40shub-internet.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Puppet Users] Any pointers to RHEL7 CIS hardening usig puppet

2015-03-31 Thread Brad Knowles
On Mar 30, 2015, at 9:34 PM, Dan White  wrote:

> To sum up my point of view: (preface this whole block with “I believe…/I 
> think…/IMHO…”)
> Puppet-izing the CIS Hardening Guidelines should be done throughout the 
> entire catalog as necessary for one’s environment and system requirements.  A 
> security audit should be an easy thing if all the code bits are clearly 
> referenced by paragraph.

I’ve actually done hardening on three separate projects with tools like Chef 
(one) and Puppet (two, including my current one).  I’ve also been a 
professional Unix system administrator since 1989 (got my start in the basement 
of the Pentagon), and I’ve been involved in a multitude of security projects 
over the decades (some classified ones, and plenty of unclassified ones).  I’ve 
worked in a variety of sectors, but mostly Internet/tech-related.

I’m not as experienced with Puppet as I am with Chef, but I would agree with 
Dan's assessment.

Fundamentally, security is not something you can bolt-on as an after-thought.  
It has to be baked into all of your processes and procedures as well as all 
your tools.  Any other approach is likely to lead to “ensure => madness”.


On the current project I’m working on, we are using the 
Roles/Profiles/Component module methodology, and we’re trying to minimize the 
number of component modules that we have to build, so we choose to make maximum 
use of publicly available modules from places like puppetforge.  We also have 
provided to us lengthy security standards based on the ones from CIS, among 
other sources.  Unfortunately, we have already run into problems with various 
Component modules pushing out configuration files (and other things) that 
didn’t meet our security requirements and we didn’t want to get into a constant 
battle of which module would win.

So, we have decided that we will fork any public Component modules that we use 
and make necessary modifications to them.  However, we are going to do this in 
a way that the necessary changes are parameterized and minimized, and then 
hopefully we will get approval to contribute this code back to the community.  
Among other things, we really don’t want to have to continue to maintain our 
forks.

At that point, we can keep most of our work in the Profile modules that call 
the Component modules, and we get both the functionality that we require as 
well as the security that we require.


I see no viable alternative to this approach.

--
Brad Knowles 
LinkedIn Profile: <http://tinyurl.com/y8kpxu>

-- 
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/941B58AC-2737-4D0C-8D77-EAEF5BD05F50%40shub-internet.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP using GPGMail


[Puppet Users] Dallas Fort-Worth Puppet User Group

2015-02-27 Thread Brad Christian
Hi, I've started the DFWPUG. Please go to 
http://www.meetup.com/Dallas-Fort-Worth-Puppet-User-Group  
<http://www.meetup.com/Dallas-Fort-Worth-Puppet-User-Group>for details, 
I'll be organizing a first meeting soon.

Brad Christian
@vhipster

-- 
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/b7c04dc2-df5c-4275-9509-8ac163eae74c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Does the "Learning VM" image actually work?

2015-02-10 Thread Brad Knowles
On Feb 10, 2015, at 12:39 PM, Hunter Haugen  wrote:

> A tip on OS X about getting "inside" folder-app-things (like .app, .vmwarevm, 
> etc).
> 
> You can right click ("two finger" click) on the object, and select "Show 
> package contents" to get into it with Finder. Then you'll be able to see the 
> PDF.

For those who haven’t been MacFanatics since 1983, and OS X users since 
Rhapsody, this is a good reminder.  :-)

> Or you can `cd` in a terminal into it, and `open .` to open it in finder.

For those who haven’t been using Unix since 1984, this is another good 
reminder. :-)


All the reminders notwithstanding, those are still work arounds that you can 
easily avoid if you just move the file before you rename the directory.

-- 
Brad Knowles 
LinkedIn Profile: <http://tinyurl.com/y8kpxu>

-- 
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/908019D3-4277-4EB4-9A4F-668F62B11D1C%40shub-internet.org.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Does the "Learning VM" image actually work?

2015-02-10 Thread Brad Knowles
On Feb 10, 2015, at 9:15 AM, Benito Mourelo  wrote:

> Unzip it and rename the resulted directory to attach  the ".vmwarevm" 
> extension and then open it.

Ahh.  That was the thing I was missing from the instructions.

BTW, I discovered that you probably want to pull the PDF file out of the 
extracted archive directory before you rename it, otherwise it will be a bit 
painful to refer back to the PDF if/when you want.  ;)

> It works for me on OS X 10.10 Yosemite.

Working through it now.  Thanks again!

-- 
Brad Knowles 
LinkedIn Profile: <http://tinyurl.com/y8kpxu>

-- 
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/FB8B6B58-A786-4D16-A516-1E6A6CBA0E32%40shub-internet.org.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Learning VM?

2015-02-09 Thread Brad Knowles
Folks,

I tried posting a message to this effect from my Google Groups account, but it 
doesn’t seem to have gone through.  I’ll try to post it again via e-mail to the 
Google Groups address.


Anyway, I’m wondering if anyone has managed to actually use the latest version 
of the Puppet Learning VM with VMware Fusion 7?  I saw that VMware Fusion was 
preferred over VirtualBox, and so I downloaded the zip archive and extracted 
it, and I can see that there are various files inside the archive that would 
appear to be typical for a VMware image.  However, I can’t seem to get it to 
load under Fusion 7.

If you have used this VM recently with Fusion 7, can you share with me your 
system details so that I can compare those with my own?

Thanks!

-- 
Brad Knowles 
LinkedIn Profile: <http://tinyurl.com/y8kpxu>

-- 
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/8CA4BDE5-C490-4E69-8BBA-C2B4E58C7A81%40shub-internet.org.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Does the "Learning VM" image actually work?

2015-02-09 Thread Brad Knowles
Folks,

I tried downloading the Learning VM image for VMware, and while there does 
seem to be a .vmdk file inside the zip archive, along with various other 
parts I would expect to find, so far as I can tell this is not something 
that I can successfully import into VMware Fusion 7.

Has this image been tested and confirmed to work with VMware Fusion 7?

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/69b205dc-d04a-4fcf-ae33-950ebe47b13b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Using Puppet for remote config management of offline machines?

2013-09-11 Thread Brad Smith
Hello all,

I'm working with a Kenya-based non-profit (tunapanda.org) that uses OSS to 
provide computing resources to schools where bandwidth is either 
nonexistent or prohibitively expensive. We provide a customized 
Edubuntu/LTSP setup which will host local versions of useful online 
resources like Kahn Academy (via ka-lite), Wikipedia (via Wikipedia For 
Schools), etc. 

I'm serving as a sort of Linux/tech advisor to them, and am looking into 
ways to provide updates to configuration files on classroom servers that...

   - Are not physically accessible to me
   - Are not online (local reps can download updates to a USB drive and 
   bring it to the server)
   - Do not have much in the way of local technical expertise, so 
   deployment will need to be fairly straightforward/scriptable

I don't have much experience with tools like Puppet, Chef, etc, but after 
reading through some of the docs, it sounds like Puppet might be able to do 
exactly what I want. Before I put too much effort into it, I hope I can run 
my ideas by y'all for a sanity check and ask some questions: 

   1. If I maintained a master image configured via a set of Puppet 
   manifests, could I just periodically put those manifests online, have 
   someone in Kenya download them to a USB drive, copy them to the server, and 
   run "puppy apply..." on them? 
   2. If they first backed up the server's previous set of manifests, would 
   they be able to roll back changes in case of a problem?
   3. Is there a better approach? Any other suggestions for things 
   (including tools other than Puppet) to look at?

Thanks in advance to anyone who can help!

--Brad 

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppet under HA Environment

2013-09-03 Thread Brad
Stuart,

If I'm understanding your needs correctly, this may be what you're looking 
for:

http://www.devco.net/archives/2010/03/17/scheduling_puppet_with_mcollective.php

On Monday, September 2, 2013 11:01:46 AM UTC-5, Stuart Cracraft wrote:
>
> How can this be randomized within a range?
>
> I believe someone mentioned "splay" ?
>
> My fear is that all the boxes will request at a similar some day, by chance
> and send a tidal wave over to the master.
>
> On Sep 1, 2013, at 10:27 PM, Rahul Khengare > 
> wrote:
>
> You can use different *runinterval *for each client.
> This can be done using editing of "/etc/puppet/puppet.conf" on each 
> client machine.
> Set the following (add a new line if it's not already present) 
> in the [agent] section of the file:
>
> runinterval=XXX
>
> where, XXX is the time in seconds(default is 180),
>
> Thanks and Regards,
> Rahul Khengare,
> NTT DATA OSS Center, Pune, India.
>
>
> On Friday, August 30, 2013 2:20:36 AM UTC+5:30, rjbu...@gmail.com wrote:
>>
>> How do I avoid a situation where all of my Linux servers execute a 
>> service restart at the same time upon receiving a new configuration change 
>> via Puppet?  I am trying to avoid any possibility that the service would be 
>> unavailable for any length of time.  The servers are behind a load 
>> balancer.  At least one node needs to remain available.  Any idea how I 
>> might configure Puppet to work in this HA environment?
>>
>> Thank you for your feedback!
>>
>>
>>
> -- 
> 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 post to this group, send email to puppet...@googlegroups.com
> .
> Visit this group at http://groups.google.com/group/puppet-users.
> 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] mcollective puppet module: not pulling in specified parameters

2013-07-24 Thread Brad
Is it okay to ask questions about the mcollective puppet module by 
puppetlabs here?

If so, I'm getting this error:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Failed to parse template mcollective/server.cfg.erb:
  Filepath: /usr/lib/ruby/site_ruby/1.8/puppet/parser/templatewrapper.rb
  Line: 67
  Detail: Could not find value for 'mc_topicprefix' at 
2:/usr/local/puppet/environments/development/modules/mcollective/templates/server.cfg.erb

This is how it's defined in the server template:

templates/server.cfg.erb:

# Basic stuff
topicprefix = <%= mc_topicprefix %>



So, I checked to make sure it was defined in params:

manifests/params.pp

class mcollective::params {

   $mc_topicprefix   = '/topic/'


So I checked to make sure params was inherited:

manifests/server/config.pp

class mcollective::server::config(
   $config_file,
   $config,
   $server_config_owner = $mcollective::params::server_config_owner,
   $server_config_group = $mcollective::params::server_config_group
 ) inherits mcollective::params {


This is in my server's .pp file:

 class { 'mcollective':
   version  => 'present',
   server   => true,
   server_config=> template('mcollective/server.cfg.erb'),
   server_config_file   => '/etc/mcollective/server.cfg',
   client   => 'false',
   client_config=> template('mcollective/client.cfg.erb'),
   client_config_file   => '/home/mcollective/.mcollective',
   stomp_server => 'X',
   mc_security_provider => 'XXX',
   mc_security_psk  => 'X',
   }


Any thoughts on next steps for troubleshooting?

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] booleans in hiera

2013-01-18 Thread Brad Ison
On Thu, Jan 17, 2013 at 7:50 PM, Peter Brown  wrote:
> I have a few boolean vars i use in a couple of modules I am updating to work
> with hiera.
> I noticed there is currently an issue with using booleans in hiera and
> puppet doesn't set them properly when it imports them as variables.
> I also noticed those bugs seem to have fixes and they also seem to have been
> committed.
> I am currently considering rewriting the modules that use booleans but I
> would prefer to wait for the fixes.
> Can anyone tell me when they will be released and which version will they go
> into?

I recently ran into Bug #18234 [1], wherein boolean values in hashes
don't work as expected.

There's a patch available for that. No idea when it's expected to be
merged, but I can confirm it's *not* in 3.0.2.


1. http://projects.puppetlabs.com/issues/18234

--
Brad

-- 
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: Dynamic Environments and Hiera

2013-01-11 Thread Brad Ison
On Fri, Jan 11, 2013 at 12:10 PM, Erik Dalén
 wrote:
> I also use one environment per git branch. But I use a custom fact that
> returns production/testing etc and then use that in the hiera hierarchy
> instead of the puppet environment.

That's actually along the lines of what I was thinking originally. One
Puppet environment per branch, remove the Puppet environment from the
Hiera hierarchy, and have my ENC tag machines with which Hiera
"environment" to use.

Makes sense. Thanks!

--
Brad

-- 
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: Dynamic Environments and Hiera

2013-01-09 Thread Brad Ison
On Wed, Jan 9, 2013 at 3:11 AM, Luke Bigum  wrote:
>
> :backends:
>   - yaml
> :hierarchy:
>   - %{fqdn}
>   - %{role}_role
>   - %{pop}
>   - global
> :yaml:
>   :datadir: /etc/puppet/environments/%{environment}/hiera/
>
> So if I push a new feature to branch new_feature, I get Puppet environment
> "new_feature" which has it's own copy of the Hiera data store with all my
> new_feature related Hiera keys in it. When it comes to environments my data
> follows the same branches and "versions" of my code, and when I merge code
> into my main line production branch the matching Hiera keys go along with
> it.

Thanks, Luke.

I guess it does make sense to leave the environments out of the
hierarchy in this case. I had considered that, but was worried about
constant merge conflicts when promoting things up the chain. There
will be some things that will always be different between dev and
prod. I suppose there are other ways around that though that make more
sense. I may be inventing a problem I don't really have.

--
Brad

-- 
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] Dynamic Environments and Hiera

2013-01-08 Thread Brad Ison
Hi,

I've been using dynamic environments, one per Git branch, similar to
what's described here:

  http://puppetlabs.com/blog/git-workflow-and-puppet-environments/

I've come to really like that workflow, but I'm struggling with how
best to integrate it with Hiera. In addition to short lived dynamic
branches, I'll have some longer lived ones that feed into master
(production), e.g. staging, dev, etc.

My hierarchy has traditionally looked something like this:

  - 'environments/%{environment}/%{location}',
  - 'environments/%{environment}',
  - 'global'

What's the best way of having new environments pick data from the
right spot in the hierarchy without having to cram everything into the
global / common root?

For example, if I branch off of dev, creating a new environment called
'new_feature', only 'global' would be in scope unless I explicitly
copy the dev data to 'new_feature.yaml', which feels wrong.


Am I approaching this all wrong? Any advice?

--
Thanks,
Brad

-- 
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] Re: puppetlabs/apt and apt::ppa

2013-01-01 Thread Brad Wright
On Wednesday, 26 December 2012 02:22:35 UTC, Andrey Ageyev wrote:

> And when I try to apply manifest - getting: 
> puppet agent -t
> info: Caching catalog for wproxy71.tpnt.net
> err: Failed to apply catalog: Could not find dependency 
> File[/etc/apt/sources.list.d] for 
> Exec[add-apt-repository-ppa:openstack-ppa/bleeding-edge] at 
> /etc/puppet/modules/apt/manifests/ppa.pp:38
>

FWIW I fixed this in my own repo by adding "include apt" at the top of the 
module.

-- 
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/-/er9ZcNkxGxsJ.
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] Re: Puppet unable to find a defined resource.

2011-09-07 Thread Brad Krane
Paul,

I'm not exactly sure, but from your class setup it looks like the
createsysuser resource would have the full scope of
accounts::virtual::createsysuser and should be referenced by
virtual::createsysuser and not just createsysuser when it is used in
accounts::appaccts.

Cheers,

On Sep 2, 7:28 pm, Paul Nguyen  wrote:
> I'm also seeing the same problem I believe.
>
> I'm running on the following
>
> puppet 2.7.3
> ruby 1.8.5
> centos 5
>
> I have a defined resource in the module called accounts
>
>    class accounts::virtual {
>      define createsysuser ($val) {
>          ...
>      }
>    }
>
> In another class in the same module, I have the following
>
>   class accounts::appaccts {
>     include account::virtual
>
>     createsysuser { "someuser"
>        val => "someuser"
>     }
>   }
>
> I get the following error
>
> err: Could not retrieve catalog from remote server: Error 400 on SERVER:
> Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid
> resource type createsysuser at
> /etc/puppet/modules/accounts/manifests/applications.pp:6 on node
> foobar.test.com
>
> Is there a fix for this, or am I doing something wrong?
>
> Thanks,
> Paul
>
>
>
>
>
>
>
> On Fri, Sep 2, 2011 at 11:21 AM, Brad Krane  wrote:
> > Here is a very simple manifest that recreates this error:
>
> > class foo {
> >  define bar ( $val ) {
> >    notice("bar($val)")
> >  }
> > }
>
> > $some_hash = { 'name' => "some_name" }
>
> > foo::bar { "$some_hash['name']": }
>
> > Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid
> > resource type foo::bar at /tmp/puptest.pp:9 on node www-cms-
> > dev.fs.uwaterloo.ca
>
> > This seems like a bug to me.
>
> > --
> > 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.



[Puppet Users] Re: Puppet unable to find a defined resource.

2011-09-02 Thread Brad Krane
Here is a very simple manifest that recreates this error:


class foo {
  define bar ( $val ) {
notice("bar($val)")
  }
}

$some_hash = { 'name' => "some_name" }

foo::bar { "$some_hash['name']": }


Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid
resource type foo::bar at /tmp/puptest.pp:9 on node www-cms-
dev.fs.uwaterloo.ca


This seems like a bug to me.

-- 
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] Re: Puppet unable to find a defined resource.

2011-09-02 Thread Brad Krane
I have spoken too soon about the nil value causing the problem. When I
set the default value from nil to "something" the error came back. It
seems that just using a hash value in the name to be expanded is what
the real issue is.

-- 
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] Re: Puppet unable to find a defined resource.

2011-09-02 Thread Brad Krane

> Then let's take a step back.  Your class is rather complicated, and
> all the details may be confusing (or even causing) the issue.  For
> example, you may have a nesting problem that is difficult to see in
> all that code.  I suggest putting each 'define' in its own file to
> help make things clearer and more maintainable.  Even before that,
> however, I suggest getting a much simplified stub working, then
> fleshing it out.  So, does this work for you:
>
> drupal6/manifests/init.pp
> ---
> class drupal6 {
>   drupal6::theme_repo { "foo": }
>
> }
>
> drupal6/manifests/theme_repo.pp
> 
> define theme-repo() {
>
> }
>
> ?


Ok, I took a big, big step back, broke out all of the drupal6::site,
drupal6::theme-repo and drupal6::module into their own files. I also
reduced the complexity of the module by stubbing out all the
definitions to contain almost nothing. Here is what I have left:

drupal6/manifests/init.pp
-
$d6_confpath = "/usr/share/drupal6"
$d6_scriptpath = "/usr/share/drupal6"
$gitdir = "/srv/git/drupal-themes"

class drupal6 {

}

drupal6/manifests/module.pp
-
define drupal6::module ( $ensure = 'present', $site = 'all') {
notice("module")
}

drupal6/manifests/site.pp
-
define drupal6::site (
$ensure = 'present',
$dbname,
$dbpw,
$dbserver,
$sitefqdn,
$siteAlias = "",
$modules = "",
$nagios_uid,
$nagios_timeout = 5,
$theme = { "name" => nil, "version" => nil, "upstream" =>
"drupal" }
) {
case $ensure {
'present': {

drupal6::module { "module":
}

# Site theme
drupal6::theme-repo { "$name-$theme['name']":
}

}# 'present'
}  # case $ensure
}

drupal6/manifests/theme-repo.pp
-
define drupal6::theme-repo()
{
notice("theme-repo")
}


And I still get the same error below.

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError:
Invalid resource type drupal6::theme-repo at srv/puppet/modules/
drupal6/manifests/site.pp:19 on node www-cms-dev.fs.uwaterloo.ca


That is until I removed $theme['name'] from the drupal6::theme-repo's
name! It looks like having set theme['name'] = nil as the default
value and not setting it to a non-nil value caused the error.


-- 
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] Re: Puppet unable to find a defined resource.

2011-08-22 Thread Brad Krane
John,

Thanks for the reply. I've tried all of your suggestions above,
qualifying it as drupal6::drupal6::theme_repo and just theme_repo as
well as putting the definition in its own file modules/drupal6/
manifests/theme_repo.pp (and also using the three combinations of
variable scoping) but I always get a similar result that it cannot
find the resource.

This behavior is very odd to me as I've used very similar definitions
where they include other definitions of the same manifest with no
issue at all but it seems that for whatever reason specifically with
this module I get an error when I do so.

On Aug 22, 9:58 am, jcbollinger  wrote:
> On Aug 19, 1:33 pm, Brad Krane  wrote:
>
> [...]
>
> > drupal6/manifests/init.pp
> > 
>
> [...]
>
> > class drupal6 {
>
> [...]
>
> >     define theme_repo(
> >         $theme = "",
> >         $version = "",
> >         $site = "default",
> >         $upstream = "drupal")
> >     {
>
> [...]
>
> >     }
>
> >     # Testing
> >     define alt_site ($theme) {
> >         drupal6::theme_repo { "$name-$theme['name']":
> >               theme => $theme['name'],
> >               version => $theme['version'],
> >               upstream => $theme['upstream'],
> >               site => "default"
> >           }
> >     }                                     #
> > < Line 129
>
> [...]
>
> > Any help or insight is very much appreciated.
>
> It looks to me like the correct fully-qualified name of the define
> should be drupal6::drupal6::theme_repo.  If you want it to be just
> drupal6::theme_repo then put it in its own file (named modules/drupal6/
> manifests/theme_repo.pp).  You definitely should do so if you
> anticipate that the define will be used anywhere other than where it
> already is used.  You also the option of refering to the define by its
> simple name ("theme_repo") within the scope where it is declared.
>
> John

-- 
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] Puppet unable to find a defined resource.

2011-08-19 Thread Brad Krane
Hi,

I've been stumped by the following error for quite a while now it is
generated when running the manifest further below:

err: Could not retrieve catalog from remote server: Error 400 on
SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError:
Invalid resource type drupal6::theme_repo at srv/puppet/modules/
drupal6/manifests/init.pp:129 on node www-cms-dev.fs.uwaterloo.ca


site.pp
--

class web_cms_dev_server inherits debian_server {
include apache2
include drupal6
include drupal6::dev
}


drupal6/manifests/init.pp


$d6_confpath = "/usr/share/drupal6"
$d6_scriptpath = "/usr/share/drupal6"
$gitdir = "/srv/git/drupal-themes"

class drupal6 {
include apache2::rewrite
include mysql

# Resources to mount the dev repo share for the drupal themes git
repo and clone and track it
package { "git-core":
  ensure => present
}
file { "/srv/git":
ensure => "directory",
owner => "root",
group => "itstaff",
mode => 0755
}
mount { "/srv/git":
device => "file-nfs.fs.uwaterloo.ca:/srv/git",
options => "_netdev,rw,hard,fg,lock,nfsvers=3,tcp",
fstype => "nfs",
ensure => mounted,
require => File["/srv/git"]
}

# Use drupal short name as module name to install
define module ( $ensure = 'present', $site = 'all') {
case $ensure {
'present': {
# TODO: change the exec below to use the script to
test for the module when it has the capability to do so
# Creates test may not work but does for modules
listed as of commit 3379078fc1d66830d8a88caff42eae2566c4650b
2010-02-03
exec { "install-module-${name}-site-${site}":
creates => "${d6_confpath}/sites/${site}/modules/$
{name}",
#command => "drupal-module -d ${d6_confpath}/sites/
${site}/modules -i ${name}",
command => "drush -r ${d6_confpath} dl ${name}",
timeout => 1500,
}

if $require {
Exec["install-module-${name}-site-${site}"] {
require +> [$require, Package["archive-tar-
minitar"], Package["drupal6"], Package["drush"]]
}
} else {
Exec["install-module-${name}-site-${site}"] {
require => [Package["archive-tar-minitar"],
Package["drupal6"], Package["drush"]]
}
}
}
'absent': {
# TODO: change the exec below to use the script to
remove the modules when it can
exec { "remove-module-${name}-site-${site}":
onlyif => "test -d ${d6_confpath}/sites/${site}/
modules/${name}",
command => "rm -rf ${d6_confpath}/sites/${site}/
modules/${name}"
}
}
}
}

# Web developer themes repo
# theme: name of the theme
# version: name of the git tag for the desired version
# upstream: the source url for the git repo. If false a local repo
in $gitdir/$theme is assumed
# site: the site this theme is applied to
# Local changes sould be put on the feds branch which should be
rebased onto newer versions
define theme_repo(
$theme = "",
$version = "",
$site = "default",
$upstream = "drupal")
{
case $upstream {
# Custom theme, no upstream create an empty bare repo
false: {
git::repository { "bare repo $site-$theme":
real_name => "$theme",
localtree => $gitdir,
shared => true,
owner => "root",
group => "webdeveloper",
require => Mount["/srv/git"],
before => Git::Clone["$site theme $theme-
$version"]
}
}
# Drupal.org theme, clone from upstream
"drupal": {
exec { "clone from upstream $site-$theme":
cwd => $gitdir,
command => "git clone --bare 
http://git.drupal.org/project/$theme.git
$site-$theme && chown -R root:webdeveloper $site-$theme && chmod -R ug
+w $site-$theme",
onlyif => "test ! -d $gitdir/$site-$theme",
before => Git::Clone["$site theme $theme-
$version"]
}
}
# Custom upstream theme
default: {
exec { "clone from upstream $site-$theme":
cwd => $gitdir,
command => "git clone --bare $upstream $site-
$theme && chown -R root:webdeveloper $theme && chmod -R ug+w $theme",
onlyif => "test ! -d $gitdir/$site-$theme",
before => Git::Clone["$site theme $theme-
$version"]
}
}
}

if $

[Puppet Users] Re: Multiple errors on puppet client runs: "A section with name updates already exists"

2010-10-26 Thread Brad
Thanks, John.

I just checked the contents of the files in /etc/yum.repos.d, but only
found [updates] in one file, updates.repo:

[11:26 r...@cab yum.repos.d]# grep updates /etc/yum.repos.d/*
/etc/yum.repos.d/updates.repo:[updates]
/etc/yum.repos.d/updates.repo:baseurl=http://mirror.linux.duke.edu/pub/
centos/$releasever/updates/$basearch/

On Oct 26, 10:23 am, jcbollinger  wrote:
>
> Check the yum configuration on the affected client: I suspect you will
> find a duplicate definition of repository "updates".
>
> grep updates /etc/yum.repos.d/*
>
> Cheers,
>
> John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Multiple errors on puppet client runs: "A section with name updates already exists"

2010-10-25 Thread Brad
Hello,

I'm currently running Puppet 0.25.5-1 on CentOS 5.5.  Everything has
been going swimmingly until a couple of weeks ago, when I began
receiving errors on one of my nodes.  The node in question is also my
puppetmaster, but the errors seem client-related.  The errors are:

err: //yumrepos::centosbase/Yumrepo[addons]: Failed to retrieve
current state of resource: A section with name updates already exists
err: //yumrepos::epel/Yumrepo[epel]: Failed to retrieve current state
of resource: A section with name updates already exists
err: //yumrepos::centosbase/Yumrepo[base]: Failed to retrieve current
state of resource: A section with name updates already exists
err: //yumrepos::centosbase/Yumrepo[contrib]: Failed to retrieve
current state of resource: A section with name updates already exists
err: //yumrepos::centosbase/Yumrepo[updates]: Failed to retrieve
current state of resource: A section with name updates already exists
err: //yumrepos::centosbase/Yumrepo[extras]: Failed to retrieve
current state of resource: A section with name updates already exists
err: //yumrepos::perkins/Yumrepo[perkins]: Failed to retrieve current
state of resource: A section with name updates already exists
err: //yumrepos::centosbase/Yumrepo[centosplus]: Failed to retrieve
current state of resource: A section with name updates already exists
notice: //yumrepos::fixperms/File[/etc/yum.repos.d]: Dependency
yumrepo[centosplus] has 1 failures
notice: //yumrepos::fixperms/File[/etc/yum.repos.d]: Dependency
yumrepo[base] has 1 failures
notice: //yumrepos::fixperms/File[/etc/yum.repos.d]: Dependency
yumrepo[extras] has 1 failures
notice: //yumrepos::fixperms/File[/etc/yum.repos.d]: Dependency
yumrepo[addons] has 1 failures
notice: //yumrepos::fixperms/File[/etc/yum.repos.d]: Dependency
yumrepo[epel] has 1 failures
notice: //yumrepos::fixperms/File[/etc/yum.repos.d]: Dependency
yumrepo[perkins] has 1 failures
notice: //yumrepos::fixperms/File[/etc/yum.repos.d]: Dependency
yumrepo[updates] has 1 failures
notice: //yumrepos::fixperms/File[/etc/yum.repos.d]: Dependency
yumrepo[contrib] has 1 failures
warning: //yumrepos::fixperms/File[/etc/yum.repos.d]: Skipping because
of failed dependencies

I took a look at /etc/puppet/modules/yumrepos/manifests/init.pp, and
it looks normal.  I'm wondering if there's a conflict somewhere in
another file, but I'm not sure which file that would be; nodes.pp
looks normal, and this node isn't controlled by anything within /etc/
puppet/services.  I am not receiving messages like this on any other
node, and have not received this message on this or any other node in
the past.

Any ideas would be very much appreciated.  Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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: Puppet manifests under version control issue

2010-04-30 Thread Brad Lhotsky
I just put up a subversion pupppet module for automated deployment from
release tags:

http://github.com/reyjrar/svnutils

I wrote a wrapper script for deploying the /etc/puppet stuff:

#!/bin/bash

BINDIR="/opt/local/sbin"
SVNURL="svn+ssh://svn/path/to/puppet"
TARGET="/etc/puppet"
BACKUP="/etc/puppet.old"

$BINDIR/svncheckrel $SVNURL $TARGET
rc=$?;

if [ "$rc" -eq "0" ]; then
if [ -d $BACKUP ]; then
 rm -rf $BACKUP;
fi;
mv $TARGET $BACKUP;
 $BINDIR/svnexportrel $SVNURL $TARGET
fi;

That's in /etc/cron.d for every 10 minutes.  I have a post-commit hook
looking at the "tags/release-" commits and it builds a Changelog from the
last "tags/release-" and emails it to specified users.

I'll add that to my github repo today.

On Fri, Apr 30, 2010 at 3:37 AM, Maxim Ianoglo  wrote:

> Hello,
>
> Here it is:
> #!/bin/sh
>
> REPOS="$1"
> TXN="$2"
>
> # synthax check of commited sources
> PATH='/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/bin:/sbin:/
> usr/bin:/usr/sbin:'
> tmpfile=`mktemp`
> export HOME=/
> SVNLOOK=/usr/bin/svnlook
> $SVNLOOK changed -t "$TXN" "$REPOS" | awk '{print $2}' | grep '\.pp$'
> | while read line
> do
>$SVNLOOK cat -t "$TXN" "$REPOS" "$line" > $tmpfile
>if [ $? -ne 0 ]
>then
>echo "Warning: Failed to checkout $line" >&2
>fi
> /usr/bin/puppet --color=false --confdir=/tmp --vardir=/tmp --
> parseonly --ignoreimport $tmpfile >&2
>if [ $? -ne 0 ]
>then
>echo "Puppet syntax error in $line." >&2
>exit 2
>fi
> done
> res=$?
> rm -f $tmpfile
> if [ $res -ne 0 ]
> then
>exit $res
> fi
>
>
> Thank you.
> --
> Maxim Ianoglo
>
> On Apr 29, 10:26 pm, Joe McDonagh  wrote:
> > Maxim Ianoglo wrote:
> > > Hello,
> >
> > > I tried to add a pre-commit hook using this tutorial:
> > > projects.puppetlabs.com/projects/puppet/wiki/Puppet_Version_Control
> >
> > > But I get this error.
> > >
> ===
> ==
> > > [im(1000)@tech04:~/puppet2/trunk/clients/puppet/modules/main/inetd/
> > > manifests] > svn commit
> > > Sendingmanifests/init.pp
> > > Transmitting file data .svn: Commit failed (details follow):
> > > svn: 'pre-commit' hook failed with error output:
> > > /usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:73: command not
> > > found: hostname
> > > /usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:73: command not
> > > found: hostname
> > > /usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:73: command not
> > > found: dnsdomainname
> > > /usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:73: command not
> > > found: domainname
> > > /usr/lib/ruby/site_ruby/1.8/puppet/defaults.rb:216: undefined method
> > > `downcase' for nil:NilClass (NoMethodError)
> > >from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> > > `gem_original_require'
> > >from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> > > `require'
> > >from /usr/lib/ruby/site_ruby/1.8/puppet.rb:110
> > >from /usr/lib/ruby/site_ruby/1.8/puppet/application/puppet.rb:1:in
> > > `require'
> > >from /usr/lib/ruby/site_ruby/1.8/puppet/application/puppet.rb:1
> > >from /usr/bin/puppet:70:in `require'
> > >from /usr/bin/puppet:70
> > > Puppet syntax error in trunk/clients/puppet/modules/main/inetd/
> > > manifests/init.pp.
> >
> > > svn: Your commit message was left in a temporary file:
> > > svn:'/home/im/puppet2/trunk/clients/puppet/modules/main/inetd/svn-
> > > commit.2.tmp'
> > >
> ===
> ==
> >
> > > If I run this from console - everything is ok.
> >
> > > I tried to add PATH variable, but no luck.
> >
> > > Did anyone faced this issue before ?
> >
> > > Puppet Version: puppet-0.25.4-1
> > > OS Version: CentOS release 5.4 (Final)
> > > Ruby Version: 1.8.6
> >
> > > Thakn you.
> > > --
> > > Maxim Ianoglo
> >
> > Please paste the code from the pre-commit.
> >
> > --
> > Joe McDonagh
> > AIM: YoosingYoonickz
> > IRC: joe-mac on freenode
> > "When the going gets weird

Re: [Puppet Users] Re: Puppet manifests under version control issue

2010-04-29 Thread Brad Lhotsky
Also remember puppet is running at the user puppet, so you have to have
execute for the user or group puppet on your pre-commit hook.

On Thu, Apr 29, 2010 at 8:30 AM, Maxim Ianoglo  wrote:

> Here is the history :)
>
> After I setup pre-commit hook, I tried to commit some changes and got
> the error I mentioned in first post.
>
> I thought that could be the issue with puppet itself, so I tried to
> run this command from console:
> /usr/bin/puppet --color=false --confdir=/tmp --vardir=/tmp --parseonly
> --ignoreimport shell.pp
>
> And it worked fine.
>
> Then i read ( and thought ) that the cause could be PATH variable. I
> set it - but no luck.
>
> On Apr 29, 11:18 am, Patrick  wrote:
> > On Apr 29, 2010, at 12:54 AM, Maxim Ianoglo wrote:
> >
> >
> >
> >
> >
> > > Hello,
> >
> > > I tried to add a pre-commit hook using this tutorial:
> > > projects.puppetlabs.com/projects/puppet/wiki/Puppet_Version_Control
> >
> > > But I get this error.
> > >
> ===
> ==
> > > [im(1000)@tech04:~/puppet2/trunk/clients/puppet/modules/main/inetd/
> > > manifests] > svn commit
> > > Sendingmanifests/init.pp
> > > Transmitting file data .svn: Commit failed (details follow):
> > > svn: 'pre-commit' hook failed with error output:
> > > /usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:73: command not
> > > found: hostname
> > > /usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:73: command not
> > > found: hostname
> > > /usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:73: command not
> > > found: dnsdomainname
> > > /usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:73: command not
> > > found: domainname
> > > /usr/lib/ruby/site_ruby/1.8/puppet/defaults.rb:216: undefined method
> > > `downcase' for nil:NilClass (NoMethodError)
> > >from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> > > `gem_original_require'
> > >from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> > > `require'
> > >from /usr/lib/ruby/site_ruby/1.8/puppet.rb:110
> > >from /usr/lib/ruby/site_ruby/1.8/puppet/application/puppet.rb:1:in
> > > `require'
> > >from /usr/lib/ruby/site_ruby/1.8/puppet/application/puppet.rb:1
> > >from /usr/bin/puppet:70:in `require'
> > >from /usr/bin/puppet:70
> > > Puppet syntax error in trunk/clients/puppet/modules/main/inetd/
> > > manifests/init.pp.
> >
> > > svn: Your commit message was left in a temporary file:
> > > svn:'/home/im/puppet2/trunk/clients/puppet/modules/main/inetd/svn-
> > > commit.2.tmp'
> > >
> ===
> ==
> >
> > > If I run this from console - everything is ok.
> >
> > > I tried to add PATH variable, but no luck.
> >
> > > Did anyone faced this issue before ?
> >
> > Sorry but I got a bit lost.  What's working from the console and where is
> it failing from?  Is it the verify script failing when called from the hook
> or does "svn commit" work only if it's run on the console?
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> > To post to this group, send email to puppet-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com
> .
> > For more options, visit this group athttp://
> 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-us...@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.
>
>


-- 
Brad Lhotsky

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] status of cpan provider?

2010-04-28 Thread Brad Lhotsky
Not to mention the RedHat Perl distribution has been notoriously bad.  I
know the last 5.8.8 release still shipped without weak reference support.
 Try to install Moose or any Modern Perl Module, without weak reference
support!

I'm moving to building my own Perl installed in /opt/local/perl and then
I'll setup a CPAN::Mini site.  I'll use Puppet to push the CPAN::Config.pm
to all my boxes to use the local repository.  I'll need to setup something
to monitor CPAN for updates to packages I'm mirroring locally.

There are several projects that I'm working on that will require a "Perl
Environment Freeze."  Those will be separate CPAN::Config.pm's.

That's one of my next projects, so I'll let you know how it goes.  I'm a
Perl programmer at heart, which means I'm lazy, which means I'll have the
"add module + dependencies to local cpan::mini repository scripted (if it's
not already)."

On Wed, Apr 28, 2010 at 12:58 PM, Nigel Kersten  wrote:

>
>
> On Wed, Apr 28, 2010 at 8:52 AM, Cosimo Streppone wrote:
>
>> On Wed, 28 Apr 2010 17:36:03 +0200, Nigel Kersten 
>> wrote:
>>
>>   On Tue, Apr 27, 2010 at 5:02 PM, Alan McKay 
>>>> wrote:
>>>>
>>>>>
>>>>>> I was just digging through the archives and found some comments from
>>>>>> Sept 2008 about CPAN provider being immature.
>>>>>>
>>>>>
>>>>> Personally, I wouldn't want a CPAN provider -- if you can get content
>>>>> from OS packages (debian is particularly good about this)
>>>>>
>>>>> [...]
>>>>>
>>>>> Doing really minimal packaging for the CPAN modules you use, if not
>>>>> already packaged, would be worth it in my opinion.
>>>>>
>>>>
>>>> This way presents its problems too, many dependencies to repackage,
>>>> and I'd say too much work overall... depends on your needs, ofc.
>>>>
>>>
>>> Repackaging CPAN modules is reasonably trivial, and will give you a more
>>> consistent setup than writing a complex CPAN provider.
>>>
>>> Have you looked at dh-perl-make ?
>>>
>>
>> We're using dh-make-perl, and it doesn't handle dependencies
>> that are not already packaged, IIRC.
>
>
> sure. Is it really that much more work to insert appropriate dependencies
> compared to the alternatives though?
>
> It should also be relatively easy to change the way the dependencies are
> done such that even if it can't find the relevant packages it would know
> what they should be called though right?
>
>
>>
>>
>>
>>> http://www.opensourcery.com/blog/hans-dieter-pearcey/packaging-cpan-modules-debian
>>>
>>
>> I'll read it, thanks.
>>
>> Skimming through it, it seems the author is aware
>> of the limitations I was pointing out (having to maintain debian
>> control files, etc...)
>>
>
> If I cared about cpan these days I'd be looking at patching dh-make-perl to
> support generating the dependencies even if they don't exist yet. We do a
> similar thing here internally with packaging gems as debs.
>
>
>>
>>  or even cpan2dist ?
>>>
>>
>> I think I looked at it long time ago.
>> Maybe time to see if it got updates.
>>
>> Thanks,
>>
>>
>> --
>> Cosimo
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To post to this group, send email to puppet-us...@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.
>>
>>
>
>
> --
> nigel
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-us...@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.
>



-- 
Brad Lhotsky

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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] Re: Dependencies on defines

2009-06-16 Thread Brad

On Jun 16, 1:28 am, Peter Meier  wrote:
> > Is it possible to require a user define? Something like:
>
> > define a {
> >      type { "$name":
> >      }
> >     type { "xyy":
> >     }
> > }
>
> > type { "foo":
> >      require => A["bar"],
> > }
>
> this works.
>

Good to know thanks. Internally does puppet keep track of define
instantiations buy name? I am wondering what happens in a situation
like this:

define b(param) {
type { "$param":
}
}

b { "abc":
param => "p1",
}

b { "def":
param => "p2",
}

type { "foo":
 require => B["def"],
}

What I would hope happens is that when b is instantiated with each
name, puppet keeps track of the enclosed types so that "foo" depends
on Type["p2"] in the example above.

Also, does puppet have a way to print the resulting dependency graph
for testing and debugging?

-Brad
--~--~-~--~~~---~--~~
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] Re: Specifying nodes by type

2009-06-06 Thread Brad

On Jun 5, 12:39 am, James Turnbull  wrote:
>
> But yes it was a little confusing.  I've edited the page to make it
> easier to understand.  Please let me know if that has helped.

Thanks but it still didn't seem very clear to me. Might as well just
explain the situation right at the top. I just made a page edit.

-Brad
--~--~-~--~~~---~--~~
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] Re: Specifying nodes by type

2009-06-04 Thread Brad

On Jun 4, 8:27 pm, Brad  wrote:
> I'm working on a "real" fact by following these steps:
>    http://reductivelabs.com/trac/puppet/wiki/AddingFacts
>
> I verified that the custom fact works when run locally on the server.
> On the client when I run:
>    puppetd --server hostname --test --factsync
>
> I see the custom fact being retrieved and stored in /var/lib/puppet/
> facts on the client. But the custom fact does not seem to run and the
> value is not sent to the server.

Ok, it looks like that link above is old information. It would be nice
if that was mentioned at the *top* of that text rather than the
bottom. I followed this instead: 
http://reductivelabs.com/trac/puppet/wiki/PluginsInModules

And everything is works as expected.

-Brad
--~--~-~--~~~---~--~~
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] Re: Specifying nodes by type

2009-06-04 Thread Brad

On Jun 4, 4:26 pm, Thomas Bellman  wrote:
>  However, a "real"
> custom fact is probably cleaner.)
>

I'm working on a "real" fact by following these steps:
   http://reductivelabs.com/trac/puppet/wiki/AddingFacts

I verified that the custom fact works when run locally on the server.
On the client when I run:
   puppetd --server hostname --test --factsync

I see the custom fact being retrieved and stored in /var/lib/puppet/
facts on the client. But the custom fact does not seem to run and the
value is not sent to the server. I never see the "info: Loading fact
nodetype" message on the client, and the $nodetype substitution fails
on the server.

I am running 0.24.5 on client and server. Both client and server are
Ubuntu. Here is the custom fact:

#!/usr/bin/ruby -w

Facter.add("nodetype") do
setcode do
f = File.open('/var/ec2/nodetype')
f.gets.chomp
end
end

Any ideas?
--~--~-~--~~~---~--~~
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] Re: Specifying nodes by type

2009-06-04 Thread Brad

On Jun 4, 4:26 pm, Thomas Bellman  wrote:
> I would probably do it with something like this:
>
>      class node::compute { ... }
>      class node::database { ... }
>
>      node default
>      {
>          include "node::$nodetype"
>      }
>
> and get myself a custom fact 'nodetype' that gets set in some suitable
> way.

Thanks for the suggestion. I wish there was a simpler approach, like
specifying the "type" on the puppetd command-line. In large server
farms it seems like it would be a really common need to specify nodes
by purpose rather than machine name.

-Brad
--~--~-~--~~~---~--~~
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] Controlling gconf values

2009-02-20 Thread Brad Dixon

Hello:

I'd like to ensure that I've set-up various gconf settings for users.
I cobbled together this little sad definition:

  define gconf($type, $value, $user) {
exec{"set $name to $value":
  command => "/bin/su $user -c '/usr/bin/gconftool-2
--config-source xml:readwrite:/home/$user/.gconf --type=$type --set
$name \"$value\"'",
}
  }

used like this:

gconf{"/apps/gnome-terminal/profiles/Default/font":
  type => "string",
  value => "Monospace 16",
  user => "rbdixon",
}

It all seems a little verbose. Any suggestions on how to improve this?
Maybe trying to puppet manage gconf entries is a bad idea?

Brad

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---