1

At work, we have several Ubuntu Linux workstations. I'm looking for a good/reliable/fast way to install a set of packages on all boxes at once. What I'm thinking of doing right now is:

  1. Install Ubuntu on a brand new box and use that as a master disk image.
  2. Clone or copy the partition contents to all boxes.
  3. When a package/set of packages need updating, apply the changes on the master disk image.
  4. Dump the master disk image to a central NFS server.
  5. Use PXE/diskless booting to put all workstations in a recovery mode.
  6. Clone the master disk image to all workstations once a week.
  7. Use a configuration management tool (what should I use?) to set up /etc and friends.

Has anyone else done something similar? How did you approach it?

I'm already using NFS/NIS, so I won't lose any user data.

1
  • are you wanting to do a one time set up, or to have it install a package on one comp and have that package go to the other comps?
    – scottarver
    Jul 16, 2009 at 21:25

8 Answers 8

2

I think puppet can help you with this. You're essentially managing a group of workstations instead of servers, but it should work the same way. That way you can create different groups based on any hardware differences,etc.

0
1

You can ghost it over to them all, but most linux distributions include a method to script the installation process. The advantage is it will ask you if a problem occurs, whereas just ghosting it over doesnt.

With Fedora (amongst others) you can script it such that all workstations login to a central source of control/alert so that they will conduct package installation autonomously but ask when differences and problems occur.

As an alternative, if you have mixed machine types, group their MAC addresses into hardware setup groups and use a live CD to rsync and install grub, dependent on MAC/Hardware setup.

Tons of approaches really. Tutorials on headless installs will provide some nifty ideas with or without screens.

Scripting the Fedora/Anaconda install process

1
  • The google term for Ubuntu automated installs is "preseed files", and I definitely agree that is the way to go. Imaging is so hard to maintain, and with the rate of security updates, it is important to be able to quickly update all your machines. Automated/unattended installation + automated configuration management (i.e., puppet) + managed package repos if you really need them. Jul 16, 2009 at 21:58
1

Another option you could consider is using the existing processes like "yum update" to pull packages from a repository that you run and force those workstations to all update at a specific time. All you need to do is update a master workstation, note the packages you need to distribute, and put them into your internal repository.

1
  • You need to make a repository inside your network for faster access and run yum update -y. For apt-get to work he will have to mirror an Ubuntu repository. Jul 16, 2009 at 21:50
1

I would suggest creating an APT repository. You can add your own packages to the repository, and use a cronjob to update the packages using apt-get once a week. The apt-get job can be made automatic, and since the repository is your own, you can update it or not as you desire.

All you would need to do is set up the repository and configure APT on all the machines to use it. I would recommend cfengine to configure all of the systems; thus you don't have to visit each one to update APT on each one.

You could even create a package with the repository configuration built right into it; I would recommend it in fact. Then when you build a new environment your local APT configuration is just an apt-get away.

1

I find it hard to believe that no one has mentioned Redhat Spacewalk.

It's the free open source equivalent to the Redhat Network's Satellite system. It allows you to manage your entire infrastructure of CentOS, Fedora, or Scientific Linux installations. It is essentially meant for what you're wanting to do.

Of course, you're using Ubuntu, as opposed to Redhat derived distros. Fortunately, the Ubuntu world has what you're looking for in Landscape. It comes free with a support contract, or it's $150/node. Expensive, but it's a trade off.

If you don't go with Landscape (or migrate to RH for spacewalk), then Puppet/CFengine might be your best bet.

0

ssh in to each box and run "apt-get install whatever".

consider having all the clients trust your public ssh key from your administration host so you do not need to provide password to do so.

0

If you're using a debian-based distro like Ubuntu, look into pre-seeding:

DebianInstaller Pre-seed

This allows you to specify just about everything you setup during install, like network, apt, packages, etc. When you boot the install cd, append:

preseed/url=http://blah/preseed.cfg

to the kernel boot menu, and it'll use your preseed config to do the install.

1
  • This will only help you with the initial install. The question is about upgrading packages on an existing installation. Jul 16, 2009 at 23:00
0

I used to be an administrator in my Electrical Engineering computer lab, counting about 20 computers, all Ubuntu. I liked to always use the latest Ubuntu release as soon as it was released, so I upgraded a lot.

The setup of the computer lab was such that I had one Debian master-box (seldom updated/upgraded), which I used for hosting the student branch's web page, managing the user accounts (with LDAP, allowing the each user to sit at any computer and log in with his/her home folder available), running maintenance scripts, etc.

The method I used to update (which is somewhat crude in my opinion tbh) involved writing a CD with the latest release, when released, and manually placing them in the drives, rebooting and going through the regular installation procedure. When the install was complete I copied the public RSA key I had generated (once) to the host (into the /root/.ssh/ folder), and therefore giving the Debian box control over the host box. So on the master box I had a python script (it can of course be any scripting language) which brought the host computer up-to-speed with my wanted configuration, copying config files to the host box (such as the LDAP config files, pre-built gnome config files, etc.), apt-get the required packages (a lengthy process), configuring them (by copying their config files and menu-item files to the correct places) and otherwise setting the host box up.

This process, although crude and unsophisticated, only required my presence for actually booting the "to-be-updated" box up from the ubuntu setup CD and going through the few setup screens for ubuntu, configuring the /etc/network/interfaces file for access to the network, and then running the script on the master box, then I could be off doing something else.

If you want more info please post more specifically what you want to automate, whether it be just the actual process of setting up a new release version of a currently running linux distro or setting up programs that require building source files or such ('cause I used to also build my own packages for programs such as Eclipse (which doesn't play nice with Ubuntu straight from the package manager), XCircuit (which is "buggy" at best from the package repo, Matlab (which requires punching in a cd-key and more)...

Hope that helps! =)

You must log in to answer this question.