Friday, September 23, 2011

Oneiric server, Deploy Server fleets p2

Welcome to the second installment of this article series. In the first part of this article we installed an Ubuntu server instance, made sure it became an orchestra installation server. If this is new to you, Orchestra is a new Oneiric server feature that enables admins to very easily deploy fleets of Ubuntu servers. Let's pick up where the first article stopped

First, let's check where we are. You see installing the orchestra server, it automatically downloads and imports various Ubuntu server ISOs and creates all the needed structure (distros, profiles ...etc) in the underlying cobbler system. Let's see what have we

$ sudo cobbler list
distros:
   hardy-i386
   hardy-x86_64  
   lucid-i386
   lucid-x86_64  
   maverick-i386 
   maverick-x86_64
   natty-i386
   natty-x86_64  
   oneiric-i386  
   oneiric-x86_64

profiles:
   hardy-i386
   hardy-i386-juju
   hardy-x86_64
   hardy-x86_64-juju
   lucid-i386
   lucid-i386-juju
   lucid-x86_64
   lucid-x86_64-juju
   maverick-i386
   maverick-i386-juju
   maverick-x86_64
   maverick-x86_64-juju
   natty-i386
   natty-i386-juju
   natty-x86_64
   natty-x86_64-juju
   oneiric-i386
   oneiric-i386-juju
   oneiric-x86_64
   oneiric-x86_64-juju

systems:

repos:
   hardy-i386
   hardy-i386-security
   hardy-x86_64
   hardy-x86_64-security
   lucid-i386
   lucid-i386-security
   lucid-x86_64
   lucid-x86_64-security
   maverick-i386
   maverick-i386-security
   maverick-x86_64
   maverick-x86_64-security
   natty-i386
   natty-i386-security
   natty-x86_64
   natty-x86_64-security
   oneiric-i386
   oneiric-i386-security
   oneiric-x86_64
   oneiric-x86_64-security

images:

mgmtclasses:
   orchestra-juju-acquired
   orchestra-juju-available
woah! that sure makes my life easier. If you're interested to see where the isos were downloaded (like I was) here you are
ls /var/lib/cobbler/isos/
hardy-i386-mini.iso    lucid-i386-mini.iso    maverick-i386-mini.iso    natty-i386-mini.iso    oneiric-i386-mini.iso
hardy-x86_64-mini.iso  lucid-x86_64-mini.iso  maverick-x86_64-mini.iso  natty-x86_64-mini.iso  oneiric-x86_64-mini.iso

Let's create a new virtual box VM, to serve as our new "server" that needs to be installed. Here's how it looks for me
12-oneiric01-vboxsettings

One thing is worth noting however, it's that the NIC is placed on the "intnet" network, which has the IP range 192.168.77.0/24 that we configured in the first part of this article
13-vbox-natty01-netsettings

now the only "real" thing you have to do, is to add a profile on the orchestra server for your new bare server. The profile binds its mac address, to a name and an installation profile (think OS to install, kickstart ..etc)

sudo cobbler system add --name="oneiric01.ubuntu.lan" --mac-address="08:00:27:B7:76:2A" --ip-address="192.168.77.33" --dns-name="oneiric01.ubuntu.lan" --hostname="oneiric01.ubuntu.lan" --profile="oneiric-x86_64-juju" --mgmt-classes="orchestra-juju-available" --kopts=" DEBCONF_DEBUG=developer netcfg/dhcp_timeout=120 netcfg/choose_interface=eth0"
Boot the server, choose PXE (For vbox that's F12 then "l" that's an L)

14-natty-PXEbooting

Watch the installer fly by (look ma hands free)

15-installer-running

and your box is ready!
16-Oneiric01-ready

That's how easy it is to install a fresh server off your orchestra box! So basically the only thing you need to do per server, is to attach it to a profile and that's it. Boot it and it installs whatever you provisioned for it. Of course any good admin already did that manually before, but it took effort and it wasn't standardized. Now you can count on Ubuntu server covering your back when you're tasked with installing a hundred servers

How cool was that! Got thoughts, comments or rotten tomatoes ? Shoot me a comment

7 comments:

rolwil said...

I followed your instructions step by step but when the installation process for the deployments are running, it always fails with a "Bad archive mirror". Since there is only an internal network it doesn't make any difference when I change the mirror.
Is there anything I am missing?
http://dl.dropbox.com/u/1404227/fail_install.png

Ahmed Kamal said...

mm .. no idea what's going wrong, but you can try pressing ALT + right-arrow a few times to get to a console .. see the error logs .. see if you have network connectivity and if you can reach the installation mirror. You may be able to start debugging the issue from there on. If you get more info, you can ask around in #ubuntu-server as well. Good luck

rolwil said...

I had a third host only network interface configured for the orchestra server. although I did not use the host only ip in any configuration for the orchestra server, the logs tell me that the installation of the images rely on that "host only" ip.
A fresh installation of the orchestra server without the host only adapter works just fine. Thanks.

Carlos Javier said...

Great tutorial! thanks.

I was able to follow it to the end with only one minor bump. I initially didn't select the Virtualbox NIC to be "PCnet FAST III" type, I left the default one "Intel PRO..." and PXE didn't work that way. This was solved as soon as I changed it to the NIC type in the tutorial. I see several reader having this problem over cloud.ubuntu.com, but comments are disable over there at least for me.

Thanks again,
Carlos

George Vaccaro said...

Ahmed,

this is off topic but is there any chance you could update/redo your x2go post to adjust for oneric? I just did something similar with xrdp but it doesn't support sound and the process was much more complicated.

Great blog btw, I'm soaking this all up. Amazing ideas and technology. As a new EC2 and long time Ubuntu user/lover it's really relevant and eye opening to what is now possible. Thanks for publishing it all.

Ahmed Kamal said...

Hey George,

Doubt I'll have the time to update it, however if you'll do it, I can publish it or link to it. Glad you're enjoying the blog .. Happy new year :)

George Vaccaro said...

I found an article here about it. Worked like a charm with the exception of the "aptitude" vs. "apt-get":

http://wobblycogs.co.uk/index.php/computing/linux/61-install-x2go-on-ubuntu-oneiric