/srv/irclogs.ubuntu.com/2018/02/25/#cloud-init.txt

brunobronoskyI discovered that installing cloud-init on an Raspberry Pi running Raspbian (RPi Debian) has a fatal flaw. It trows stuff into `/etc/apt/sources.list` this is inappropriate for this architecture. Where does the problem lie? I don't know who to report the bug to.01:58
larsksbrunobronosky: how did you install it?02:11
brunobronoskyapt-get02:11
larsksbrunobronosky: there's a cloud-init package in raspbian? Or was this a third-party repository?02:12
brunobronosky0.7.9 is in Raspbian.02:12
brunobronoskyI don't think anyone has ever used it, but it comes straight from debian.02:12
larsksIf the raspbian package is installed the wrong things in sources.list, I would call that a raspbian bug.02:13
larsksRaspbian bug reporting info: https://www.raspbian.org/RaspbianBugs02:13
brunobronoskyyeah, I found that, but it's the "Before You File a Bug" part that has me second guessing.02:16
brunobronoskyI'm eventually going to ask them to have cloud-init installed by default. I'm trying not to be an annoyance to the maintainer.02:17
larsksWhat are you doing with cloud-init on the Pi?02:19
brunobronoskylarsks https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=206034&sid=e154adc1892a1a0d3c32fda0a94f640c02:24
brunobronoskyactually, I guess my followup to the thread is more to the point. https://www.raspberrypi.org/forums/viewtopic.php?p=1276583#p127658302:25
* larsks continues to read...02:25
larsksThat's an interesting application.02:27
brunobronoskyI thought so.02:27
larsksWhat was the particular feature that was undocumented until 17.2?02:27
brunobronoskybut, now I'm doubting my decision to use a Standardâ„¢ vs. just roll my own systemd oneshot service.02:28
brunobronoskyusing `datasource: NoCloud: seedfrom: /path/`02:29
brunobronoskyEverything I was hearing was insisting that you had to use a volume labeled `cidata`.02:30
larsksHuh. Pretture sure even earlier versions documented how to preconfigure a filesystem with metadata.02:31
larsksBut re: using cloud-init vs rolling your own: I guess it depends on what you're trying to do. I mean, cloud-init already has a bunch of modules to handle common system configuration tasks, which is maybe useful.02:31
brunobronoskyEven on this IRC channel at first I said "I need to have {user,meta}-data read from the partition mounted at /boot" and I was being told to change the label to cidata.02:32
larsksOn the other hand, if you have access to the sdcard to install cloud-init metadata, you also are able to make most of your configuration changes at that point.  Using something like qemu-user, you can even run Pi binaries and install packages, etc.02:32
brunobronoskyO_o "and then tell the kernel to boot from the cidata volume instead of the boot volume? Eh. No."02:33
brunobronoskyBut using qemu is WAY beyond your average Windows using school teacher.02:34
larsksE,g, here are the docs for 0.7.9 that describe pre-seeding: https://git.launchpad.net/cloud-init/tree/doc/examples/seed/README?id=0.7.902:35
brunobronosky(editing anything other than /boot is virtually impossible for Mac and Windows users)02:36
larsksThat's a good point.02:40
brunobronoskyEven that example you posted would have helped me. But sadly... http://cloudinit.readthedocs.io/en/latest/search.html?q=nocloud-net&check_keywords=yes&area=default02:40
larsksHave you (or are you going to) put together a demo image with cloud-init installed?02:44
brunobronoskyGoing to. Just as soon as I can get cloud-init to stop destroying apt.02:49
brunobronoskyI'm going to add cloud-init to my fork of https://github.com/RPi-Distro/pi-gen/blob/dev/stage2/01-sys-tweaks/00-packages and publish a cloud-init userdata file that can be used to compile the Raspbian image on an EC2 instance. (Since it is virtually impossible to build on Mac or Windows) How meta is that?02:54
larsksbrunobronosky: what sort of problems are you seeing?  Just install cloud-init on rasbpian stretch, it doesn't appear to have added anything erroneous to /etc/apt.02:54
brunobronoskyHmmm. For me it overwrites /etc/apt/sources.list02:55
larsksUpon installation? Or execution?  I just installed the package (apt install cloud-init) and my sources.list is unmodified.02:56
brunobronoskydo `sudo cloud-init init --local`02:56
larsksSo that would be "upon execution" :). Let me give it a try.02:56
brunobronoskyKeep this handy ;-) https://github.com/RPi-Distro/pi-gen/blob/dev/stage0/00-configure-apt/files/sources.list02:58
larsksStill unmodified.02:58
larsks/var/log/cloud-init.log looks like http://termbin.com/mgcs02:58
brunobronoskyReally! Hmm. Let me grab a fresh image. I've installed 17.2 from source on this one. (You probably just saved me from embarrassing myself (elsewhere))02:59
larsksbrunobronosky: note that this is 0.7.9!03:00
larsksIt's entirely possible 17.2 is doing something different.03:00
brunobronoskyI'd rather look like a fool here than on Raspbian. I'm not trying to get any PRs accepted to cloud-init.03:01
brunobronosky(0.7.9 understood)03:01
brunobronoskylarsks do you have apt-configure in your /etc/cloud/cloud.cfg03:16
larsksbrunobronosky: looks like it...but it's in cloud_config_modules, so 'cloud-init init --local' wouldn't run it.03:17
brunobronoskyonce you reboot, it will fill your sources.list with "## Note, this file is written by cloud-init on first boot of an instance"...03:19
larsksLet me drop a seed file in place and see what happens.03:22
brunobronoskyI'd love some help coming up with a sane minimal /etc/cloud/cloud.cfg for this.03:22
larsksI see what you mean.   It looks like the comments there tell you what to do to make it configure sources.list appropriately.03:27
larsks("if you wish to make changes you can...")03:27
larsksbrunobronosky: I have to take off for the night.  Good luck!03:32
brunobronoskythanks!03:34
brunobronoskyI just don't like that the cloud.cfg by default is full of all kinds of things I don't understand and don't need.03:35

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