/srv/irclogs.ubuntu.com/2022/09/07/#cloud-init.txt

holmanbeantaxi: Responding to your last comment (I haven't caught up on the whole thread): Currently tools aren't distributed separate from cloud-init itself, so I commonly run tools locally by setting PYTHONPATH=/path/to/cloud-init/git/repo cloud-init.cmd.main --help, which which is useful for example for schema validation without cloud-init being installed.13:02
SDes91In cloud-init how to just create a user but not set a password? I wish the user to exist but it becomes active only when the admin user creates a password for them manually13:30
holmanSDes91: lock_passwd defaults to true, I think the behavior you desire is default unless you change that setting.14:02
holmanSDes91: So just use the `users` key. Examples here: https://cloudinit.readthedocs.io/en/latest/topics/examples.html#including-users-and-groups14:03
SDes91holman tried it out. Works. I can get the SSH prompt when trying to login into the machine with this user but since the password isn't set it fails after 3 attempts. Serves my purpose14:11
beantaxiholman: Thanks -- I cloned the repo, created a cloudinit virtualenv, did a pip install -r requirements.txt, and then `$ PYTHONPATH=/path/to/cloudinit python -m cloud-init.cmd.main --help`, and it looks like that will do what you suggest. Thanks!15:03
beantaxiIt'd be nice to streamline that, into a single executable eg `cloud-init-tool`, but offhand I don't know how I'd do that without adding a line or 2 to setup.py which would then require a full install15:06
acibabeantazi: That's already the case. You can access that cli via `cloud-init`: https://github.com/canonical/cloud-init/blob/main/setup.py#L35215:08
holmanIt's not very convenient is it.15:13
beantaxiaciba: I was just reading the cloudinit setup.py source and noted that :) If a pip install-from-source of cloud-init into the venv is free of side effects, then I could just run cloud-init and that'd be nice15:17
beantaxiholman: Not particularly but I appreciate that most folks are fine just writing cloud config files in their fave text editor, without need for any tools, and so everything I'm asking about is pretty niche15:18
holmanbeantaxi: +1, but also maybe not so niche anymore - schema validation (which has improved lately) is a quick-and-easy solution to suggest when users have user-data issues, but if getting it setup is inconvenient they are less likely to try that first before asking.15:31
minimalholman: I guess it would be possible for distros to create a subpackage to install for just the schema validation16:41
minimalam thinking about this now for Alpine ;-)16:42
ExeciNI just installed ubuntu server 22.04.1 and I want to use this installation as a reference to deploy some more VMs. Where can I find the cloud-init configuration for this installation?16:58
blackboxswExeciN: so are your talking about using a Ubuntu live server  install, that should emit a /var/log/installer/autoinstall.-user-data file that can be used in subsequent live installs via something like https://ubuntu.com/server/docs/install/autoinstall-quickstart17:02
blackboxswExeciN: if you are talking about just cloning a VM golden image that was created on your favorite cloud  platform, you might be wanting to do something like `sudo cloud-init clean --logs; rm /etc/machine-id; sudo shutdown -h now` and then take a snapshot or clone of your image to reuse when launching other VM instances17:05
ExeciNblackboxsw: I was talking about the first one. thanks17:40
beantaxi holman: I can't think of how Docker would help ... have y'all considered a 'cloud shell' sort of setup, where folks could do all their config validation and testing in an SPA?18:08
cjp256are there any known issues with cloud-init in -proposed?20:49
cjp256specifically: 22.3-13-g70ce6442-0ubuntu1~22.04.120:49
blackboxswcjp256: not at the moment. holman was running through our SRU valifation on all platforms and I **think** our integration validation was coming up green20:50
cjp256after an upgrade, the subsequent reboot falls back to iid-datasource on Azure20:50
blackboxswI'll check out CI on this, because -proposed on specific clouds may not have completed yet20:50
cjp256do not know why yet, but looking into it20:50
blackboxswcjp256: 22.3-13-g70ce6442-0ubuntu1~22.04.1 passed all existing integration tests for us Sep 3, 2022 12:22:12 AM20:53
blackboxswonly a minor known integration test assert failure which was already fixed in tip of main.20:54
blackboxswhttps://jenkins.canonical.com/server-team/view/cloud-init/job/cloud-init-integration-jammy-azure/95/ (though I think that URL's not visible to others outside of canonical)20:55
cjp256doesn't repro if i build my own deb from 22.3.121:10
cjp256did it just get pulled from -proposed? :D21:10

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