holman | beantaxi: 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 |
---|---|---|
SDes91 | In 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 manually | 13:30 |
holman | SDes91: lock_passwd defaults to true, I think the behavior you desire is default unless you change that setting. | 14:02 |
holman | SDes91: So just use the `users` key. Examples here: https://cloudinit.readthedocs.io/en/latest/topics/examples.html#including-users-and-groups | 14:03 |
SDes91 | holman 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 purpose | 14:11 |
beantaxi | holman: 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 |
beantaxi | It'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 install | 15:06 |
aciba | beantazi: That's already the case. You can access that cli via `cloud-init`: https://github.com/canonical/cloud-init/blob/main/setup.py#L352 | 15:08 |
holman | It's not very convenient is it. | 15:13 |
beantaxi | aciba: 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 nice | 15:17 |
beantaxi | holman: 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 niche | 15:18 |
holman | beantaxi: +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 |
minimal | holman: I guess it would be possible for distros to create a subpackage to install for just the schema validation | 16:41 |
minimal | am thinking about this now for Alpine ;-) | 16:42 |
ExeciN | I 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 |
blackboxsw | ExeciN: 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-quickstart | 17:02 |
blackboxsw | ExeciN: 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 instances | 17:05 |
ExeciN | blackboxsw: I was talking about the first one. thanks | 17: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 |
cjp256 | are there any known issues with cloud-init in -proposed? | 20:49 |
cjp256 | specifically: 22.3-13-g70ce6442-0ubuntu1~22.04.1 | 20:49 |
blackboxsw | cjp256: not at the moment. holman was running through our SRU valifation on all platforms and I **think** our integration validation was coming up green | 20:50 |
cjp256 | after an upgrade, the subsequent reboot falls back to iid-datasource on Azure | 20:50 |
blackboxsw | I'll check out CI on this, because -proposed on specific clouds may not have completed yet | 20:50 |
cjp256 | do not know why yet, but looking into it | 20:50 |
blackboxsw | cjp256: 22.3-13-g70ce6442-0ubuntu1~22.04.1 passed all existing integration tests for us Sep 3, 2022 12:22:12 AM | 20:53 |
blackboxsw | only a minor known integration test assert failure which was already fixed in tip of main. | 20:54 |
blackboxsw | https://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 |
cjp256 | doesn't repro if i build my own deb from 22.3.1 | 21:10 |
cjp256 | did it just get pulled from -proposed? :D | 21:10 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!