Skip to content

configure user account based on azure provider specific information #919

@JanZerebecki

Description

@JanZerebecki

Feature Request

Configure a user account based on provider specific information and use it as the user for which to add authorized ssh keys.

Azure has a prominent setting for an administrator account name when creating an VM instance. It seems users seem to expect to be able to use this and have it work. (Screenshot of Azure VM instance administrator account username from some unrelated installation instructions.)

Is afterburn a good place for this functionality?

This information is provided as osProfile.adminUsername: https://learn.microsoft.com/en-us/azure/virtual-machines/instance-metadata-service?tabs=linux#tabpanel_1_linux
Without having tested it I assume this would be metadata/instance/compute/osProfile/adminUsername?api-version=2021-12-13&format=text in therms of how the code currently accesses similar data: https://github.com/coreos/afterburn/blob/07333c051dbdccabdcf16fcb1df482d2eb56f429/src/providers/microsoft/azure/mod.rs#LL325C33-L325C98

Additionally boolean disablePasswordAuthentication will be provided. For if its false, I can't find how to get an adminPassword right now, probably similarly to authorized ssh keys.

(Choosing the default user at runtime might be useful independently so a generic way to configure this should also be provided. Currently it is set via the Makefile at build time. People might want to change that without rebuilding an image. And might want to build images with different default users without recompiling afterburn. I'm unsure what a good ways is to handle any of these being different.)

Environment

Azure

Desired Feature

Other Information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions