=== five61848033919 is now known as five6184803391 | ||
ikonia | waveform: 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 |
---|---|---|
ikonia | deploy 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 it | 09:01 |
ikonia | eg: base users added already, puppet repo already setup, hostname already set up etc etc | 09:01 |
ikonia | your experience and opinion would be appreciated | 09:01 |
waveform | ikonia, 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 things | 10:40 |
waveform | still, 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 python | 10:40 |
ikonia | waveform: so you modify the image directly rather than input / add files to trigger cloud-init for example | 10:41 |
waveform | no, I edit the network-config and user-data on the boot partition after the image is written | 10:41 |
waveform | (or rather the script does that for me) | 10:42 |
ikonia | ahhhh | 10:42 |
ikonia | that kills my other question around how you there modifying the image post dd | 10:42 |
waveform | just 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 me | 10:42 |
ikonia | experience always appreciated | 10:42 |
waveform | https://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 |
ikonia | thank you, I'll take a look | 10:43 |
waveform | https://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 |
ikonia | it'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 setup | 10:44 |
waveform | however, 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 on | 10:45 |
waveform | with 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 |
ikonia | waveform: 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 added | 10:46 |
ikonia | I'm about to do a clean build to have a tinker | 10:46 |
waveform | I 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 useful | 10:47 |
ikonia | I'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 |
waveform | indeed! Most clouds don't have wifi for starters :) | 10:48 |
ikonia | I'd not really considered it seriously until yesterday | 10:48 |
ikonia | Azure does.....it supports all pointless crap features :) | 10:48 |
ikonia | (I'm kidding of course) | 10:48 |
waveform | heh | 10:49 |
waveform | oh, 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 fails | 10:54 |
ikonia | acknowledged and noted | 10:56 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!