/srv/irclogs.ubuntu.com/2023/11/29/#cloud-init.txt

Code_BleuAnyone here familiar with getting cloud-init to work on OpenBSD?  I keep having issues running the build-on-openbsd. 16:43
Code_Bleu:(17:54
meenaCode_Bleu: hi19:24
meenaI'm working on getting better BSD support19:24
meenaprimarily FreeBSD, since it's FreeBSD Foundation sponsored, but I'm trying to lift all the BSDs19:25
Code_Bleumeena: 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 :(19:58
meenaCode_Bleu: can you pastebin where each is failing?20:00
meenai need to get a fresh OpenBSD vm installed… after kiddo is asleep 20:01
meenaCode_Bleu: you can also check out Goneri's VM images and build scripts20:02
Code_Bleumeena: 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:04
Code_Bleumeena: 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/4BP89Q5UP20:05
Code_Bleuhttp://dpaste.com/4BP89Q5UP20:06
Code_Bleumeena: 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-images20:09
Code_Bleumeena: 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/44JAJCKYC20:31
Code_Bleumeena: 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 it20:44
Code_Bleuinstalled!!. 20:44
Code_Bleumeena: 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:46
meenađź‘Ť 20:59
meenaCode_Bleu: it would be nice if someone made a port 20:59
Code_Bleumeena: 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:34
meenaCode_Bleu: I think that's what Goneri does. On FreeBSD, we have rc scripts21:56
meenaWould be nice to port them to OpenBSD (i reckon the existing NetBSD scripts might be closer to what you have on OpenBSD)21:58
holmanbhi @Code_Bleu22:16
holmanb@Code_Bleu: fyi it's more than just a `cloud-init init` that needs to happen22:17
holmanb@Code_Bleu: there are multiple stages - there are five different stages run during boot22:20
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
holmanbfor more details: https://cloudinit.readthedocs.io/en/latest/explanation/boot.html22:29
holmanbCode_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 methods22:33
holmanbCode_Bleu: the generator: https://github.com/canonical/cloud-init/blob/main/systemd/cloud-init-generator.tmpl22:33
holmanbCode_Bleu: the disablement methods: https://cloudinit.readthedocs.io/en/latest/howto/disable_cloud_init.html22:34
holmanbCode_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:35
Code_Bleuholmanb: 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:45
holmanbCode_Bleu: sounds like you might want to start with one of Goneri's images?22:46
Code_Bleuholmanb: 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_Bleuholmanb: my prefernce would be to be able to install OpenBSD 7.4 and get cloud-init to work :) 22:48
meenaCode_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 cloudstack22:49
Code_BleuI only found the website..and a github for his website...but didn't find any scripts that I remember.22:50
Code_Bleuholmanb: this is what im currently using to create image locally - https://github.com/sarnowski/openbsd-cloud-images22:50
Code_Bleumeena: you have a link to Goneri scripts you're talking about?22:51
meenagimme a sec22:51
holmanbCode_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:51
holmanbCode_Bleu: I'd follow meena's advice22:52
Code_Bleuholmanb: 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/sysvinit22:52
meenaholmanb: that's how i learned all about Linux and Solaris :O22:52
meenaIn  my first year at work.22:52
Code_BleuI like learning..so..22:53
meenanow, 322093 years later…22:53
holmanbCode_Bleu:  good luck :-) let us know what bugs you shake out of cloud-init22:53
Code_BleuI've built LFS and run Gentoo personally..so  :) 22:53
holmanbCode_Bleu: same on the LFS and Gentoo -> great learning experiences22:53
meenaCode_Bleu: here's the scripts Goneri uses to build his images: https://github.com/goneri/pcib22:54
meenaCode_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/Makefile22:57
meenaPretty sure it won't work on CloudStack.22:57
meenain 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-devel22:57
Code_Bleumeena: 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:58
meenaAs 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 FreeBSD22:59
meenaThe ones in FreeBSD are pretty well fleshed out tho, as far as functionality goes22:59
Code_Bleumeena: 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.22:59
Code_Bleuapparently 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
meenaWell, 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 :P23:00
meenaMaybe we should specify FreeBSD (and DragonFly), with some solid foundations for NetBSD and OpenBSD23:01
Code_Bleuyeh. makes sense.23:01
meenaI had a branch somewhere lying around where I actually started working on OpenBSD rc scripts, lemme see what I got there (if anything)23:02
meenayeah, that doesn't look useful. just a copy23:03
* meena joins #OpenBSD again23:04
Code_Bleuhttps://cloudinit.readthedocs.io/en/latest/reference/distros.html23:04

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