Skip to content

Custom configuration design proposal #275

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Custom configuration design proposal #275

wants to merge 11 commits into from

Conversation

niket-intc
Copy link

Description

This PR presents the design proposal for the custom configuration of EdgeNode.

Fixes # (issue)

Any Newly Introduced Dependencies

Please describe any newly introduced 3rd party dependencies in this change. List their name, license information and how they are used in the project.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

  • I agree to use the APACHE-2.0 license for my code changes
  • I have not introduced any 3rd party dependency changes
  • I have performed a self-review of my code

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! Please make sure to review our Contributing Guide.

Copy link
Contributor

@pierventre pierventre left a comment

Choose a reason for hiding this comment

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

There is nothing of what we discussed during the call - nor a mention in the alternative design. Why?

@ajaythakurintel ajaythakurintel added the Proposal Identify a PR as a design proposal to be reviewed. label May 9, 2025

***Data-Model*** example of custom-config :

```yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to add an enum kind to differentiate in the future between different config?

```
The instance resource data-model has to be updated to include custom-config resource.

The relationship between an instance and its custom configuration shall be one-to-many. Each instance can be associated with one or more than one pre-created custom configuration. The onboarding manager will create cloud-init file based on number of cloud-init files added by user. We can ristrict the number of cloud-init file that canbe associated to a instance to 5.
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe here we mean many to many, not one to many. Do we want the same config to be usable across different Instances or not?

Copy link
Contributor

Choose a reason for hiding this comment

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

Who enforces the limit? Do we want to support multiple cloud-init from the very beginning?

Copy link
Author

Choose a reason for hiding this comment

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

Ok, I will correct it,
We want to keep it as part of ADR as user might want to split features in multiple cloud-init. @daniele-moro

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we can enforce the limit in Inventory? Shall we restrict the operations to not allow updates (PATCH)? I guess we cannot patch after the provisioning so we cna use the same approach of the LocalAccount

During provisioning, the Onboarding Manager shall check the instance. If the custom-config contains the cloud-init file, it will be copied along with the existing default EMF EdgeNode cloud-init. Since the custom-config is optional, no action is required if the cloud-init file is not present. There will be no error handling for user cloud-init failures.

#### 4. Updates to Bulk Import Tool
The Bulk Import Tool has to be enhances to :
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The Bulk Import Tool has to be enhances to :
The Bulk Import Tool has to be enhanced to:


#### 4. Updates to Bulk Import Tool
The Bulk Import Tool has to be enhances to :
- Include custom-config resourceID in .csv file
Copy link
Contributor

Choose a reason for hiding this comment

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

potentially multiple custom-config?

Copy link
Author

Choose a reason for hiding this comment

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

I will fix it. I need to think in terms of cli tool also.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe we should work directly in the new CLI and not improving BIT

Copy link
Contributor

Choose a reason for hiding this comment

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

in BIT we provide names when possible and we dont expose directly the ids

note over user : User creates a custom cloud-init config yaml.

user ->> inv : Create custom-config resource providing cloud-init config yaml.
note over inv : API does basic yaml validation of the cloud-init config file.
Copy link
Contributor

Choose a reason for hiding this comment

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

API or Inv?


The UI shall provide interface to the user during Host registration page to associate or Map the earlier created custom-config. The UI can be similar to that of LocalAccount Page were it shows the list of LocalAccount to associate.

Once the provisioning is completed, the cloud-init data should be immutable; no edit or delete options should be available. Users should only be able to view the cloud-init configuration under host details.
Copy link
Contributor

Choose a reason for hiding this comment

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

why no delete?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Proposal Identify a PR as a design proposal to be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants