curtinator
[a] could help you to customized Ubuntu desktop images that could be deployed by MAAS.
Please go to [a] and download the curtinator
source by bzr
. The README
of the curtinator project source should be sufficient to guide you to make a MAAS-deployable Ubuntu desktop image and be imported by MAAS. However, please let me illustrate the "too detailed"[b] steps for you according to the README. I have tested these steps on MAAS 2.1.3 with Ubuntu Xenial 16.04.1 desktop images. You could skip the following steps if you think the README is enough to you.
Prepare the Environment
- I tested these steps on my Ubuntu Xenial 16.04.1 Desktop system.
sudo apt-get install qemu-kvm libvirt-bin virt-viewer genisoimage
- Reboot the system after you have installed the above packages.
bzr branch lp:curtinator
to fetch the curtinator source (you may need to install bzr by sudo apt-get install bzr
) somewhere, say <curtinator root>
- Download an Ubuntu desktop image. In this case, we choose
ubuntu-16.04.1-desktop-amd64.iso
and put it in <curtinator root>
Use curtinator
- Go to the downloaded curtinator source
<curtinator root>
- In
<curtinator root>
, execute ./scripts/curtinator ubuntu-16.04.1-desktop-amd64.iso
- If everything works well, you will get a tarball
ubuntu-16.04.1-desktop-amd64.iso.tar.gz
in <curtinator root>
.
The console message looks like:
$ ./scripts/curtinator ubuntu-16.04.1-desktop-amd64.iso
Extracting ubuntu-16.04.1-desktop-amd64.iso to ubuntu-16.04.1-desktop-amd64
Creating ubuntu-16.04.1-desktop-amd64/casper/preseed.cfg
Patching ubuntu-16.04.1-desktop-amd64/casper/initrd.lz with ubuntu-16.04.1-desktop-amd64/casper/preseed.cfg
Creating ubuntu-16.04.1-desktop-amd64/root.qcow2
Creating ubuntu-16.04.1-desktop-amd64/libvirt.xml
Starting domain ubuntu-16.04.1-desktop-amd64
Domain ubuntu-16.04.1-desktop-amd64 defined from ubuntu-16.04.1-desktop-amd64/libvirt.xml
Domain ubuntu-16.04.1-desktop-amd64 started
Installing, run this command for progress:
# virt-viewer ubuntu-16.04.1-desktop-amd64
Compressing tarball
Finished ubuntu-16.04.1-desktop-amd64.iso.tar.gz
Please note the relative path is important when executing curtinator.
Upload the Customized Ubuntu 16.04.1 desktop image
scp ubuntu-16.04.1-desktop-amd64.iso.tar.gz <your MAAS server>
- On your MAAS server (mine is MAAS 2.1.3.x), execute
maas $YOUR_MAAS_PROFILE boot-resources create -d name=<YOUR_CUSOMIZED_ISO_NAME> architecture=amd64/generic filetype=tgz content@=<where your ubuntu-16.04.1-desktop-amd64.iso.tar.gz is>
.
In my case, it is
maas askubuntuprofile boot-resources create -d name=custome_desktop_16-04-01 architecture=amd64/generic filetype=tgz content@=/home/ubuntu/ubuntu-16.04.1-desktop-amd64.iso.tar.gz
YOUR_CUSOMIZED_ISO_NAME
is a label name that will show on your MAAS dashboard when you selects which image you want to deploy. In my case, it is custome_desktop_16-04-01
. You can see that there is a customized image which is syncing in the following MAAS dashboard screenshot.
Wait for few minutes until it is synced.
Now you can deploy this customized desktop image as usual. Select the tab Custom
and your customized desktop image name like this:
[a] https://launchpad.net/curtinator
[b] Too much detailed so I won't update the README ; )