Is it possible to configure repositories directly for an image? For example, for an Ubuntu 24 image, I’d like to use only repository A, for an Ubuntu 22 image, I’d like to use repository B and for a custom RHEL image, I’d like to use repository C. It would also be great to be able to remove the default repository.
Hi @nemecfi
This is not supported by MAAS. The package repositories are added to all machines and the release is set by the cloud-init alias $RELEASE. There is no mechanism to select specific package repositories for specific images or machines.
The flow is: MAAS Package repositories → Curtin preseed → cloud-init
Links:
- MAAS logic: maas/src/maasserver/compose_preseed.py at master · canonical/maas · GitHub
- Curtin docs: https://curtin.readthedocs.io/en/latest/topics/apt_source.html
- Curtin examples: curtin/examples/apt-source.yaml at master · canonical/curtin · GitHub
- cloud-init examples: https://cloudinit.readthedocs.io/en/latest/reference/examples.html (line 51 of the example)
Thank you for your response.
Is there any plan for the future to allow setting a custom repository for a specific Ubuntu version, or at least to remove the default one?
Also, how is this handled for RHEL? Thank you.
Can I somehow define a specific preseed for Ubuntu 22 or Ubuntu 24 and put my own repository there? I can’t afford to give them all repositories or ubuntu.archive