2060 Override Cluster and Machine Pipelines¶
20 Minutes intermediate
Create application specific pipeline overrides based on standardized pipelines
In this lab, the User will create a Pipeline and use it to build clusters. Business ROI: Using standardized pipelines helps ensure consistent operational results without restricting business imperatives for use-case specific needs.
Prerequisites¶
Additional Labs:
Concepts¶
- clusters
- pipelines
- params
Summary¶
Add the Dev Library Content Pack¶
- Navigate to the Catalog
- Find the
dev-library
using the search bar - Install or Update
dev-library
if not loaded, by clicking the install button
Create a Pipelines¶
- Navigate to Pipelines
-
Click the
Create
button The form should have the following:* Set `Name` to `lab2060` * Set the Param `universal-application` to `lab2060` * The value must be the part after `universal-application-` in the `Name` field. * Set the Param `universal-application-chain-index-override` to `runbook` * This will set the pipeline to apply a configurable application as the last step of the pipeline. * Set the `icon` and `color` fields to your choice. * Click `Save`
-
Click
Add Params
- Select
dev/wait-icons
by typing - Select
universal/runbook-during-flexiflow
by typing -
Edit the
dev/wait-icons
parameter Make the list of values:```json [ "cat", "arrow up", "arrow right", "arrow down", "arrow left", "dog" ] ``` Click the little `save` icon
-
Edit the
universal/runbook-during-flexiflow
parameter Make the values:```json [ "wait-time" ] ``` Click the little `save` icon This injects the `wait-time` task into the runbook workflow element of the pipeline.
Look at the Pipeline Object¶
-
Review the Runbook Workflow Entrypoints This view shows the Workflows chains in the Pipeline.
Containers and VMs will enter through `universal-start` Workflow. Bare Metal and PXEing VMs will use the `universal-discover` Workflow.
-
Review the JSON This view shows the raw JSON object for the Pipeline. The view can also show YAML.
A button in the upper right, `Enable Editing`, allows for direct editing of the object.
Create a Cluster to validate the Pipeline¶
- Navigate to Clusters
- Click
Add
SetName
tolab2060
Set the `broker/name` to `context-broker` Set the `broker/set-pipeline` to `universal-application-lab2060` Click `Save`
Review the Machines Created by the Cluster¶
- Navigate to Machines
- Notice the Machines with names starting with
lab2060-
The machines were created by thecontext-broker
for thelab2060
clusters.These machines were assigned the `universal-application-lab2060` pipeline and are running that now. The icons of the machine should be cycling through the list in the pipeline. The task is set to `wait-time`.
Clean up the cluster¶
- Navigate to Clusters
- Select the
lab2060
cluster -
Click
Actions
and selectWorkflow Mode
Clusters must beWorkflow Modee
to be removed. -
Click
Actions
and selectDelete (Cleanup)
- Click
Cleanup
to confirm The cluster will run a workflow to cleanup the machines by asking the broker to remove them. Once complete, the cluster will be removed.
Create Cluster Pipeline¶
- Navigate to Pipelines
-
Click the
Create
button The form should have the following:* Set `Name` to `lab2060-cluster` * Set the Param `universal-application` to `lab2060-cluster` * The value must be the part after `universal-application-` in the `Name` field. * Set the Param `universal-application-chain-index-override` to `cluster` * This will set the pipeline to follow set of workflows to create a cluster. * Set the Meta required params field to `broker/name` * This will require that the cluster page ask for that field. This is a space-separated list. * Click `Save`
-
Click
Add Params
- Select
broker/set-pipeline
by typing - Select
universal/runbook-during-flexiflow
by typing -
Edit the
broker/set-pipeline
parameter The value should be set touniversal-application-lab2060
.Click the little `save` icon
-
Edit the
universal/runbook-during-flexiflow
parameter Make the values:```json [ "wait-time" ] ``` Click the little `save` icon This injects the `wait-time` task into the runbook workflow element of the pipeline.
Create a Cluster to validate the Cluster Pipeline¶
- Navigate to Clusters
-
Click
Add
SetName
tolab2060
Set `Cluster Pipeline` to `lab2060-cluster` **NOTICE** The required parameters changed. Set the `broker/name` to `context-broker` Do NOT set the `broker/set-pipeline` parameter Click `Save`
-
Navigate to the lab2060 Activity view Notice that this time the cluster continues on to running the
wait-time
task after creating the cluster machines. -
Navigate to Machines If this is done quickly, the machines will not have necessarily completed all there initialization and pipeline completion. The Cluster pipeline defaults to not waiting for machines to complete their pipelines before the cluster continues. This can be changed.
Clean up the cluster¶
- Navigate to Clusters
- Select the
lab2060
cluster -
Click
Actions
and selectWorkflow Mode
Clusters must beWorkflow Modee
to be removed. -
Click
Actions
and selectDelete (Cleanup)
- Click
Cleanup
to confirm The cluster will run a workflow to cleanup the machines by asking the broker to remove them. Once complete, the cluster will be removed.
Update Cluster Pipeline to Wait for Machines¶
- Navigate to lab2060-cluster Pipeline
- Click
Add Params
- Select
universal/cluster-provision-post-flexiflow
by typing - Edit the
universal/cluster-provision-post-flexiflow
parameter Make the values:```json [ "cluster-wait-for-members" ] ``` Click the little `save` icon This injects the `cluster-wait-for-members` task into the cluster provision workflow element of the pipeline. This shows injection of tasks. Alternatively, there is a parameter for this already, `cluster/wait-for-members`. Setting this to `true` instead of this will cause the same effect.
Create a Cluster to validate the Cluster Pipeline¶
- Navigate to Clusters
-
Click
Add
SetName
tolab2060
Set `Cluster Pipeline` to `lab2060-cluster` **NOTICE** The required parameters changed. Set the `broker/name` to `context-broker` Do NOT set the `broker/set-pipeline` parameter Click `Save`
-
Navigate to the lab2060 Activity view Notice that this time the cluster runs
cluster-wait-for-members
and pauses waiting for the machines to finish. -
Navigate to Machines If this is done quickly, the machines will not have necessarily completed all there initialization and pipeline completion. Once all the machines finish, the cluster will then run the
wait-time
task.
Clean up the cluster¶
- Navigate to Clusters
- Select the
lab2060
cluster -
Click
Actions
and selectWorkflow Mode
Clusters must beWorkflow Modee
to be removed. -
Click
Actions
and selectDelete (Cleanup)
- Click
Cleanup
to confirm The cluster will run a workflow to cleanup the machines by asking the broker to remove them. Once complete, the cluster will be removed.