4

My job requires frequently updating versions of Centos-compiled software on customers PCs over multiple ssh hops. Recently this got to the point of unmanageable by hand. What software can be utilized to automate the process?

What I need is something that will accept a bunch of updated files, transfer them over scp/ssh and automatically run unpack/replace script on remote host. Is there such software or is that writable by simple bash scripting?

Ideally, what I want is to write(on my own machine) "helperappname hostname packagefile" and have helper app perform the deployment. or something like that.

3

If all your target machines are CentOS, I would really recommend trying to bundle up the apps as RPMs. Once you get through that once, you can easily automate the bundling of newer versions, and deployment becomes a simple matter of setting up a repo accessible to all the destination servers (which may have difficulties of it's own) and running a simply "yum update" or "yum install" command on each client you want the software updated / installed on. The time investment will be somewhat large - on the order of a week or two if you learn fast - but your return will be huge - reducing installation time to under 30 seconds on each target machine.

  • This approach might be acceptable if they agree to open these pcs for yum. I am not sure they will. If they do - I can even delegate rpm creation to our "linux guy" :) Though i'd like to learm rpm myself, I have too much on my hands to put away a week for this. – Zeks Jun 18 '13 at 18:53
  • 2
    If the PCs can browse the web, they can be used with yum, since yum transports over 80/443. I understand not having the time available to learn RPM packaging, but I still think this would be your best solution if you can make it work politically. – John Jun 18 '13 at 19:01
3

This is a pretty dense area of tools available for this type of task. As you've mentioned you can essentially roll your own with simple shell scripting all the way up to a configuration management tool such as cfengine or puppet.

I'd be inclined to start simple and roll my own shell scripts and then move up to one of the dedicated systems for performing this.

Doing it this way will allow you to get a good grasp of your needs before you try biting off a setup such as Puppet, for example.

There's a pretty good list of these types of tools over on Wikipedia: Comparison of open-source configuration management software.

These are tools that I've used in the past which work well and have varying degrees of difficulty in getting them setup and running.

Of the above mentioned I've used most of them and can say that probably Capistrano and/or Chef would be good to get started with. But as I said, I'd probably do the shell scripts approach first, and then start thinking about one of these solutions longer term.

lighter weight options

If the above options are still too heavy there is also tools such as myrpm. It's essentially a frontend for rsync and ssh but it allows you to operate on a group of servers that you configure in a text file. myrpm gives you commands such as:

  • putKey
  • deployKeys
  • mass-rsync
  • mass-ssh-remote-exec
  • mass-ssh-remote-cmd

These allow you to push ssh keys to the various hosts, push files to them, kick off remote commands to the servers, and kick off one-time commands such as yum -y update.

References

  • I'd like to start with shell too but I need a time estimate. How much will it take to create a reasonable deployment script considering I am a total bash noob? Time is a bit short for me... >10 installation points already and they are really eating at my work time :( – Zeks Jun 18 '13 at 18:38
  • Are the sites all different distros or are they Red Hat? – slm Jun 18 '13 at 18:41
  • They are all centos 5.6(or 5.8) instalaltions – Zeks Jun 18 '13 at 18:50
  • 1
    You might want to take a look a this application: myrpm. It's pretty lightweight and provides a wrapper around rsync and ssh but allows you to operate on a group of machines at once rather than individually. Should only take minutes to get going with this app. – slm Jun 18 '13 at 18:59
  • Thx, I will definitely check this tomorrow – Zeks Jun 18 '13 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.