Set up MAAS for the first time


#1

Hi, I was recently introduced to MAAS so I’m a bit confused about the best way to use it.
I have a task to do to my master thesis that required to make management and maintenance of 24 apu2c faster and flexible.
We want to build a testbed with these nodes, for this purpose I have to use MAAS to manage them.
First I installed both rack and region controller on a VirtualBox Ubuntu Server 18.04LTS on my computer in order to do a proof of concept.
But I’m having trouble finding the node that I’m testing with.
I want to know if someone could help me and sorry if I’m not very clear but it’s my first time in these forums.


#2

I’m just commenting because I think what you’re doing is interesting.

By apu2c are you referring to these: https://pcengines.ch/apu2c4.htm?

That looks wicked cool.
Virtual Box is exactly how I started playing with MAAS.

  • Have you checked that your MAAS controllers PXE interface is bridged to the physical network that the node is plugged into.
  • Have you configured your subnets and enabled DHCP on the rack controller?
  • Can your verify that when the node boots it’s first boot device is a PXE capable network card and that there’s no operating system on the primary hard drive

… I’m guessing this isn’t an x86 chipset?


#6

Hi, first of all, thanks for replying @dvnt.
Yes, it’s PC Engines apu2c I’m referring to.

Yes, I think I set up it well:


#7

Node ifconfig and MAAS subnets.

I have DHCP enabled for the “fabric-0” 10.0.2.0/24 network


#8

The node first boot is a PXE capable network but is has indeed on the Hard Disk a ubuntu server 18.04.

And after that it boots from the hard disk.
Sorry for this messy reply.


#9

I’m wondering if using MAAS is going to be a non starter.
Those boards have an embedded G series AMD CPU with an architecture of puma?¿?.. Not really sure what these chips are :thinking:

From what I can see, available/supported architectures in MAAS are
amd64, arm64, armhf, i386, ppc64el, s390x.

Maybe someone else can weigh in?


#10

The APU2 has an x86 compatible CPU and it can run amd64 and i386 software. In fact it can run VMware ESXi. I happen to have Ubuntu 18.04.1 running MAAS on an APU2 right now.

Unfortunately, what I can’t work out is how to make the APU2 work as a MAAS managed host. When the APU2 runs pxelinux.0 it seems to lock up as soon as it starts to download the kernel via HTTP. I can see TCP retransmissions going to the APU2, but no acknowledgements come back.

On top of that, you aren’t even getting that far. I have had a problem in the past where I couldn’t get certain types of network traffic into a VirtualBox guest. I can’t remember the exact details but I strongly suspect that I was trying to do exactly what you are doing now. I was running VirtualBox on my Mac and the network traffic was clearly being filtered even though I was using a bridged connection. I expect that the DHCP packets from the APU are not being forwarded to the MAAS virtual machine.

Cheers,
Lloyd


#11

X86 compatible that’s cool :metal: @lloyd

All I hear now is challenge accepted :grin:

@jbacelo have you flashed the bios firmware on there? There’s a note about a fix they did on IPXE


#12

I managed to get my APU2 deployed via MAAS by manually hacking my tftp config every time I booted the APU2 so that the kernel and initrd were downloaded via tftp instead of http. This was 100% manual and only possible because I don’t use the MAAS DHCP.

I had already tried flashing my BIOS to the latest mainline version with no luck.

It may be possible to “adjust” some of the templates to turn off the use of HTTP. This won’t be useful to most people, but if you are only managing APU2s, it won’t matter.

Cheers


#13

Well, that seems to work fine.

In /usr/lib/python3/dist-packages/provisioningserver/templates/pxe there are a whole pile of templates that are used to build the PXE configs that are used for enlistment, commissioning and installation.

I edited config.commissioning.template to read

DEFAULT execute

LABEL execute
  SAY Booting under MAAS direction...
  SAY {{kernel_params() | kernel_command}}
  #KERNEL {{kernel_params | fs_host}}{{kernel_params | kernel_path }}
  KERNEL {{kernel_params | kernel_path }}
  #INITRD {{kernel_params | fs_host}}{{kernel_params | initrd_path }}
  INITRD {{kernel_params | initrd_path }}
  APPEND {{kernel_params | kernel_command}}
  IPAPPEND 2

i.e. I removed the text {{kernel_params | fs_host}} and it all worked just fine.

Similar changes are needed in config.enlist.template and config.xinstall.template as far as I can tell.

You will also need to restart the rackd services with the command systemctl restart maas-rackd for these file changes to be noticed.

Cheers,
Lloyd


#14

I just used Wireshark to see how is the booting process going on, this what I got:

  • I guess MAAS is working fine because I can see that it is sending Discovery packages to the network.
  • When I boot the APU via PXE I can see that it is sending a Discovery package as well but it has no reply by the MAAS machine…

On the other hand, the MAAS is listing the APU (after its Linux boot), on the “Network discovery”.

@lloyd I searched for the files that you stated and I found that they have not the {{kernel_params | fs_host}} text anywhere.


#15

I am running MAAS 2.6.1 RC1. I should have mentioned that.


#16

It looks like your MAAS is old enough that it uses TFTP instead of HTTP, so you won’t have the problem that I did. You still have the problem that VirtualBox doesn’t deliver enough networking though. Maybe you could try running MAAS on one of the lab APUs, at least for a quick test.


#17

I’m using MAAS version: 2.4.2.
Ok it’s a good idea actually, I will try with another APU and if it works.

Thanks @lloyd


#18

I’m wondering if I will be able to use MAAS to perform the job cause I think these APUs can’t be managed by BMC.


#19

These APUs have no management processors, so you would normally have to power cycle them manually. There are many external power management devices supported by MAAS and you could use one of them if you didn’t want to manually power cycle the APUs. I have a Digital Loggers, Inc. PDU and sometime or other I will get around to making the cable I need to power my APU from it.


#20

Sorry for the late reply.
So, I started again from scratch using Virtual Machine Manager instead of Virtualbox and I end up solving the problem.
I don’t now why Virtualbox didn’t allow the VM to talk and reply to the DHCP request coming from the APU.
Now it is working, I was able to commission the APU and I’m trying to deploy a custom image.

I thought it was a good idea to deploy CirrOS or TinyCore to test if everything is well.
I will open another question about this theme.

Thanks, @lloyd, and @dvnt for your answers.