Search This Blog

Monday, February 15, 2016

I've been kind of slacking.

Blogs do this thing where it's like... doing your dishes after a while.  It becomes a bit of a chore and if you have too many other chores in real life to do - it falls off the radar.
That's exactly what happened here.

NONE of my projects got worked last week.  I'm a bit ashamed of that, because I did at some points have time - just no energy.  February tends to do that to me, unfortunately; as does the cold.  It's an excuse, I know, but it is what it is.

Work's been tough lately; lots to pick up and learn lately.  Lots to do.  Too many outstanding projects.

Today's been a fruitful day.  I have a puppet master server running on SLES 11 SP3; it's been running for quite some time.  It precedes my tenure at this company, in truth.  So that said, it was never even remotely utilized.  So I've been slowly expanding my functionality to it.  A few little things I've discovered about puppet and SLES:

1) Zypper is not supported, like at all.  However, there are some AWESOME custom repos out there.
2) This is a command you should run pretty much immediately:
    # zypper ar --refresh http://download.opensuse.org/repositories/systemsmanagement:puppet/SLE_11_SP3 opensuse_puppet_repo
    # Hint, this will give you awesome custom SLES based repos of common puppet items, like terminus and PuppetDB.
3) Put this in your crontab, if you don't want to get your disk filled up (assuming you're using a low footprint server like we are).
    # Crontab Puppet cleanup here:
    0 3 * * 5 find /var/lib/puppet/reports/ -type f -ctime +7 | xargs -P 4 -n 20 rm -f | mail -s "Puppet Report Logs Cleaned up!" your.email@company.com
    # Yes, that will mail you a report when this is done weekly.  Verify your puppet reports folder first.
4) I'm working on a simple 'puppet master control' script.  It's going to have:

Basic functions
    1) get the current status  (service XYZ status)
    2) list current nodes (with |more)
    3) restart puppet agent
       - show status post restart
    4) restart puppetmaster
       - check if it's running via ps
    5) tail last 25 lines of puppetmaster log
    6) repair files
    7) clear the reports folder  #see cron above
    8) redo ownership:
        sudo chown -R puppet:puppet `sudo puppet config print confdir`

Good times.
This isn't for me, but rather for my co-workers, who have no idea how puppet works.
This will form a simple framework I can expand to make into a fully featured shellscript that will handle the most simplistic tasks.

But Mike, why not use theforeman?

I would, but the damn thing is a total bastard to install on SLES!

But Mike, what about SALT?

It's still in the mix, but unfortunately also hard to deploy on a mass level due to python being horrendously out of date on SLES 

Upcoming tasks this week:

So at this point I've got a few outstanding things I need to do.  I need to write more stuff for this blog, more reviews (oldpman's scifi kit, for instance), need to add a few thousand words to my "Monsters in the Cold" story, and need to work on getting feedback from a few of my proofers for Neo Monagasque Book 2.  Good news everyone!  Major plot development means no more boring nonsense.   Bad news everyone!  Someone DIES.

I should also work on my game project this week but seriously, when will I have the time?
I'm considering overhauling it or starting from scratch due to new assets being inbound.
It still works as a good learner level but at this point I have better assets to work from.

Stay tuned :)

No comments: