2021-05-19 16:35:08 do i put the hostfwd in the netdev user or the device virtio side? 2021-05-19 16:35:25 it's an option to -netdev 2021-05-19 16:35:54 the virtio side is basically just rigging up hardware devices in the device model and netdev is doing the logical work 2021-05-19 16:39:30 qemu-system-x86_64: -netdev user,hostfwd=::5555-:22=on,id=net0: Invalid host forwarding rule '::5555-:22=on' (Bad guest port) 2021-05-19 16:39:55 no =on 2021-05-19 16:40:04 drop =on 2021-05-19 16:40:05 it is just hostfwd=::5555-:22 2021-05-19 16:41:49 ah 2021-05-19 16:41:57 now to get the seed ISO into this image 2021-05-19 16:43:14 I typically just mount the cd image to qemu, in theory you could use qemu-nbd to mount the raw block device and just build it outside the VM too 2021-05-19 16:43:25 I find the former approach somewhat easier 2021-05-19 16:51:15 yeah 2021-05-19 16:51:21 omg 2021-05-19 16:51:23 i have a shell 2021-05-19 16:51:25 :D 2021-05-19 16:51:27 thanks mcrute and Ariadne 2021-05-19 16:51:38 yay! 2021-05-19 16:51:38 np 2021-05-19 16:52:08 Xe: although you've definitely made me think that I can do the whole qemu image building just using qemu-nbd, so thank you :-D 2021-05-19 16:52:34 i'm always happy to give people bad ideas 2021-05-23 14:59:06 I've been told to ask here as well. What is the status of 'alpine-lift', looks like a nice cloud-init alternative? 2021-05-23 14:59:46 https://github.com/bjwschaap/alpine-lift 2021-05-23 14:59:54 seems like something from someone in the community 2021-05-23 15:00:23 ah, it's not an official project? thanks :) 2021-05-23 15:00:53 no, it's not 2021-05-23 15:30:22 yes, afaik we are focusing on actual cloud-init 2021-05-23 15:47:55 Ah, shame ^^ cloud-init feels a bit too heavy for my tastes; especially dependencies 2021-05-23 16:28:14 Darksecond: I've pared back the cloud-init deps as much as I can 2021-05-23 16:33:07 oh it's not a complaint or a blame, I understand cloud-init is all python and fairly extensive in it's features, it's bound to have a few dependencies :) I think you all are doing great work <# 2021-05-23 16:33:11 *<3 2021-05-23 16:34:09 none of the cloud-init alternative have the same feature set - with features come deps 2021-05-23 16:35:51 yeah, I know. _I_ don't need nearly as many features though (I need like, 3 :D). so might write something myself or add NoCloud drive support to lift, either way it's closer to what I want :) 2021-05-23 16:37:10 which 3 features would those be? 2021-05-23 16:38:01 I need hostname setting, user creation (including ssh keys) and optionally package update/upgrade/install 2021-05-23 16:38:47 and I want to grow my rootfs when booting, but that's a simple openrc script and resize2fs (since I don't use partitions, it's a bare ext4 image) :) 2021-05-23 16:41:54 what about network config? or just assuming simple DHCP? 2021-05-23 16:42:17 yup, network config is built into my image (made using alpine-make-vm-image) 2021-05-23 16:42:43 all I _really_ need is hostname setting, since that is one of the few things I can't just hardcode :) 2021-05-23 16:43:06 (I love alpine-make-vm-image by the way, it's simple and works great!) 2021-05-23 16:45:12 I would point you to my own disk image creation script but I'm behind schedule getting version 0.1 out the door :-( 2021-05-23 16:45:50 ^^ 2021-05-23 16:51:10 re: hostname, can you get it from DHCP? 2021-05-23 16:51:48 not that I know of, don't think unifi supports that 2021-05-23 16:52:16 I'm probably just gonna write a small (rust) cloud-init replacement for my needs :) 2021-05-23 16:52:20 should be simple enough 2021-05-23 16:55:22 yeah for a small set of functionality its simple. Would be nice to see a more comprehensive cloud-init clone in C/Golang/Rust but noone has tried that so far... 2021-05-23 16:55:42 yeah, for sure 2021-05-23 16:56:13 its the breadth of modules and DataSources that make cloud-init interesting... 2021-05-23 16:57:32 for a general purpose cloud container I fully agree, although I still would like something not python :D (and some of the depencies feel weird to me, (e)udev, really?) 2021-05-23 17:00:17 the reason for eudev is that cc_disk_setup and network config stuff both rely on udev 2021-05-23 17:00:45 I looked and its potentially possible to modify them to remove the udev dep but I haven't had the time to do so (yet) 2021-05-23 17:02:15 also if I did so and upstreamed the patches then I'd probably be on the hook to keep the mdev support working (as upstream changes could break mdev support at any time) in upstream going forward... 2021-05-23 17:06:04 don't worry about it :) 2021-05-23 17:07:01 Its on my list of things I would like to change/upstream. I've been slowly reducing the cloud-init deps over time. 2021-05-23 17:08:45 you can never get rid of all dependencies I don't like, python itself for example, or sudo, I use doas :) 2021-05-23 17:09:29 well again, if doas support was added to upstream cloud-init then sudo could be removed as a dep 2021-05-23 17:10:11 from a 10sec look at doas it didn't seem to have the same set of functionality as sudo though 2021-05-23 17:10:43 for sure, doas is a lot simpler 2021-05-23 17:13:02 I need to figure out how to use libblkid, so I can find the 'cidata' disks to mount :) 2021-05-23 17:18:25 cloud-init just calls blkid 2021-05-23 17:18:52 I know, I just want to use libblkid directly :D 2021-05-23 17:18:57 using (from memory) "-t iso9660" and "-t vfat" 2021-05-23 17:19:36 is blkid in the default install? 2021-05-23 17:23:21 alpine base dep you mean? think not, lemme check 2021-05-23 17:23:57 nope its not, that's why I added it as a dep for cloud-init 2021-05-23 17:23:58 although blkid itself is really lightweight, so I don't mind picking it up as a dep. 2021-05-23 17:24:48 Busybox does have a blkid version but (from memory) it didn't support all the options that cloud-init was using 2021-05-23 17:25:22 actually, looking at Busybox docs, their blkid takes no options at all 2021-05-23 17:27:45 as long as it gives label and/or fatlabel (and device) that's all I need =D 2021-05-23 17:28:54 actually it takes 1 optional param, partition device. It displays LABEL, UUID, and TYPE 2021-05-23 17:29:14 ah, then I need the 'proper' blkid at least 2021-05-23 17:29:40 but doesn't let you specify filters 2021-05-23 17:29:56 I can filter in rust itself, that's easy 2021-05-23 17:30:26 that's why I added the blkid dep as cloud-init does blkid -tTYPE=fat -tLABEL=cidata 2021-05-23 17:31:49 again at some point I might write an Alpine patch or submit an upstream patch to let Busybox blkid work (i.e. "blkid | grep TYPE=\"vfat\"" ) 2021-05-23 17:34:50 upstream patch prefered :) 2021-05-23 17:36:09 ikke: yupe, for cloud-init I always do so 2021-05-23 17:40:53 Darksecond: BTW some of the deps listed for cloud-init are already installed on a base alpine system (i.e. busybox and ifupdown-ng) which makes the deps list look larger than it really is 2021-05-23 17:46:41 . o O (I wonder if I could instead run a simple http server that just returns the hostname and ssh keys to trust and curl those in a simple bash script, like a poor-mans EC2 thing) 2021-05-23 17:46:49 thanks minimal for the help and chat :D 2021-05-23 17:47:50 no worries, you got me thinking of ways to reduce the cloud-init deps more which is always a good thing :-) 2021-05-23 17:50:26 fits your name :P 2021-05-23 17:51:09 ikke: that was the idea ;-) 2021-05-23 20:20:19 Darksecond: i've actually been speccing out something like that using nocloud's http backend 2021-05-23 20:21:09 Xe: the "seed" config? 2021-05-23 20:21:18 yeah 2021-05-23 20:21:24 instead of ISO images 2021-05-23 20:22:27 yeah, I've intended to use that in conjunction with the cc_phone_home module to implement a sort of CMDB infra 2021-05-23 20:23:06 i'm gonna go prototype something i think 2021-05-23 20:24:36 I contract at a "large enterprise" company that used that as part of automation for their public bare metal "cloud" 2021-05-23 20:24:44 s/contract/contracted/ 2021-05-23 20:27:03 ugh all the parts of my homelab are here save the CPUs 2021-05-23 20:27:49 just use virtual cpus ;-) 2021-05-23 20:28:08 i'm confused 2021-05-23 20:28:08 ACTION goes to downloadmorecores.com 2021-05-23 20:28:15 how does minimal see things that happened before he joined 2021-05-23 20:28:25 Ariadne: matrix has him 2021-05-23 20:28:39 but there are no other matrix users in here i dont think 2021-05-23 20:29:17 Ariadne: I'm a time traveller :-) 2021-05-23 20:29:36 i like that explanation better 2021-05-23 20:40:25 Xe: interesting! 2021-05-24 01:15:38 Xe: FYI https://opensource.com/article/20/5/create-simple-cloud-init-service-your-homelab 2021-05-24 01:16:05 example of using seed config with Nginx 2021-05-24 01:16:33 yeah 2021-05-24 16:43:25 Darksecond: just catching up... https://github.com/mcrute/tiny-ec2-bootstrap sounds like what you're lookingr for. that's what the current AMIs use. hostnames and package upgrades would have to be done with a shell script in user data though 2021-05-24 16:44:30 I'll have a look, thanks! 2021-05-30 20:24:38 minimal: https://github.com/Xe/waifud/blob/main/cmd/waifud-metadatad/main.go i implemented that wireguard thing i was talking about