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

Advertisements

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

HW: Upgrading the workhorse from 4GB to 16GB – Macbook Pro 2012

It’s really been a while since my last post. A lot has changed since then. I have been thinking on how can I start writing again for a while. I decided to start with something light.

I was assigned with a stock MBP 2012 in my new job. Core i5, 4GB… blah blah.. just stock specs. It was OK for a while but I started hitting the 4GB ceiling when I started playing around with VMs or if I’m processing 19k+ photos in Aperture.

Things just got sloooowww…. It’s a no brainer that I really need to add more RAM. Lots of it.

So I started checking online if where can I buy RAM with best bang-for-the-buck. I paid a visit to that trusty TipidPC site. I decided to get this item. It’s a Crucial 16GB (8×2) CT2K8G3S160BM memory sticks. I managed to buy it yesterday for 4,400PHP (109USD). And after a series of meetings at work, I finally got it installed last night when I got home.

This is how it went…

First, I checked for a good tutorial, iFixit has a good step-by-step guide here.

I removed the back panel as indicated in the guide…
IMG_6261

Then I disconnected the battery. I had to do this slowly, wiggling it side to side (slowly) until it got loose.
IMG_6262

When I checked the memory (Samsung M471B5773DH0-CK0), I was surprised to see a “Made in the Philippines” sticker 🙂
IMG_6263

Removing the top RAM module is easy. Removing the second one will require some finesse and a little patience.
IMG_6265

Now that the “old” modules are out, I replaced it with the “new” ones.
IMG_6266

Time to close it and cross fingers when I press the power button.
IMG_6267

So I guess it worked!
IMG_6269

Just to be sure I ram memtest for Mac OS X as well. I used this site as reference. After running memtest, no red flags were raised. That’s good! 🙂

Screen Shot 2013-03-13 at 8.27.53 PM

References: