https://blueprints.launchpad.net/fuel/+spec/ui-custom-graph
This blueprint extends Fuel UI with ability to list, remove, upload, download, and run custom workflows (custom graphs) that are sets of arbitrary deployment actions such maintenance of cluster, security updates and even upgrades [1].
Now Fuel UI gives User no instruments to view, remove, upload, download, or execute custom deployment graphs. At the same time, an ability to do this would help to operate with complex life-cycle management (LCM) use cases such as bug fixing or other cluster updates.
Cluster page in Fuel UI should be extended with new ‘Workflows’ tab.
The ‘Workflows’ tab should contain a table with all graphs available for the cluster. Rows in a workflows table should be grouped by graph type attribute.
Workflows table should have the following columns:
Name | Level | Actions | Download |
---|---|---|---|
Type “default” | JSON/YAML | ||
Release | JSON/YAML | ||
Environment | Delete | JSON/YAML | |
Type “9.0-mu-1” | JSON/YAML | ||
mu-1-plugin | Plugin Fuel Contrail plugin | JSON/YAML | |
mu-1-release | Environment | Delete | JSON/YAML |
Type “upgrade” | JSON/YAML | ||
Release | JSON/YAML | ||
my-plugin-graph | Plugin Fuel Contrail plugin | JSON/YAML | |
upgrade-graph | Environment | Delete | JSON/YAML |
Note that workflows table should not include graphs of not enabled cluster plugins.
Graphs of ‘default’ type should go first in the table. Inside each group graphs should be sorted by its level (release, plugin, and then environment graphs).
Workflows table should support filtering by deployment graph level and by graph type. Both filters should support multiple values selection.
To delete a graph User have to confirm the action in confirmation pop-up by entering the graph type.
User should also be able to download JSON or YAML file with merged tasks of resulting graph by its type (tasks of graphs that have this type and related to different levels are merged together).
The ‘Workflows’ tab should also have ‘Upload New Workflow’ button to launch a pop-up with a form for uploading a new graph for the current cluster (the new graph level will be ‘cluster’, it is shown on UI as ‘Environment’). To do this User should fill the following fields:
Fuel UI user should be able to start execution of custom graph of a particular type.
Top block on the ‘Dashboard’ tab that represents deployment modes should be extended by a new ‘Custom Workflows’ mode.
Working in this deployment mode, User should specify a graph type he wants to execute. All cluster graphs except ‘default’ type are available in this deployment mode. And ‘default’ graph already executed by clicking existing ‘Deploy Changes’ button in Fuel UI.
User should also click ‘Select Nodes’ button to open a standard ‘Select Nodes’ pop-up to specify nodes for selected graph execution. All cluster nodes are selected in the pop-up by default.
Graph execution can not be launched from Fuel UI if no cluster nodes selected. Graph also can not be executed if any of the selected nodes is offline.
When execution of the selected graph started, an appropriate task (aka transaction) comes to UI. Fuel UI should display a progress bar on Dashboard to represent a progress of the graph execution. By clicking on the progress bar, deployment history [2] of the task should be shown.
No changes required.
Existing API should be used by Fuel UI:
GET /graphs/?cluster_id=<cluster_id> to get all graphs available for a particular cluster (graphs of different levels)
Response data is returned in the following format:
[
{
id: 1,
name: null,
relations: [{
type: 'default',
model: 'cluster',
model_id: 1
}],
tasks: [...]
},
{
id: 2,
name: 'some name',
relations: [{
type: 'default',
model: 'release',
model_id: 1
}],
tasks: [...]
},
{
id: 3,
name: 'my plugin graph',
relations: [{
type: 'plugin123',
model: 'plugin',
model_id: 12
}],
tasks: [...]
},
...
]
GET /clusters/<cluster_id>/deployment_tasks/?graph_type=<graph_type> to get merged tasks of a particular graph
DELETE /graphs/<graph_id> to remove a graph.
POST /clusters/<cluster_id>/deployment_graphs/<graph_type> to create a new graph for the current cluster (the graph level will be ‘cluster’).
Data in the following format should be sent by Fuel UI:
{
name: 'my graph name',
tasks: [...]
}
PUT /cluster/<cluster_id>/deploy/?graph_type=<graph_type> with empty data to run a graph on all cluster nodes
PUT /cluster/<cluster_id>/deploy/?graph_type=<graph_type>&nodes=<node_ids> with empty data to run a graph on a subset of nodes
No changes required.
No changes required.
No changes required.
None.
None.
None.
None.
Ability to perform maintenance of a cluster including applying of bugfixes, security updates or even upgrade.
None.
None.
None.
None.
Fuel UI user guide should be updated to include information about the feature.
None.
Fuel UI user is able to list, remove, download, upload deployment graphs and run the graph of the selected type on the subset of nodes or on the whole cluster.