Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions docs/architecture/at-a-glance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Workflow Orchestrator At A Glance

!!! info
This article is for potential adopters considering Workflow Orchestrator (WFO) for their organization.

Without going into implementation details, this highlights the experience of a user (a network operator) as they set up a core link between two nodes.
This guide also favors high-level terminology over the finer semantics of WFO's database models.

All screenshots are from the [example-orchestrator][example-orchestrator] project, which you can set up yourself to explore the product further.


Workflow Orchestrator is an open-source software framework written in Python.
In organizations using WFO, software teams define **products** using the framework, along with **workflows** that network operators then use to manage each product's lifecycle.

When an operator subscribes a customer to a product, they run a **create** workflow, which produces a **subscription** to that product.
That subscription can then orchestrated by the other workflows associated with its product.
For example, **validate** workflows ensure WFO's database is kept in sync with any external resources allocated to a subscription, and **terminate** workflows deprovision the subscription along with those external resources.

# Scenario: Adding a Link

Suppose that we have nodes in Amsterdam and London, and we want to establish a core link between them.

On the Subscriptions page, we can see that we already have a subscription for each node, so we create a link via the New Subscription dropdown.
![Create Core Link dropdown](../img/at-a-glance/create_core_link_dropdown.png)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe we can look into a way to allow users to click on an image so it pops out into a larger version, in some kind of modal. Currently I can only read what's on the image by right clicking and opening it in a new tab, otherwise it's just a bit too small. (I'll have a look into plugins)

Image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

#56 what do you think?


We're then taken to a form for creating the new core link.
As seen below, the form is multi-part with choices pregenerated for the fields.

In this case, the choices are generated dynamically from a Netbox inventory, and all of this is easily implemented via backend Python code. No front-end form templates were required.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

easily

If the target audience is network engineers who have never written a line of Python, they might not agree. :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ha, that's why I prefaced at the top that you should have a software team writing the backend code and network engineers touching the frontend 😜

It's kind of a weird article to write, because it's meant to be an elevator pitch for anyone in order to understand what the product is and why they would use it. Most of the document is highlighting the product from a user perspective, whereas this particular paragraph of the pitch is highlighting one way that WFO can make life easier for developers.

If we want to deemphasize the developer experience entirely, I can update accordingly.


![Create Core Link form A](../img/at-a-glance/create_core_link_form_a.png)
![Create Core Link form B](../img/at-a-glance/create_core_link_form_b.png)

After submitting each part of the form, the Create workflow is started.
A workflow is composed of multiple steps, and the status of each step is visible in the UI as it completes.
Any step that generates data can be expanded in the UI to view its output.
Below, we can see the output of the Assign IPv6 Prefix step.

![Create Core Link workflow output](../img/at-a-glance/create_core_link_output.png)

A link in the upper-right corner of the workflow output (above) takes us to the subscription we created (below.)

On the left, we can see various details about both the Core Link subscription, the ports on either end, and the nodes (also subscriptions) each port resides on.

On the right, the Actions dropdown lists the workflows available to us for further managing the subscription's lifecycle.

![Core Link subscription page](../img/at-a-glance/core_link_sub.png)

The General tab provides more extensive information about the subscription.

![Core Link subscription page general tab](../img/at-a-glance/core_link_sub_general.png)

# Additional Actions
Above, we saw the Actions available to manage a Core Link subscription after it was created.

`Modify core_link`: Users can define modify workflows to update the subscription database and/or an orchestrated external resource. Users define modify workflows for each subscription to facilitate changes mid-lifecycle.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Might be useful to emphasize that it's possible to define one modify workflow with interactive decision making in the form to decide what to actually modify, or to split it up over multiple smaller scoped modify workflows?

Edit: I see you already did this more or less towards the bottom of this section


`Validate core_link`: Users can define validation workflows to verify the data in the WFO database against the external systems it manages. An error in a validation workflow places the corresponding subscription in an Out of Sync state, which flags it for remediation and blocks its workflows. For example, if WFO manages a resource in Netbox and that resource is then edited directly in Netbox, this could be detected with a validation workflow.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Screenshot of this might be nice :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hmm, what would be best to show in the screenshot? There's no form to consider, and the step output is mostly the same.

Would you want to see a failing validate workflow step output, with highlights for the failed step and the out-of-sync pill icon?


Validation workflows are commonly run overnight using WFO's [scheduling](../../orchestrator-core/guides/tasks/) features.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe add "But schedules can be customized to run at any other time or frequency"


`Terminate core_link`: Users can define terminate workflows in order to deprovision a subscription and any resources orchestrated on its behalf. Terminated subscriptions are still accessible for reference.

Users aren't limited to these workflows.
For example, it can be helpful to create distinct modify workflows for the same product to make unrelated changes.

# Behind the Scenes

So what's actually happening behind the scenes when we run these workflows?

WFO provides none of the facilities for talking to Netbox, NSO, Ansible, etc.
These features are implemented by other packages or by the software team leveraging the framework.
Comment on lines +67 to +72

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This section could probably be expanded a little more


If you want to see the code for yourself, the above example came from the [example-orchestrator][example-orchestrator] repo.
The Core Link producted is defined by a [Product][example-core-link-product-type] and its constituent [Product Blocks][example-core-link-product-blocks], along with its [workflows][example-core-link-workflows].




[nren-wikipedia]: https://en.wikipedia.org/wiki/National_research_and_education_network
[example-orchestrator]: https://github.com/workfloworchestrator/example-orchestrator
[example-core-link-product-type]: https://github.com/workfloworchestrator/example-orchestrator/blob/main/products/product_types/core_link.py
[example-core-link-product-blocks]: https://github.com/workfloworchestrator/example-orchestrator/blob/main/products/product_blocks/core_link.py
[example-core-link-workflows]: https://github.com/workfloworchestrator/example-orchestrator/tree/main/workflows/core_link
Binary file added docs/img/at-a-glance/core_link_sub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/at-a-glance/core_link_sub_general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/at-a-glance/create_core_link_form_a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/at-a-glance/create_core_link_form_b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/at-a-glance/create_core_link_output.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ nav:
- Contact: contact.md
- Leadership: leadership.md
- Architecture:
- At A Glance: architecture/at-a-glance.md
- The Framework: architecture/framework.md
- Orchestrator UI: architecture/orchestrator-ui.md
- Input Forms: architecture/input-forms.md
Expand Down
Loading