I would like to modify the images that are included in MAAS so that I can install laptops and desktops with it instead of the normal cloud images.

share|improve this question
up vote 2 down vote accepted
+500

I'm by no means an expert on this but it appears that you can configure the preseed to add late_commands. For example, you can configure the preseed to install a package based on the hostname, and after the installation has been completed:

late_commands:
{{if node.hostname == 'node01'}}
    package_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "mysql"]
{{endif}}

Note the following:

Warning

Do not try to alter the preseed files if you don’t have a good understanding of what you are doing. Altering the installed version of Ubuntu can prevent MAAS from working as intended, and may have security and stability consequences.

Source: https://maas.ubuntu.com/docs/configure.html#altering-the-preseed-file

Further reading:

http://maas.io/docs/en/installconfig-images-mirror

http://maas.io/docs/en/manage-cli-images#select-images

share|improve this answer

Edit /var/lib/cobbler/snippets/mass_client_packages

Add whatever package you need in a the same format as a debian preseed file, here is the default:

d-i pkgsel/include string cloud-init openssh-server python-software-properties vim avahi-daemon server^

You can add packages you want in there, or you can then customise this to do something like the desktop instead:

d-i pkgsel/include string ubuntu-desktop

This will install your packages on all subsequent installations (previously provisioned machines will be unaffected).

share|improve this answer
    
Say I want to make my MAAS server a local package repository as well... is it possible to configure MAAS to use the local package repository when packages are installed on subsequent installations? – Bryan Aug 28 '12 at 15:41
1  
Also, is it possible to specify different sets of packages for different types of machines? Or is this getting into Juju territory? – Bryan Aug 28 '12 at 16:05
1  
I think cobbler is no longer being used. At least the mentioned path does not exist anymore. – hbogert Sep 30 '16 at 11:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.