Oneiric server, Deploy Server fleets p2

Posted by Ahmed Kamal // September 23rd, 2011 // Uncategorized

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

14 Responses to “Oneiric server, Deploy Server fleets p2”

  1. Where are all those repos and profiles defined and hosted? Why should I need every supported version of Ubuntu?

    How do you configure them? What is orchestra other than preconfigured cobbler?

    What about other OS and their repos? Can they be managed in one instance? Is it possible to set up windows?

    You should link between the different parts of a series!

  2. [...] ISOs, thus will need a few minutes depending on your internet connection speed) EDIT: Continued on part-2 So, what do you think of this coolness? Is this easier than the last time you tried building [...]

  3. sadig says:

    @Philipp: in the end, cobbler is using the netboot image with a preseeded d-i installer…

  4. Chih-Hsyuan Ho says:

    First of all, thank you for this awesome tutorial.

    I was able to follow it all along up to the point of the PXE installation of oneiric01.ubuntu.lan server. The installer would complain about corresponding kernel module not being able to be found for the specified distro and if you ignored it and continued, it resulted in a failed installation. However, if I change the cobbler profile from “oneiric-x86_64-juju” to something like “natty-x86_64-juju”, everything seemed to work the way as instructed…

  5. [...] new orchestration and service management framework, orchestra for your automated deployment needs, Ubuntu Cloud infrastructure Ubuntu’s new private cloud based on OpenStack¬†with an Ubuntu [...]

  6. kim0 says:

    @Chih, oneiric is not yet released, so it might have been broken at the instant you were testing this. For me, natty was not yet working when I was writing this :D Since it worked with natty, I assume the instructions are fine and you’re not doing anything wrong .. Hope you enjoyed it :)

  7. [...] new orchestration and service management framework, orchestra for your automated deployment needs, Ubuntu Cloud infrastructure Ubuntu’s new private cloud based on OpenStack¬†with an Ubuntu [...]

  8. [...] system. This is documented in my previous article about deploying server fleets (part1, part2) – Afterwards, you will need to setup juju to “control” the Orchestra machines. This is [...]

  9. [...] system. This is documented in my previous article about deploying server fleets (part1, part2) – Afterwards, you will need to setup juju to “control” the Orchestra machines. This is [...]

  10. Yehia says:

    Hi,
    Big thanks for this. The first part seemed to work as a charm, but apparently not quite as I found out that the isos you list in the beginning of part 2 are not there (empty list). I tried importing isos using “sudo cobbler-ubuntu-import lucid-i386″ which I thought worked as I could see them in /var/lib/cobbler/isos. But then after adding a rule for my server, it wouldn’t boot from LAN. It gives me “FATAL: Could not read from the boot medium”. Where have i gone wrong?

  11. wkh says:

    This is very cool stuff for which I’m very grateful. I have, however, hit a snag. PXE booting isn’t working. When I start my oneiric01 box, having set it to boot from the network, I get: ‘FATAL: Could not read from the boot medium! System halted.’. I used VBoxManage add dhcpserver to add a dhcpserver on intnet but no go. Thoughts?

    Thanks again … WkH

  12. Steve says:

    I got most the way there, however I can’t install the vm as it can’t access the internet (and the ubuntu archives).

    I assume I need to add a gateway route in there somewhere but I don’t know what.

  13. Stephan says:

    This looks like a great stuff, so I decided to give it a try. I followed the tutorial to the teeth but got blocked at the PXE booting. PXE booted till I got the following messages:

    “[!!] Configure the network

    The network autoconfiguration was successful. However, no default route was set: the system does not know how to communicate with hosts on the Internet. This will make it impossible to continue with the installation unless you have the first installation CD, a ‘Netinst’ CD-ROM, or packages available on the local network.

    If you are unsure, you should not continue without a default route: contact your local network administrator about this problem.

    Continue without a default route?”

    I entered Yes.

    Then it asked for Name server addresses. I entered 192.168.77.1, then entered Continue.

    The next screen says:

    “[!!] Download debconf preconfiguration file

    Failed to retrieve the preconfiguration file
    This file needed for preconfiguration would not be retrieved from http://192.168.77.1/cblr/svc/op/ks/system/natty02.ubuntu.lan. The installation will proceed in non-automated mode.”

    I then went to the orchestra node, and did a wget at the above url, it did return the preconfiguration file, so this is not a problem of the orchestra node, but somehow an issue with the pxe booting, where the network didn’t seem to be configured well prior to downloading the debconf preconfig file.

    I tried both natty and oneiric profile, but got the same results.

    Any ideas?

  14. Stephan says:

    BTW, I used the latest 11.10 server iso as the base install for both nodes..