cloudbase / cloudbase-init

Cross-platform instance initialization
http://openstack.org
Apache License 2.0
414 stars 150 forks source link

Support getting admin_username from OpenStack metadata #64

Closed yoerg closed 3 years ago

yoerg commented 3 years ago

I want to have a custom username in a new instance whilst still getting authorized_keys from OpenStack.

This PR reads the default administrator name from a custom meta data key admin_username.

ader1990 commented 3 years ago

Hello,

The code looks good and it follows the same implementation as for the WinRM certificate authentication: https://github.com/cloudbase/cloudbase-init/blob/master/cloudbaseinit/metadata/services/baseopenstackservice.py#L265

Currently, cloudbase-init development is done via the OpenStack review process: https://review.opendev.org/ Can you please create a patch there? Here are the base steps to achieve this: https://www.openstack.org/blog/submit-your-first-openstack-patch-in-three-steps/ https://docs.openstack.org/zaqar/latest/contributor/first_patch.html - you need to replace zaqar with cloudbase-init.

Thank you, Adrian Vladu

yoerg commented 3 years ago

Thanks, I did: https://review.opendev.org/c/x/cloudbase-init/+/771591