vyatta

open thought and learning

Posts Tagged ‘automator

Automator on Google Code

leave a comment »

Finally, I have a home for Automator on Google Code at sysadmin-automator. I will start uploading existing scripts tomorrow.

Written by mohitsuley

July 27, 2008 at 3:56 am

Posted in linux, sysadmin

Tagged with ,

Automator

leave a comment »

I have finally been able to create a project on sourceforge for that pet project of mine – Automator.

It all started with my irritation at having to execute the same commands over a number of servers, most of the times during the day. Unfortunately, webmin was not much of an option – I don’t prefer it too much because of it’s highly invasive nature. Moreover, I should have the ability to run a script over a group of servers that I know belong to an application or a tier. For that matter, if today, I wanted to sync all my linux servers from a specific NTP server *manually*, I should ideally execute a command whose pseudocode might look like:

execute on all servers that have OS as linux

So, beginning with this concept, I realized this was not much of a technical feat. It actually was the cumbersome task of ‘documenting’ what each server constituted right from the very beginning and then using this information during my day-to-day tasks.

Let’s say there’s an application called WORDPRESS which has three tiers – DB, WEB and APP and also has three separate set of servers each for DEVelopment, STAGE and PRODuction (that’s how big companies work, you know). To add to it, there are servers across the world, but this particular application actually is in a data-center in NYC. Now, using this information (and much more that can be collected automatically from each server, like, OS, architecture), I should be able to know what servers to work on.

In a nutshell, this is what automator might work like:

mohit@test$auto-command -g WORDPRESS-PROD-WEB -c ntpdate ntp.timeserver.com

This will run ntpdate on all WordPress production web servers. Neat! But how do you bell the cat? The only way I have been able to figure out is during initial handover of the box. Every organization that manages more than a hundred servers has a process in place which has a team ‘audit’ the server and run scripts in order to configure default services before it is handed over to the customer. This is when we can run our own ‘automator service registration’. All you do is connect to the remote server, push your script, run it remotely and then grab some data automatically and of course manually (like environment, name of application etc) and store it in a MySQL database.

I have this working using a system of bash shell scripts. But with time, modifications and the sheer number of servers that I manage, I am moving this over to Python/MySQL. But yes, I’d like to keep it simple – just as a command line interface with a very basic framework that other SAs can use to build their own scripts when they include the package.

Let’s see how far this idea goes.

Written by mohitsuley

July 24, 2008 at 5:36 am

Posted in linux, sysadmin

Tagged with , ,