Hudson + Ubuntu Live CD

Asked by anand_ndlh

Hi,

I am a newbie and I want Hudson (from thoughtworks) to run for my current requirement. However, I don't have a dedicated M/c install Ubuntu and run it from there. I want to try it out first.

So, the option that I have is to have a Live CD of Ubuntu with Hudson installed on it.

Thoughts on how to do it ?

Thanks in Advance.
Anand

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu squashfs-tools Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eliah Kagan (degeneracypressure) said :
#1

I'm not finding any information on an application called Hudson via a general web search, nor by specifically searching the website of Thoughtworks Studios. Can you provide a link to some good source of information about this software?

Depending on how the software is installed on an Ubuntu system, and other factors including your personal preferences, there are three general solutions that may work for you:

(1) Boot the Ubuntu live CD and install Hudson in the live CD system each time. Sometimes this is not very time-consuming, and thus the simplest option/

(2) Boot the Ubuntu live CD and run Hudson off of another medium, such as a USB flash drive.

(3) Create your own Ubuntu live CD with Hudson installed on it.

But in order to know how to do any of these things, more information about the software itself is necessary.

Revision history for this message
anand_ndlh (anand-ndlh) said :
#2

Thanks for the reply Eliah.

Here's the website URL for Hudson:- http://hudson-ci.org/

I would like to go for the third option provided by you. So, if you can explain how any Software is installed on a Live CD, I think that will do. As I had explained, I am newbie and want to try out this thing first before installing the same in a dedicated M/c. All I know is I can download the ISO distro of Live Ubuntu and then burn it to a CD to use it as a Live CD to boot Ubuntu from. But, I want Hudson installed on the Live CD as well so that I won't have to install it everytime I boot my M/c from the Live CD. Or if you have a Skype ID we can even talk about it.

Thanks in Advance for your help,
Anand
Mob : +91-97403-05479
Email: <email address hidden>

> To: <email address hidden>
> From: <email address hidden>
> Subject: Re: [Question #151983]: Hudson + Ubuntu Live CD
> Date: Thu, 7 Apr 2011 13:42:32 +0000
>
> Your question #151983 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/151983
>
> Status: Open => Needs information
>
> Eliah Kagan requested for more information:
> I'm not finding any information on an application called Hudson via a
> general web search, nor by specifically searching the website of
> Thoughtworks Studios. Can you provide a link to some good source of
> information about this software?
>
> Depending on how the software is installed on an Ubuntu system, and
> other factors including your personal preferences, there are three
> general solutions that may work for you:
>
> (1) Boot the Ubuntu live CD and install Hudson in the live CD system
> each time. Sometimes this is not very time-consuming, and thus the
> simplest option/
>
> (2) Boot the Ubuntu live CD and run Hudson off of another medium, such
> as a USB flash drive.
>
> (3) Create your own Ubuntu live CD with Hudson installed on it.
>
> But in order to know how to do any of these things, more information
> about the software itself is necessary.
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/151983
>
> You received this question notification because you are a direct
> subscriber of the question.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#3

This explains in detail how to create a customized Ubuntu live CD:
https://help.ubuntu.com/community/LiveCDCustomization

Those instructions are a bit dated, but they still work well. There are, however, a couple things to be aware of. First of all, those instructions give examples of customizing the Ubuntu 9.04 and Ubuntu 9.10 live CD's, but you should not actually use either of those versions of Ubuntu--9.04 is no longer supported, and 9.10 is only supported through the end of this month. Instead, you should use Ubuntu 10.04.2 LTS or Ubuntu 10.10. Ubuntu 11.04 comes out later this month, so you might want to use that, but I wouldn't recommend using a customized Ubuntu 11.04 live CD (or any Ubuntu 11.04 system of any kind) for production purposes until it is officially released (i.e., out of beta), unless you have a very good reason to do so and you know exactly what you're doing. Second of all, there were some significant changes between 9.04 and 9.10, so those instructions tell you things that they indicate are specific to 9.10. Those things apply to later releases (i.e., any release you'd reasonably use for your purposes) as well.

