API for downloading serialized graph, that is used for task-based deployment, can be usefull in next scenarios:
This specification is concerned with latter usage scenario.
In solar we want to regenerate fuel resource composition, and take into account - role allocation, conditions based on fuel settings, and other misc logic that are used to build deployment composition. And all of those actions are executed during graph compilation procedure.
Instead of fetching deployment graph we could fetch other configuration options exposed by fuel API, like role allocation and settings. And write conditional allocator ourselves, but it will lead to duplication of logic in nailgun, and introduce potential desynchronization between newly introduced component and nailgun.
None
New handler that will expose already existing logic.
None
HTTP | URL |
---|---|
GET | /api/v1/clusters/<:cluster_id>/serialized_tasks/?nodes=<:nodes>& tasks=<:tasks> |
On request it will use task_based_deployment.TaskSerializer.serialize method with all provided by user parameters.
Additional validations provided by handler:
Exposing handler data with fuel client is out of scope for this specification.
None
None
Build more complicated policy engine based on raw fuel configuration. Taking into account date of the release this is not even feaasible alternative.
No impact
No impact
No impact
No impact
No impact
No impact
No impact
No impact
Documentation will added in code
For LCM improvements some changes will be done in TasksSerializer API, after they will be introduced - REST API will adjusted to those changes.
Change is not complex, unit testsing and manual verification that it works on ISO should be enough
Serialized deployment graph, that is sent to astute for deployment procedure, can be downloaded using fuel REST API. API should provide interface to take into account all variables exposed by TasksSerializer, including: - choose cluster - select subset of nodes in cluster - select list of tasks that will be included in tasks serialization
None