Enhance device capabilities and constraints management - #381
Conversation
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
…s and custom runtime Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
…ibrary Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
…pp pkg id Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
…eligible devices Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
…g app Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
…nerated Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
…requirements Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
…ased on label matching Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
…t library Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
…e deploying app Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
…ment Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
0bf620d to
069e442
Compare
| - **Workload management** (`workloads/`) - Helm and Docker Compose clients | ||
| - **Archive** (`archive/`) - Unpacking or packing archives(tar.gz) etc.. | ||
| - **Pointer operations** (`pointers/`) - Some helper functions to deep clone, safely get pointer to temp variables etc... | ||
| - **Device Constraint Selector Engine** (`constraints/`) - Reusable device eligibility checking library for the checks defined in [Device Runtime Affinity SUP](https://github.com/margo/specification-enhancements/blob/main/proposals/sup_device_specific_runtime_affinity_matching.md) |
There was a problem hiding this comment.
Need to change this path once it is merged to completed folder or better to provide specification PR path as there might be some changes post specification-enhancement PR approval.
There was a problem hiding this comment.
I checked in specification PR , this exact content is not there, hence I would say we can change path once it is moved to completed folder.
|
|
||
| **Tools:** | ||
| - **Setup script** (`wfm.sh`, `device-agent.sh`) - Automated environment setup (Harbor, device's Workload Fleet Management Client, Symphony etc.) | ||
| - **Label Generator Script** (`create-device-labels.sh`) - This script helps users generate labels for a device as per the guidelines defined here: [Device Runtime Affinity SUP](https://github.com/margo/specification-enhancements/blob/main/proposals/sup_device_specific_runtime_affinity_matching.md) |
There was a problem hiding this comment.
here are refer the specification PR because specification-enhancement moved to completed folder from proposal folder once spec PR is approved/merged to pre-draft
There was a problem hiding this comment.
I checked in margo/specification#203 , this exact content is not there, hence I would say we can change path once it is moved to completed folder, as this PR will be merged in main when specification PR will be merged.
| in: query | ||
| schema: { type: string } | ||
| description: Token for pagination | ||
| - name: appPackageId |
There was a problem hiding this comment.
what is the purpose of this additional parameter, where this input come from?
There was a problem hiding this comment.
As discussed, WFM CLI would show "eligible or not eligible" while selecting device for a particular deployment. For that eligibility check, List Device needs an optional parameter "application package Id" in order to get application device constraints for that particular application package. More information is present in description of this PR : #374
| oneOf: | ||
| - $ref: '#/components/schemas/HelmApplicationDeploymentProfileComponent' | ||
| - $ref: '#/components/schemas/ComposeApplicationDeploymentProfileComponent' | ||
| - $ref: '#/components/schemas/CustomApplicationDeploymentProfileComponent' |
There was a problem hiding this comment.
I think we have discussed this already, as you have one more profile component (custom). shall we merge all as single for better clarity? what is your thought?
There was a problem hiding this comment.
I pointed out this previously that does non-standard API need to change as well in compose oci changes. My point was, for parts which are same in standard & non-standard, we should keep standard as single source of truth. Hence change here should be done and should be same to what is present in standard. Custom Runtime PR introduces a custom runtime apart from helm/compose. Hence this change was added.
If we align to change it, my suggestion would be to either change it as a separate PR and then we pull changes in this to align it; OR after merging this a separate PR should be raised for that change. That ways, we can keep these two things separate.
| "labels": { | ||
| "northstarida.com/hypervisor": "hyper-v", | ||
| "northstarida.com/wasm.runtime": [ | ||
| "wamr" | ||
| ], | ||
| "northstarida.com/wasm.package.format": [ | ||
| ".wasm", | ||
| ".aot" |
There was a problem hiding this comment.
we have single static capability file for both helm and compose and we update supportedDeploymentTypes (any other attributes) during setup
Introducing these labels are not necessary from helm and compose right?
There was a problem hiding this comment.
Labels are totally optional. Here, they are just placeholders for reference. They are not used while deployment. In installation scripts, I have provided a different way to add labels while installing WFM Client. And if labels are not provided at installation time, these placeholder labels are removed automatically.
Keeping it here just because if someone wants to deploy as a binary, they will know how labels can be added, and they can modify/remove as required.
| // Only deploy if not already installed | ||
| if currentState != sbi.DeploymentStatusManifestStatusStateInstalled { | ||
| dm.log.Debugw("deploying pending deployment", "deploymentId", deploymentId) | ||
| // TODO: Check if device is eligible or not, if not, set it to failed state even before deployment |
There was a problem hiding this comment.
is checking device eligibility planned later? IMO, WFM will filter device is eligible or not.?
There was a problem hiding this comment.
I forgot to remove this TODO comment. I have removed it now.
As per discussion, WFM will just show whether a device is eligible or not. Selection of a particular device still remains with the user. However, on Device agent side, if a particular application is ineligible, it is put in FAILED mode without even deploying it.
Signed-off-by: Pulkit Sharma <pulkit.d.sharma@capgemini.com>
Enhance device capabilities and constraints management
Summary
Key changes
New modules and/or services for:
Persistence and migrations:
Tests:
Docs:
Checklist