Automate installation of FreeBSD/DA to 12 boxes?

df-sean

Verified User
Joined
Feb 8, 2007
Messages
51
I want to install FreeBSD 6.2 with various software packages and with DA configured to my liking. It will be identical for all 12 boxes and the hardware is identical. In the future, I'll need to do this for more boxes -- again with the same exact config.

Is there some way I can save the pain and potential for human error by setting up one box, then "cloning" that system to the other machines? Of course I'll need some things to be a little different like the IP addresses, hostname, DA license.

How do you do this?
 

Marshall

Verified User
Joined
Nov 1, 2004
Messages
151
Location
California
Well one way to do that is to download their setup.sh script and open it in a text editor and modify it to your setup. Just copy that to your new servers (after testing it to make sure it works fine) and use that instead of dling it straight from DA. Make sure you dont modify the top where it asks for your license ID so that it can still download all the DA files correctly, just modify how it installs and what it installs to suite your needs.
 

df-sean

Verified User
Joined
Feb 8, 2007
Messages
51
Thanks for the tip -- but that sounds like it would only help for the DA part of things. I'm looking for a complete solution which includes DA as well as the OS and other packages such as Apache, PHP, etc. Anyone know how to do it all?
 

Marshall

Verified User
Joined
Nov 1, 2004
Messages
151
Location
California
Well, you can always add on to the script. Make it do other things at the end of the file to setup anything else you want like navigate into the ports tree and do "make install"s on whatever packages you want.
 

df-sean

Verified User
Joined
Feb 8, 2007
Messages
51
That's an interesting idea. So maybe if I setup a PXE boot server, get a raw FreeBSD 6.2 image from that, then run the DA setup script with all my portinstalls, etc -- hmmm...

It still seems like there must be a simpler way. These boxes are identical. Maybe some way to do it as a binary copy? I'm a bit out of my depth here. Anyone already got something like this setup?
 

jonathanc

Verified User
Joined
Aug 18, 2007
Messages
46
Have you solved your clone problem. I am using mondo-created restore CDs to clone a centos 5 installation that includes an operating/licenced DA. Post installation install of a new licence for the new IP address seems to be working OK. Have you found any bad/unexpected experiences of cloning?
 

df-sean

Verified User
Joined
Feb 8, 2007
Messages
51
I sorta gave up for the moment. I had a PXE server all set up but my client servers couldn't see it or boot from it. Then all of a sudden they DID see it and boot from it (which was scary and unexpected). I decided to shelve the automation for now. Hopefully something better will come along (or at least some better documentation).

In the meantime, I've just taken meticulous notes on my install process and tried to condense as much as possible into one-liners like this one for installing python/mod_python:

pkg_add -r python25 && cd /usr/local/bin && ln -s python2.5 python && ln -s python2.5-config python-config && cd /usr/local/src; wget http://mirrors.24-7-solutions.net/pub/apache/httpd/modpython/mod_python-3.3.1.tgz && tar zxvf mod_python-3.3.1.tgz; cd mod_python-3.3.1 && ./configure && make && make install

It definitely speeds up the install process to have copy-and-paste stuff like that ready to go.

But it's a shame we have to go through any of this manual labor at all. Isn't this precisely the kind of grunt work computers were invented for? ;-)

I suppose the next step would be for me to write a python script that really does automate the entire process after the blank FBSD install. The ultimate would be to have the OS installed by PXE/install.cfg, which would in turn call my script, which would prompt for various unknowables like this server's IP/hostname,nameservers, etc.

Sean
 

JDiel

Verified User
Joined
Feb 13, 2006
Messages
64
Location
Netherlands
Would Altiris be a sollution for your "problem"?

Within Altiris you can create installation scripts (OS/DA/ what not) which you can drag on each server and it would roll out 12 exact servers (without duplicate IP's and names ofcourse). This requiers the servers to boot PXE.

Regards, Jeroen.
 
Top