Since you say you're a newbie, I figure you might find those instructions a bit scary...but just read them carefully, and try to follow them. If you have questions or confusions or experience errors, please post again (in this question, not by creating a new one), and I (or others) will try to help you.

There is one conceptual point I'd like to add to those instructions. If you understand what a chroot is, then as you're following those instructions, what you're doing will make a whole lot more sense. When you chroot (http://en.wikipedia.org/wiki/Chroot) into the live CD system (with the chroot command), you are launching a shell (http://en.wikipedia.org/wiki/Shell_(computing), http://en.wikipedia.org/wiki/Unix_shell) that sees the filesystem of the live CD you're customizing as its filesystem (so for example it sees the folder /usr as that folder on the live CD system being customized, rather than the Ubuntu system that is actually running on your computer). Therefore, when you perform an action inside the chroot (i.e. in the shell that runs when you run the chroot command), it is as though that action is being performing on the live CD system you're customizing, rather than on the system that is actually running on your computer.

This is not a universally sure-fire way to know whether or not you're in a chroot, but during this process, when the command-prompt shows you a $ character before you type text, you're probably not chrooted, whereas when it shows you a # character before you type text, you probably are chrooted.

Now for some specifics for what you're trying to accomplish. Your goal is to create a live CD (or live DVD), similar to the official Ubuntu live media, but with an extra package installed (plus any other extra packages that this package depends on, if any). So, after performing the instructions before them at https://help.ubuntu.com/community/LiveCDCustomization (*including* the instructions under "If you need the network connection within chroot"), you will need to run the three prerequisite commands at https://help.ubuntu.com/community/LiveCDCustomization#Prerequisites. Then you can update, install, and/or remove packages from the live CD. I recommend that you first (after running those prerequisite commands) update all the packages on the live CD (this installs security and stability updates), by running these two commands:

aptitude update
aptitude upgrade

The first of those commands updates the package database to reflect information about all the currently available packages. The second of those commands upgrades all packages to the latest available versions.

It does not appear that Hudson is provided by any Ubuntu repositories (software sources), so you'll have to manually fetch the package file for it:

wget http://java.net/projects/hudson/downloads/download/Debian/hudson-debian-1.398.deb

(That command is a single line--if you see it split into multiple lines, make sure to paste it in all at one time. If it gets split across multiple lines in your Terminal window as a result of word wrapping, that's OK though. Also, please note that that's for the latest stable version of Hudson as of the time of this writing, but you should check the current version of Hudson first, and perhaps modify that command accordingly.)

After you've fetched it, you can install it:

dpkg -i hudson-debian-1.398.deb

(Again, you may have to modify that command to reflect a different version of Hudson. Since in this case hudson-debian-1.398.deb is the name of a file now existing in the present working directory of the local system--the local system, in this case, being the live CD system you're customizing, rather than the system that's actually running on your computer at the time--you can use a shell feature called tab completion to run that command. To do this, enter that command up to the first few letters of the filename, and then press tab. If there are no other files present in that directory that begin that way, then it will automatically type out the rest of the filename for you.)

After installing it, you'll want to remove the .deb package, because space is typically tight on a live CD system. Plus, if you were going to keep the .deb package on the live CD system for some reason, you'd want to put it somewhere that made sense, and not just leave it in the / folder. To remove the file, run the command:

rm hudson-debian-1.398.deb

(Again, this command will be different with a different version of Hudson, and you can enter it easily using tab-completion.)

Then finish the steps at https://help.ubuntu.com/community/LiveCDCustomization, including all of the commands at https://help.ubuntu.com/community/LiveCDCustomization#Cleanup (since they all pertain to your situation), and try out your live CD.

If you are able to proceed with those instructions now, you can go ahead and do so. There are, however, some other issues that may get in your way (you will notice that those instructions presuppose that you are already running Ubuntu!), which I'll post about shortly. Nonetheless, please feel free to post here explicitly about any such issues that affect you, rather than assuming that I will necessary know about / think about them and address them in my next post.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#4

