Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

device_connectors: Add default-user-data to oem_autoinstall #373

Conversation

Artur-at-work
Copy link
Contributor

@Artur-at-work Artur-at-work commented Oct 9, 2024

Description

Add default-user-data file in oem_autoinstall for convenience.
When user didn't provide user-data file, it will use default one.

Resolved issues

Closes https://warthogs.atlassian.net/browse/OEX86-473

Documentation

Updated docs for oem_autoinstall

Web service API changes

N/A

Tests

  1. Submit job without user_data field and without user-data attachment
  2. Wait till provisioning completed on Stella with the default user-data
    https://testflinger.canonical.com/jobs/940e48fb-70df-45a3-8179-4687f352e105

@Artur-at-work Artur-at-work requested a review from a team as a code owner October 9, 2024 08:39
@Artur-at-work Artur-at-work marked this pull request as draft October 9, 2024 08:39
@Artur-at-work Artur-at-work marked this pull request as ready for review October 9, 2024 15:37
Copy link
Contributor

@kevinyehk kevinyehk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Artur-at-work Did this change also include a default authorize_keys?

@Artur-at-work
Copy link
Contributor Author

Artur-at-work commented Oct 11, 2024

@Artur-at-work Did this change also include a default authorize_keys?

@kevinyehk No, because I'd have to add the public key into the default-user-data and it will be exposed.
To add the keys to provisioned device, user have to add the authorized_keys file as an attachment.

Will this work for you? or should we consider another approach?

Copy link
Collaborator

@plars plars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one comment

@@ -44,6 +44,9 @@ def __init__(self, config, job_data):
self.config = yaml.safe_load(configfile)
with open(job_data, encoding="utf-8") as job_json:
self.job_data = json.load(job_json)
self.data_path = (
Path(__file__).parent / "../../data/muxpi/oem_autoinstall"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that this has been using files under data/muxpi, shouldn't it organize them under data/oem_autoinstall instead? That seems like a better place for it, since they are not used by the muxpi device connector.

@Artur-at-work Artur-at-work marked this pull request as draft October 14, 2024 06:57
@Artur-at-work Artur-at-work deleted the oem-autoinstall-add-default-user-data branch October 14, 2024 07:16
@Artur-at-work Artur-at-work restored the oem-autoinstall-add-default-user-data branch October 14, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants