Link

[puppet forge] proletaryo-supervisor v0.4.0 now supports Ubuntu

Necessity is the great motivator.

I wrote this puppet module almost a year ago. The first version up to the last one only supports RedHat-based distros. Amazon Web Services is the primary platform that I use so the module is heavily tested and used in AWS Linux environments.

I was planning to support Ubuntu since day one but I managed to procrastinate because it’s not really needed in our deployments. That changed today though because we’re rolling out a few Ubuntu instances in AWS :)

I hope some people will find this module useful. It’s always open for contributions. Just fork it in GitHub:

https://github.com/proletaryo/puppet-supervisor

If you have an existing Puppet installation, just install it in your Puppet Server:

puppet module install proletaryo-supervisor –version 0.4.0

make it simple, let go :)

A lot of things happened to me personally for the past few months that I basically forgot about writing on my blog. The past months has been nothing but blissful to say the least :)

The first thing that I thought when I logged in to my WordPress account was: how can I make this simple? It doesn’t make sense anymore to maintain multiple blogs… It’s an overhead.

It’s time to delete. Let go. :)

P.S. It’s good that the Import/Export functionality of WordPress worked flawlessly :)

QuickFix: Cleaning up Puppet master’s report logs

OK… Our puppet master’s disk is slowly filling up with logs… We have around 70+ nodes already so no wonder it’s filling up at a high rate:

marionette-disk

I’ve known about the problem since 2 weeks ago but I always had an excuse to put it in my “next” to-do pile….

Well, today I can’t ignore it anymore since it’s almost full :)

So off to Google and do a little searching… And this is the best answer that I got:

tidy { "/var/lib/puppet/reports":
  age => "1w",
  recurse => true,
}

Duh! Use puppet to clean-up Puppet logs! *facepalm* (I felt stupid when I realized this…)

After knowing a new puppet type, I was excited to do a test run: puppet agent -t

Well… The ruby process ran for a few a minutes but it did nothing! Hmmm… I figured maybe because the number of files is staggering that’s why the puppet run can’t handle it. After all, I have >4GB worth of log files in /var/lib/puppet/reports/.

So a little help is needed then. I ran these commands to give puppet a hand:
find /var/lib/puppet/reports/ -type f -ctime +7 | xargs -P 4 -n 20 rm -f

And the next succeeding puppet runs worked like a charm :)

marionette-disk1

QuickFix: Can’t install puppetdb via puppet modules in AWS Linux

I was trying to install PuppetDB for my Puppet deployment using this guide.

And then when I ran puppet agent -t, my terminal was full of red error messages:

Notice: /Stage[main]/Postgresql::Initdb/Exec[postgresql_initdb]/returns: creating directory /var/lib/pgsql/data ... initdb: could not create directory "/var/lib/pgsql": Permission denied
Error: /usr/bin/initdb --encoding 'UTF8' --pgdata '/var/lib/pgsql/data' returned 1 instead of one of [0]
Error: /Stage[main]/Postgresql::Initdb/Exec[postgresql_initdb]/returns: change from notrun to 0 failed: /usr/bin/initdb --encoding 'UTF8' --pgdata '/var/lib/pgsql/data' returned 1 instead of one of [0]

My quick fix:
[root@-----]$ cd /var/lib/ && ln -s pgsql9/ pgsql