1

In my environment, I installed MAAS 2.0 on Ubuntu 16.04 (which is used to automatically deploy operating systems on other servers in my private network). To install MAAS, I used my local Ubuntu mirror.

The problem is, when I commission a server (which was previously enlisted using the MAAS GUI), the commissioning process will install some packages on the commissioning machine. When this happens, the commissioning machine contacts the Ubuntu archives on the internet, rather than my local mirror.

Two questions:

  1. Since everything is ready on the MAAS server when the PXE boot happens, shouldn't the boot image contain all the necessary packages? (Why does it need to connect the internet?)

  2. I used the default commissioning scripts, and did not upload any custom scripts to the "Commissioning scripts" using the MAAS GUI. If I need to commission a server without to connecting the internet, do I need to upload my own custom scripts to MAAS?

1 Answer 1

2

Why

MAAS needs access to an Ubuntu archive to install packages to complete commissioning and deployment. If you have a local mirror of the Ubuntu archive then you can configure MAAS to use that instead of "archive.ubuntu.com".

Configure

This is dependent of the version of MAAS. I will provide information on how to do this on 2.1.1 as this is the default version in Xenial.

WebUI

Visit "Settings" page in the main navigation at the top of the MAAS. Then in the second header click "Package Repositories". On that page in a default MAAS install you will see to repositories, "Ubuntu archive" and "Ubuntu extra architectures". You will most likely want to modify the "Ubuntu archive" if your only using i386 or amd64. Hover over the line and click the edit icon. From here you can modify the URL of the archive to point to your Ubuntu mirror. Do the same to the "Ubuntu extra architectures" if needed.

CLI

This can also be done with the CLI.

For "Ubuntu archive":

maas {session} package-repository update 1 url="http://{ip_or_hostname}/ubuntu"

For "Ubuntu extra architectures":

maas {session} package-repository update 2 url="http://{ip_or_hostname}/ubuntu"

6
  • Thank you for your reply, I mean that boot image can contain those packages which MAAS need when commissioning and deployment. Or Is it a special design in MAAS that can help user custom the boot image move conveniently. And the MAAS version is 2.0.0 (rc2+bzr5156).
    – Juken
    Commented Dec 8, 2016 at 6:00
  • 1
    The MAAS Ubuntu images are the same images that Canonical produces for all clouds and containers. This is done for a reason. No matter if your using a cloud, MAAS, LXD, or a downloaded cloud image that expected packages are always the same. Because of this MAAS needs to install packages to complete commissioning and deployment.
    – Blake R
    Commented Dec 8, 2016 at 7:57
  • So is the images which provided on MAAS official images.maas.io same as those which provided on Ubunto offical cloud-images.ubuntu.com? And MAAS do not modify the image by itself.
    – Juken
    Commented Dec 8, 2016 at 9:26
  • 1
    @Juken, I think the only major difference is the Linux kernel; the cloud images use a kernel appropriate for virtualization, while MAAS uses kernels appropriate for running on the latest-and-greatest hardware, hence the "metal" in "Metal as a Service" (MAAS).
    – mpontillo
    Commented Dec 8, 2016 at 10:08
  • @Mike thank you! I will try more tests on MAAS!
    – Juken
    Commented Dec 9, 2016 at 3:17

You must log in to answer this question.

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