/srv/irclogs.ubuntu.com/2024/08/29/#ubuntu-arm.txt

=== five61848033919 is now known as five6184803391
ikoniawaveform: as you've done work with pi-imager (and thank you for taking the time to work through my issues yesterday) I wonder if I could get your opinion on the best way to handle/manage images on a pi, I tend to re-image a few ubuntu pi's every few days as they are a great little test bed, however getting a vanilla ubuntu image, and applying even the bootstrap setup to get to the point where I can 09:01
ikoniadeploy config management can be tedious. You've just demonstrated issues with pi imager, I wonder is there a better way for me as user to build and maintain an image to allow me to deploy it and maintain it09:01
ikoniaeg: base users added already, puppet repo already setup, hostname already set up etc etc09:01
ikoniayour experience and opinion would be appreciated09:01
waveformikonia, no prob -- I'm probably not the best person to ask as my use-cases are quite weird. I rarely use rpi-imager myself as most of the time I'm testing daily images (which aren't listed in it), but I do maintain the snap and deb for it in ubuntu so I test it occasionally for those things10:40
waveformstill, the way I typically flash cards for my own use (or for testing) is using a script which simply dd's the image then does its own customization of the network-config and user-data files with a little python10:40
ikoniawaveform: so you modify the image directly rather than input / add files to trigger cloud-init for example10:41
waveformno, I edit the network-config and user-data on the boot partition after the image is written10:41
waveform(or rather the script does that for me)10:42
ikoniaahhhh10:42
ikoniathat kills my other question around how you there modifying the image post dd 10:42
waveformjust a mo, I'll dig out the script -- it's almost certainly overkill for most and I wouldn't necessarily recommend it, but the idea works well enough for me10:42
ikoniaexperience always appreciated10:42
waveformhttps://github.com/waveform80/dotfiles/blob/master/flashcard is the script I use for flashing the cards (it uses stuff from functions.bash in the same dir) and...10:43
ikoniathank you, I'll take a look 10:43
waveformhttps://github.com/waveform80/dotfiles/blob/master/customizecard is the script I use for generating the custom network-config and user-data -- this is almost certainly overkill for most and generally requires user-input from me (e.g. if I'm testing a 3A+ I don't want network-config to include eth0 because it doesn't exist, likewise a 2B doesn't have wifi, and so on)10:43
ikoniait's food for thought, I'll try to build something that works for me and is light and simple, I only really need to get a bootstrapped image, as once config management kicks in 3 minutes later it's setup10:44
waveformhowever, it does have useful stuff you may want, e.g. setting up an apt-cache proxy, installing avahi-daemon by default, importing SSH keys for my user, and so on10:45
waveformwith a bit of effort, cloud-init could certainly configure apt with your puppet source, install puppet from it, configure your user appropriately, pull in SSH keys, etc.10:45
ikoniawaveform: the info you shared to help me fix the image group adding made me look at just passing in a really really basic cloud-init stuff for hostname etc, and use a dd'd image with the source for things like puppet already added10:46
ikoniaI'm about to do a clean build to have a tinker10:46
waveformI did write a few blog posts on cloud-init ages ago -- I have a horrid feeling some of it's bit-rotted, but in case it's useful, the first four entries in April from https://waldorf.waveform.org.uk/2020/index.html may prove useful10:47
ikoniaI've used and I'm competent with cloud-init in funny enough, cloud environments, it's just a slightly different approach on the pi 10:48
waveformindeed! Most clouds don't have wifi for starters :)10:48
ikoniaI'd not really considered it seriously until yesterday 10:48
ikoniaAzure does.....it supports all pointless crap features :) 10:48
ikonia(I'm kidding of course) 10:48
waveformheh10:49
waveformoh, one thing to bear in mind (I added a warning about this in network-config): if you're doing network stuff in user-data (e.g. installing packages) you *must* mark at least one interface "optional: false" in network-config otherwise on some of the faster pi models cloud-init will start trying to download stuff before the network is configured and everything fails10:54
ikoniaacknowledged and noted10:56

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!