1

Would it be possible to deploy desktop images to my office workstations from MAAS?

I would like to see a scenario in which the workstations have a graphical shell and some PXE boot KVM instances ready to be deployed. I understand there is a possibility that one experiences severe performance penalties for some processes like maybe the GUI itself, but that's not of interest to me at the moment.

I can imagine a few paths to go about and give you an impression:

  • Create a custom deployment image. And deploy it to a cluster.
  • Add some extra details to the commissioning/deploy script.
  • Create a juju charm that contains a desktop and assign it to each machine within the maas zone.

But these are just ideas. How would I go about it?

1

2 Answers 2

4

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

  1. I tested these steps on my Ubuntu Xenial 16.04.1 Desktop system.
  2. sudo apt-get install qemu-kvm libvirt-bin virt-viewer genisoimage
  3. Reboot the system after you have installed the above packages.
  4. 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>
  5. 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

  1. Go to the downloaded curtinator source <curtinator root>
  2. In <curtinator root>, execute ./scripts/curtinator ubuntu-16.04.1-desktop-amd64.iso
  3. 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

  1. scp ubuntu-16.04.1-desktop-amd64.iso.tar.gz <your MAAS server>
  2. 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.

Syncing to rack controllers

Wait for few minutes until it is synced.

enter image description here

Now you can deploy this customized desktop image as usual. Select the tab Custom and your customized desktop image name like this:

enter image description here


[a] https://launchpad.net/curtinator

[b] Too much detailed so I won't update the README ; )

1
  • amazing! really helpful
    – yuhow5566
    Mar 27, 2019 at 12:58
2

two ways - you could create an image for mass that has desktop, or, in your charm, in your install hook, you include

sudo apt-get install <desktoppackagename>

Where

sudo aptitude install --no-install-recommends ubuntu-desktop

Personally, I think the charm is the easiest way. Help received from this answer: How to install GUI desktop on a server?

1
  • I agree. However, I wasn't sure it would be possible, since the normal screen of a juju booted machine shows a continues text screen from cloud-init. I will dive into the charm tools to create such a charm and see if it will work. Thanks for you input.
    – Joham
    Jul 28, 2015 at 14:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .