[16:43] <Code_Bleu> Anyone here familiar with getting cloud-init to work on OpenBSD?  I keep having issues running the build-on-openbsd. 
[17:54] <Code_Bleu> :(
[19:24] <meena> Code_Bleu: hi
[19:24] <meena> I'm working on getting better BSD support
[19:25] <meena> primarily FreeBSD, since it's FreeBSD Foundation sponsored, but I'm trying to lift all the BSDs
[19:58] <Code_Bleu> meena: Hey there! Is this something you can help me with getting cloud-init installed on OpenBDS 7.4?  The build-on-openbsd script doesn't seem to work for me.  I've been trying several different combonations of cloud-init versions, python version, installing of python packages...etc.  Each one gets me so far, but then breaks :(
[20:00] <meena> Code_Bleu: can you pastebin where each is failing?
[20:01] <meena> i need to get a fresh OpenBSD vm installed… after kiddo is asleep 
[20:02] <meena> Code_Bleu: you can also check out Goneri's VM images and build scripts
[20:04] <Code_Bleu> meena: let me work on getting back to square one of getting minmal OpenBSD installed and the attempt to run the build from the cloud-init repo and I'll let you know.
[20:05] <Code_Bleu> meena: currently I was trying to install the needed python dependencies via pip instead of py3-xxxx in the script dependencies...but am having this issue with one of the packages it tries to install. - dpaste.com/4BP89Q5UP
[20:06] <Code_Bleu> http://dpaste.com/4BP89Q5UP
[20:09] <Code_Bleu> meena: FYI - I've been using this to create/spin up images ( minus Vagrant... im running the Make file directly on my Linux box that has the software already on it to spin up the qemu instances.) - https://github.com/sarnowski/openbsd-cloud-images
[20:31] <Code_Bleu> meena: Here is what I get with a basic install of OpenBSD minimal, clone the cloud-init repo and run the 'build-on-openbsd' script. - https://dpaste.com/44JAJCKYC
[20:44] <Code_Bleu> meena: well, I can't believe it...I was able to finally get it to install.  After looking at the error more ( up further ), it was erroring out on the python netifaces part.  I searched in the files locally for 'netifaces' and notices that the build-on-netbsd had a py3-netifaces as a dependency, but the build-on-openbsd did not. I added the py3-netifaces to that list and re-ran and it
[20:44] <Code_Bleu> installed!!. 
[20:46] <Code_Bleu> meena: if this is part of your clean up for BSD, it would be nice if there was consistency on how those scripts work between BSDs.  OpenBSD one doesn't detect python version running, but others do. Maybe it doesn't matter, but would be nice to have support to detect Python version and install things needed based on that.
[20:59] <meena> 👍 
[20:59] <meena> Code_Bleu: it would be nice if someone made a port 
[21:34] <Code_Bleu> meena: how on BSD do i get cloud-init to run on first boot now?  I don't see a service.  Would i have to manually put something in /etc/rc.firsttime to do the 'cloud-init init' ?
[21:56] <meena> Code_Bleu: I think that's what Goneri does. On FreeBSD, we have rc scripts
[21:58] <meena> Would be nice to port them to OpenBSD (i reckon the existing NetBSD scripts might be closer to what you have on OpenBSD)
[22:16] <holmanb> hi @Code_Bleu
[22:17] <holmanb> @Code_Bleu: fyi it's more than just a `cloud-init init` that needs to happen
[22:20] <holmanb> @Code_Bleu: there are multiple stages - there are five different stages run during boot
[22:29] <holmanb> @Code_Bleu: the order that these are run is `ds-identify`, `cloud-init init --local`, `cloud-init init`, `cloud-init modules --mode=config`, `cloud-init modules --mode=final`
[22:29] <holmanb> for more details: https://cloudinit.readthedocs.io/en/latest/explanation/boot.html
[22:33] <holmanb> Code_Bleu: and some glue code is probably needed -> ds-identify is expected to identify which "cloud" the instance is running on. If no cloud is detected, cloud-init is expected to be disabled (this is the glue code I mentioned, on systemd this happens in a systemd-generator). Also this glue code should honor the cloud-init disablement methods
[22:33] <holmanb> Code_Bleu: the generator: https://github.com/canonical/cloud-init/blob/main/systemd/cloud-init-generator.tmpl
[22:34] <holmanb> Code_Bleu: the disablement methods: https://cloudinit.readthedocs.io/en/latest/howto/disable_cloud_init.html
[22:35] <holmanb> Code_Bleu: but if you get that ported to OpenBSD, happy to add the service scripts to upstream (here, I assume -> https://github.com/canonical/cloud-init/tree/main/sysvinit)
[22:45] <Code_Bleu> holmanb: thanks for info. That's a lot to digest.  I'm a total n00b for BSD, and have basic understanding of cloud-init on linux systems...so what should I do to make it to where cloud-init on OpenBSD will do what it needs to do at boot up?  I need to create an OpenBSD image to use on Cloudstack.
[22:46] <holmanb> Code_Bleu: sounds like you might want to start with one of Goneri's images?
[22:48] <Code_Bleu> holmanb: I did, and it never got me to a login screen in console.  Also, the latest version i see is 7.3 and I'm trying to install 7.4.  With installing this manually in QEMU I discovered the issue with not showing login screen in console of Cloudstack had to do with "switch to com0" set to "yes".  I had to set to "no" in my image and then it would work.
[22:48] <Code_Bleu> holmanb: my prefernce would be to be able to install OpenBSD 7.4 and get cloud-init to work :) 
[22:49] <meena> Code_Bleu: Goneri has scripts for building images, so do take a look at those. You might be able to use them to build 7.4 image for cloudstack
[22:50] <Code_Bleu> I only found the website..and a github for his website...but didn't find any scripts that I remember.
[22:50] <Code_Bleu> holmanb: this is what im currently using to create image locally - https://github.com/sarnowski/openbsd-cloud-images
[22:51] <Code_Bleu> meena: you have a link to Goneri scripts you're talking about?
[22:51] <meena> gimme a sec
[22:51] <holmanb> Code_Bleu: Build from source on a not-so-frequently used OS that you're also not super familiar with sounds like an..... opportunity to learn lots ;)
[22:52] <holmanb> Code_Bleu: I'd follow meena's advice
[22:52] <Code_Bleu> holmanb: meena: yeh, this is def missing the OpenBSD :) I would assume to say cloud-init supports BSD now...it should prob have openbsd in there, right? - https://github.com/canonical/cloud-init/tree/main/sysvinit
[22:52] <meena> holmanb: that's how i learned all about Linux and Solaris :O
[22:52] <meena> In  my first year at work.
[22:53] <Code_Bleu> I like learning..so..
[22:53] <meena> now, 322093 years later…
[22:53] <holmanb> Code_Bleu:  good luck :-) let us know what bugs you shake out of cloud-init
[22:53] <Code_Bleu> I've built LFS and run Gentoo personally..so  :) 
[22:53] <holmanb> Code_Bleu: same on the LFS and Gentoo -> great learning experiences
[22:54] <meena> Code_Bleu: here's the scripts Goneri uses to build his images: https://github.com/goneri/pcib
[22:57] <meena> Code_Bleu: if you're not in #OpenBSD, you should be. Ask someone to (help you) create a cloud-init net port. They only have this thing, which isn't fully fledged: https://github.com/openbsd/ports/blob/master/sysutils/cloud-agent/Makefile
[22:57] <meena> Pretty sure it won't work on CloudStack.
[22:57] <meena> in FreeBSD we have https://github.com/freebsd/freebsd-ports/tree/main/net/cloud-init and https://github.com/freebsd/freebsd-ports/tree/main/net/cloud-init-devel
[22:58] <Code_Bleu> meena: Yeh, I started in #openbsd.  Been talking in there for past few days....but just posted in there to see if anyone can help with the cloud-init service file stuff.
[22:59] <meena> As I mentioned earlier, I believe that the NetBSD rc scripts we have are probably closer to OpenBSD's rc script style than what we have in FreeBSD
[22:59] <meena> The ones in FreeBSD are pretty well fleshed out tho, as far as functionality goes
[22:59] <Code_Bleu> meena: i remember that Goneri repo now.. I remember it was old and saw old examples of openbsd..and when i read on cloud-init site that BSD is supported natively now...I went that path.
[23:00] <Code_Bleu> apparently BSD in cloud-init isn't fully baked either?  Is there a main contributor/maintainer that originally created the BSD stuff that is currently out there?
[23:00] <meena> Well, I think BSD is overselling it. That's like saying, Linux works, and expecting everything from Alpine to Debian to Gentoo to CoreOS to Android to just work :P
[23:01] <meena> Maybe we should specify FreeBSD (and DragonFly), with some solid foundations for NetBSD and OpenBSD
[23:01] <Code_Bleu> yeh. makes sense.
[23:02] <meena> I had a branch somewhere lying around where I actually started working on OpenBSD rc scripts, lemme see what I got there (if anything)
[23:03] <meena> yeah, that doesn't look useful. just a copy
[23:04]  * meena joins #OpenBSD again
[23:04] <Code_Bleu> https://cloudinit.readthedocs.io/en/latest/reference/distros.html