You actually do not need to be running Ubuntu in order to customize an Ubuntu live CD. You can also do it from another GNU/Linux operating system. If you use a system similar to Ubuntu, like Debian, you can probably follow those instructions as they are. If you use a less similar system (for example: Fedora, Mandriva, Slackware, openSUSE; or, just about any other Linux-based system) then the instructions will differ in that package management commands run on the *host* system would have to be replaced with the equivalent commands for the non-Ubuntu system. Specifically, this is the "sudo aptitude install squashfs-tools genisoimage" command, plus you might need to run additional commands or otherwise install other software besides what that accounts for, if the non-Ubuntu system doesn't already have some of the utilities that Ubuntu systems are assumed to have.

But I'm guessing you don't merely lack an Ubuntu system, but rather that you have no GNU/Linux system at all. I'm guessing that you're running some version of Microsoft Windows. While there are Linux-like environments for Windows, such as Cygwin and Interix, which support chrooting, they are different enough for a real GNU/Linux system that you're likely to have a lot of problems, especially if you don't know what you're doing -- customizing an Ubuntu live CD within Windows using such an environment seems more like something someone might do just to say they had done it, than as a reasonable use of your time in pursuit of some practical objective. Considering that you are a novice, I recommend against that approach. (On the other hand, if you find a guide for doing so written by someone who has tried it, then with that specialized advice, it might then become a reasonable approach.)

Instead, you should use a GNU/Linux system to customize your Ubuntu live CD. It might as well be an Ubuntu system, if you don't already have some GNU/Linux system to work with. So here are your options for getting such a system:

[1] Boot from an Ubuntu install CD and install Ubuntu alongside Windows on an existing machine. Assuming the machine only has one hard drive, you should shrink down the Windows partition and create new partitions alongside it for Ubuntu. The Ubuntu installer with provide you with this option and perform those operations automatically if you select it. You should back up important files from the Windows system first, since there is a quite low but real risk of data loss when dynamic partition resizing is performed. This method will by default install GRUB2, the bootloader used by Ubuntu, to the master boot record of the hard disk on which Ubuntu is installed; when you boot the machine, that boot loader will give you the choice between Ubuntu and Windows (or whatever other operating system or operating systems are installed on the machine). Of course, if you're going to install a fully-fledged Ubuntu system like this, then you might just be able to use that system to run/test Hudson!

[2] Install Ubuntu within Windows using Wubi. Do do this, you'd put an Ubuntu install CD in the drive of the Windows system (or mount the .iso image for it with a utility like Daemon Tools, Alcohol, or Virtual CloneDrive) and run the Windows installer from the CD. This will install the Ubuntu system in a writable disk image file contained inside your Windows partition and add Ubuntu to the list of options in the Windows boot menu. Thus, no repartitioning or modification of the master boot record is necessary. The system can be uninstalled from within Windows in Add/Remove Programs, like any other application. However, a Wubi system is not really a Windows application. While it runs slower than a standard Ubuntu system because it's slower to use an image file in an NTFS filesystem than to have its own Linux ext4 partition on the hard disk, and it has some limitations and bugs that do not affect a standard Ubuntu system, Windows is not running when you're using your Wubi Ubuntu system, and you must reboot to switch between the Ubuntu and Windows systems. Of course, if you're going to install a Wubi system like this, then you might just be able to use that system to run/test Hudson!

