/srv/irclogs.ubuntu.com/2020/09/28/#cloud-init.txt

=== hjensas_ is now known as hjensas
JohnDohhHi all10:23
JohnDohhi m totally new in cloud init10:24
JohnDohhis it possible in cloud-config file to have both autoinstall section and user-data section ?10:25
JohnDohhwhen i supply user-data section i got a jsonschema.exceptions.ValidationError10:26
JohnDohhbut when i test it with "cloud-init devel schema --config-file myfile" it is valid cloud-config file10:27
JohnDohhi am a bit lost10:27
meenaJohnDohh: is your user-data a template?10:38
JohnDohhyes10:39
meenaJohnDohh: so the template is valid, but what it generates isn't?10:39
JohnDohhexactly10:40
JohnDohhwhen i use only few settings as identity in autoinstall section it work well10:40
meenaJohnDohh: when you retrieve the file from the server in question, how does it look there?10:42
JohnDohhwith only identity datas in autoinstall section ?10:43
meenaJohnDohh: well, so, cloud-init query should retrieve it from the metadata service (and fail?)10:46
meenaJohnDohh: but it might be persisted as file somewhere in /var/lib/cloud-init10:47
meenaor was it /var/run?10:47
JohnDohhok let me look at it10:47
JohnDohhmeena: i got files both in /var/run/cloud-init/ and /var/lib/cloud-init/10:59
meenaJohnDohh: is any of them user-data.txt(i) ?10:59
JohnDohhmeena: no10:59
meenawell that's suspicious / sad10:59
meenai would've hoped for: yes this is broken, but here's what it actually is: 0xBAD11:00
JohnDohhmy user-data file is actually sourced on cdrom/autoinstall/ dir11:01
JohnDohhsome parts are read by the installation process because i can log in with the user provided in identity11:02
skdHi, I wonder what is the status of LVM support in cloud-init? Can't find any mention of it.11:37
JohnDohhmeena: btw, thanks for your help/time11:46
JohnDohhi m trying to bypass some blocking parts11:47
meenaskd: define LVM support12:06
=== vrubiolo1 is now known as vrubiolo
Krikkeis it possible to include files rather than specifying the content in write_files ?19:49
Odd_BlokeKrikke: Can you expand on what you mean by "include" a little?20:12
Krikkelike instead of writing the content of the file into the cloud-init config file like a hobo I would just have the file there in the filesystem and would say something like `include_file(./htoprc)`20:13
Odd_BlokeKrikke: Which filesystem?  Your local filesystem, or the filesystem which cloud-init is running on?20:15
Krikkeand it would parse it on it's own and the cloud init config file would look much cleaner20:15
Krikkethe local filesystem20:15
Krikkebefore creating the image20:15
Odd_BlokeYou generally pass user-data as either a string or a file to your cloud's CLI when creating an instance.  For an include like that to work, each of those clients would have to understand what it meant and how to perform the substitution correctly.20:17
Odd_BlokeWhich isn't really practical, as you might imagine.20:17
Odd_BlokeWhat you could do, though, is use a templating language to generate your cloud-config before passing it into whichever tool you're using.20:18
Krikkethat would work yeah20:18
Odd_BlokeThen it'd be `aws ec2 run-instances ... --user-data "$(my-template-thing cloud.cfg.tmpl)"` or similar.20:19
Krikkeyeah I have a terraform template which sets up a kvm virtual machine and uses cloud init to configure it20:19
Odd_Blokefalcojr: Just posted my review of the integration testing stuff; FYI, that's just based on examination of the code, so I may have further comments once I've written a test with it.20:21

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