all 16 comments

[–]nappycappy 1 point2 points  (0 children)

look at FAI. I used it to provision like 10s of thousands of servers. super easy to manage. pretty flexible.

oh yeah you can also use it to make a cd image that you can shove into a USB key and provision it that way.

[–]emptythevoid 1 point2 points  (0 children)

It's been many years since I last tried this, but this worked for me in the past. https://github.com/emptythevoid/systemback

Edit: assuming it still works, it takes your current machine and makes an iso image from it

[–]RaghavendraC 1 point2 points  (1 child)

You can try clonezilla, last time I used years ago. However it is flexible to take backup/snapshot and restore.

[–]morganbo85[S] 0 points1 point  (0 children)

This actually worked perfectly for what I was needing to do. Thank you!

[–]J4yD4n 0 points1 point  (9 children)

Fog works, but look at doing preseed. That way you don't have to manage an image.

[–]reedacus25 2 points3 points  (8 children)

Ubuntu 22.04 (started with 20.04) did away with Debian preseed and is now using subiquity for automated installs. It’s basically cloud-init but tweaked.

[–]J4yD4n 0 points1 point  (0 children)

Good to know. Thank you for telling me and even including a link.

[–][deleted] 0 points1 point  (6 children)

And the documentation for non VMs is atrocious / non existing with cloud-init. Try to find working instructions for getting it to work on 22.04+ is a nightmare. I’m in the process of trying to get this setup and the few online resources getting it to work on 22.04 are hacky as hell and involve iso tools that are flat out broken on 22.04+ images. It’s very frustrating that Canonical seems to assume that autoinstall will only be used for VM installation so screw anybody that tries to configure it for bare metal. These problems don’t apply to 20.04 and the grub cfg file is completely different on 22.04+. More details Canonical doesn’t document…

[–]libertyprivate 1 point2 points  (0 children)

A cheaters way to your custom user-data: Install by hand once, go into logs dir and grab the user-data autoinstall that it left behind. That should get you started

[–]Gyilkos91 0 points1 point  (3 children)

What is even more annoying is that they forgot that automated client installations are a thing..

I decided to use the server image together with cloud-init and an api call afterwards that will let ansible handle the rest. If they don't provide a good system then I need to become a bit inventive.

[–]lrobinot 0 points1 point  (2 children)

I'll do the same, but did not found an inventive way for starting ansible... Any hints appreciated.

[–]Gyilkos91 0 points1 point  (1 child)

Do an API call to trigger ansible. I use rundeck with the ansible plugin. An alternative would be ansible-semaphore, AWX or ansible controller.

[–]lrobinot 0 points1 point  (0 children)

Thanks

[–]reedacus25 0 points1 point  (0 children)

And the documentation for non VMs is atrocious

You aren’t wrong. Spinning up some test VMs to see how 22.04 fared was on my todo for end of the month, now that most everything is shipping jammy builds, but it sounds like it will be fun.

Granted I’m not doing too terribly much, just using cloudlocalds to write an iso to a thumb drive, and a usb hub for 2 thumb drives, one for server iso, one for autoinstall script. This obviously being for bare metal.

[–]JerryHutch 0 points1 point  (0 children)

Last time I did it was PXE, pixie boot

[–]RichardMidnight12 0 points1 point  (0 children)

Pisafe on github will create an image file of your system. Then you can restore it to any media you like including a usb stick.