[3] Install Ubuntu on a virtual machine, using virtualization software such as VirtualBox, VMware, or QEMU. Microsoft's virtualization solutions tend to work very well for Windows guests, but not nearly as well for Linux-based guests, so I don't recommend using that. Of the three virtualization solutions listed above, VirtualBox and VMware are the easiest to use; furthermore, QEMU tends not to perform as well, at least anecdotally. VirtualBox 4 is FOSS (free software, open source) but proprietary extensions are available. VirtualBox 3 is proprietary, but VirtualBox 3 Open Source Edition (not possessing the extended proprietary functionality) is FOSS. VMware products are proprietary. Proprietary VirtualBox software can still be used gratis for personal and (I think) educational use, as can VMware Player, which is critically different from the payware product VMware Workstation in that VMware Player cannot create virtual machines, but only run them. (But there is third-party software available for creating VMware virtual machines.) If you're doing this as part of a business venture than I strongly recommend paying attention to the terms of the license agreements of any free-as-in-beer (but not as-in-freedom) virtualization products. If you install Ubuntu on a virtual machine on a Windows host, then Windows will be running while the virtual machine is being virtualized, so you need not interrupt your work on the Windows system whenever you wish to use Ubuntu. Of course, if you're going to use an Ubuntu virtual machine like this, then you might just be able to use that system to run/test Hudson!

