Browsing articles tagged with "puppet - 2/22 - Admins Goodies"
Nov 1, 2012
tom

With puppet, can you have the client ask to be a certain set of roles?

I’ve recently got my puppetmaster and client up and running and have had the client correctly signed, then requested and applied simple changes, all good. I have a growing number of machines (>100). They are not consistently named (historical reasons). They fall into a handful of categories (think of it like: dataserver_type1, dataserver_type2, webserver_type1, webserver_type2….). New instances of these types of machines are added weekly. I don’t understand (yet) or cannot see how I can […]

Continue Reading »
Oct 26, 2012
tom

Lowercase variable values in Puppet

In my puppet config I need to lowercase a variable value before using it in a template. How to achieve this? Is there a way to lowercase a variable value inside the puppet manifest? Do I need to do this in the template? And more general: where are string manipulation functions that I could use in manifests. Do I have to write my own custom ruby functions to achieve this? Asked by paweloque Puppet’s string […]

Continue Reading »
Oct 21, 2012
tom

Puppet yum repo – Pull down 2.7.x vs 3.0.x

So a few weeks ago I started on the path to using puppet to automate all the configs/services. At the time I was using the EPEL repo, which installed version 2.6.x. After some reading I was trying to gain access to the flatten method available via the puppet stdlib, and thought it was available by default in the newer 2.7.x version. So I added a puppet repo with the following settings: [puppetlabs] name=Puppet Labs Packages […]

Continue Reading »
Oct 17, 2012
tom

Where do puppet logs go?

I ran puppet apply and got an error. Is there any way that I can get more details on this error? err: /Stage[main]/XX/Service[xx]: Failed to call refresh: Could not restart Service[xx]: Execution of ‘/etc/init.d/xx restart’ returned 1: at /etc/puppet/manifests/xx/xx.pp:20 Asked by benmccann Use puppet apply –debug to get more output. With puppet apply there is no logfile at all but you can redirect the output with –logdest to a file Answered by angrox Check more […]

Continue Reading »
Oct 14, 2012
tom

Application deployment with Puppet

I’m new to Puppet and while I’ve been using *nix systems for many years, I’ve never worked as a sysadmin or in ops. I’m currently writing Puppet manifests for hosting a set of (PHP/MySQL/MongoDB, code in git) web applications. Clearly Puppet needs to have some knowledge of the actual applications because I’ll set up a virtual host for each one, but I’m not sure whether Puppet should be managing things like code deployment and database […]

Continue Reading »
Oct 2, 2012
tom

Amazon EC2 EBS volume scheduled backup/snapshots using puppet / similar tools

I am not a Linux admin, although I wish I was, and I have seen these questions Amazon EC2 Backup Strategy Amazon EC2 + EBS:: Regular backup plan? Simple Backup Strategy for Amazon EC2 instances / volumes? And this suggestion http://alestic.com/2009/09/ec2-consistent-snapshot I tried using command line + crontab (the command line works, but crontab for some reason, doesn’t) But I’m still pretty lost, all I want is an automated, rolling backup of my amazon EC2 […]

Continue Reading »
Sep 28, 2012
tom

Using puppet to manage incrontab

Puppet has the cron resource for managing the crontab, but is there a similar way of managing incrontab? I can find no writings anywhere regarding this, and to be fair, I’m extremely new to puppet (software dev helping out an overworked sysadmin). Asked by Josh Smeaton There is no native support for incron but that doesn’t mean you can’t write a simple defined type that manages the tabs in /etc/incron.d. These would be just file […]

Continue Reading »
Sep 27, 2012
tom

Puppet Agent fails sporadically, with either timeout or “Could not find class” error

I have puppet master running on a Xen dom0, and 3 domUs syncing to it via an hourly crontab puppet agent –test. About 80% of the time, the puppet agent –test completes successfully: info: Retrieving plugin info: Caching catalog for test3 info: Applying configuration version ’1333319732′ notice: Finished catalog run in 5.08 seconds The other 20% of the time, it fails midway, with errors such as the following: err: Could not retrieve catalog from remote […]

Continue Reading »
Aug 26, 2012
tom

Puppet: Get users home directory

I am creating a user as follow user { $username: comment => “$name”, shell => “$shell”, managehome => false, password => “$password”, groups => $groups } Now as u can see I am doing a managehome is false Now later down the lane I need to push a file to the user’s home directory. $key = “${homedir}/${name}/file” file { $key: ensure => present, owner => $username, group => $username, mode => 600, content => “$keyvalue”, […]

Continue Reading »
Aug 17, 2012
tom

Puppet node definition

That’s a simple question that is stolen my time, and getting me crazy. Very simple I can’t understand why this regexp is not getting running when I define a new node in puppet: Hostname: api01.eu-west-1.compute.internal Node definition 3: node ^api\d+\.eu-west-1\.compute\.internal { 4: include sudo 5: package { ‘vim’: ensure => preset } 6: } My error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment production: Could […]

Continue Reading »
Pages:«1234567...22»