This is probably your best option. If you do not consider simply testing Hudson on Ubuntu in a virtual machine to be sufficient (perhaps because you want to make sure it runs to your liking on the actual, physical machine or machines on which you're considering using it), then this seems like the easiest and least invasive way for you to get what you want. Furthermore, you could even test Hudson in the virtual machine first, if you wanted to do an easy, preliminary test before bothering to create a customized live CD.

On the other hand, if booting from a live CD is absolutely the only way in which you're willing to run Ubuntu at this point, then read on...

[4] Run Ubuntu from a live CD, and use that live CD system as the Ubuntu system in which you (separately) customize your (separate) live CD system. Since these are separate systems, the live CD system you run need not be from the same live CD release/variant that you're customizing, though it certainly could be and probably would be. For example, you could run the live CD and customize the live DVD, or run the live DVD and customize the live CD, or even customize a different version than the one you're running, or a different Ubuntu "flavor" (for example, you could run the Ubuntu Desktop live CD and customize the Netbook live CD, if you wanted). With that said, the version you run (as well as the version you customize) should be some current version of Ubuntu. You can run the live CD from a USB flash drive, if you wish. That tends to be faster than running a live DVD, which in turn tends to be faster than running a live CD (though often the live DVD tends to be slower booting up initially). I will call the live CD you're running the "vanilla live CD" to distinguish it from the live CD you're customizing. Whatever medium you choose to run the vanilla live CD from, you will need a separate durable and rewritable storage medium on which to create and edit the live CD system that you're customizing. It does not need to be blank (though this might be practically necessary--see below). This medium could be a hard drive, a USB flash drive, or even a compact flash drive. If it's a hard drive, it could be an external hard disk, but it could be an internal disk--even one used for an existing operating system (such as your Windows installation), so long as it meets the free space requirements presented near the top of https://help.ubuntu.com/community/LiveCDCustomization (but, again, read on for some very significant caveats).

If you're storing files for the live CD you're customizing on a separate volume from the one containing the root filesystem of the vanilla live CD (which, as explained above, you have to do, in order for this to work), then you'll have to apply the instructions at https://help.ubuntu.com/community/LiveCDCustomization in a slightly modified way. You'll notice the command "mkdir ~/livecdtmp" (at https://help.ubuntu.com/community/LiveCDCustomization#Obtain%20the%20base%20system). The ~ in that command represents your home directory. (On a live CD system, by default your home directory is the home directory of the live CD user called ubuntu, so its full path is /home/ubuntu, and it exists on the live CD, so there is a very tight limit on what files you can create inside it because they have to be stored in memory rather than on disk. See http://en.wikipedia.org/wiki/Home_directory if you don't know what a home directory / home folder is.) You must replace the ~ with the full path of the separate volume. For example, if you are using a USB flash drive to provide storage for working on your custom live CD (which is not to be confused with running the vanilla live system from a USB flash drive) and the flash drive's volume label is Foo, then this full path might be /media/Foo, so then instead of running "mkdir ~/livecdtmp" (and the other two commands that follow it), you would run:

mkdir /media/Foo/livecdtmp
mv ubuntu-10.10-desktop-i386.iso /media/Foo/livecdtmp
cd /media/Foo/livecdtmp

(Please note that /media/Foo is only if your storage volume were labelled Foo. You can find out what a volume is called, and its mount point--the directory path in which its contents are accessible--by looking in the Places menu. You might also have to look inside /media, to see the various mounted volumes. You might need to mount the volume, which you can usually do by clicking on it in the Places menu. Please note also that the name of the .iso file may differ from what I have used in this example, just as it may and almost certainly will differ from the example at https://help.ubuntu.com/community/LiveCDCustomization#Obtain%20the%20base%20system.)

There is an additional complication. The above will work fine **if the storage volume has a Unix-style filesystem** (like ext2, ext3, ext4, ufs, reiserfs, xfs, and so forth). It will not work with a filesystem that doesn't support Unix-style permissions (such as NTFS, FAT16, FAT32, exFAT, HFS, and HFS+). (If you don't know what your filesystem is or whether or not it supports Unix file permissions, please feel free to post to ask for help in figuring that out. You might be able to find that out by viewing the device in GParted; see below.) In practice this means that the above instructions will not work on hardly any device, unless you format the device specially. The best case scenario is if you have a blank hard drive, USB flash drive, or compact flash drive of sufficient size. Then you can just format it ext4 using System > Administration > GParted Partition Editor. (When you do this, I suggest you make sure to give it a volume label, which makes operations you perform on it from the Terminal more intuitive--otherwise, it will be automatically mounted at /media/some-big-long-serial-number-string instead of /media/the-name-you-gave-it. And make sure not to format a partition on the wrong device!) If you don't have any available empty devices (or devices whose contents are disposable), then you might consider shrinking down the non-Unix-style partition on the device, and then adding an ext4 partition to the right of the shrunk-down partition. You can do this in GParted, though as I said before, dynamic partition resizing occasionally results in data loss, you should make sure that any important files on the device are backed up first. Doing this will only help you if you're able to shrink down the partition enough to make enough free space to create an ext4 partition big enough to fulfill the disk space requirements presented near the top of https://help.ubuntu.com/community/LiveCDCustomization. Of course, if you are considering resizing a partition on an internal hard disk, then you'd probably be better off using method [1], [2], or [3] rather than this method. (And in fact, I hasten to add, almost everyone is better off using option [3] than this method. I am only presenting this method because you expressed a rather strong desire to avoid actually installing Ubuntu. But perhaps you had not considered using a virtual machine...)

The reason the storage device has to have a Unix-style filesystem is (to put it a bit oversimply) that an Ubuntu live CD .iso image is readonly, so you are extracting its contents to this storage device in order to be able to modify them. If the volume onto which you extract it doesn't have a filesystem that supports the Unix-style system of file ownership and permissions, then critically important information is lost in the process, and the customized live CD you create would not be usable. If you absolutely cannot rustle up a storage device that you can reformat, then you do have another option, but it adds even more complexity--you can create another kind of disk image that is both readable and writable, and which itself contains a Unix-style filesystem, and you can extract the contents of the .iso image to that. (There are also other very similar and equally complex techniques.) Since this post is extremely long already, I am not going to present such a technique here, but if you decide you want to do that, please feel free to post a reply asking for directions for that.

There is one other difference you should be aware of, when it comes to adapting the instructions https://help.ubuntu.com/community/LiveCDCustomization to a situation where you are running a live Ubuntu system in which you are customizing a (separate) live Ubuntu system. And that is that, if you're running the live system from a CD or DVD and you only have one optical drive, you obviously cannot burn the customized .iso image you've created from within the vanilla live CD system. But you don't have to--you can boot back into Windows and burn it from there. (And you can still write it to a USB flash drive from within the vanilla live CD system...or from Windows.)

[5] If your goal is simply to test Hudson, and not specifically to test Hudson on Ubuntu, then you can save yourself plenty of effort and just install it on one of your Windows systems. (From what you've said, I strongly doubt that is the case, but I wanted to mention it just in case it is.)

I'd be pleased to provide clarification, further information, or assistance with any of these methods--just ask!

Can you help with this problem?

Provide an answer of your own, or ask anand_ndlh for more information if necessary.

To post a message you must log in.