Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mermaid.js diagram styling in docs #15811

Merged
merged 2 commits into from
Oct 28, 2024
Merged
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
42 changes: 20 additions & 22 deletions docs/3.0/deploy/infrastructure-concepts/work-pools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,38 +51,36 @@ deployment that is polled by a worker and executes a flow run based on that depl
```mermaid
%%{
init: {
'theme': 'base',
'theme': 'neutral',
'themeVariables': {
'fontSize': '19px'
'margin': '10px'
}
}
}%%

flowchart LR
F("<div style='margin: 5px 10px 5px 5px;'>Flow Code</div>"):::yellow -.-> A("<div style='margin: 5px 10px 5px 5px;'>Deployment Definition</div>"):::gold
subgraph Server ["<div style='width: 150px; text-align: center; margin-top: 5px;'>Prefect API</div>"]
D("<div style='margin: 5px 10px 5px 5px;'>Deployment</div>"):::green

B(Deployment Definition)

subgraph Server [Prefect API]
C(Deployment)
end
subgraph Remote Storage ["<div style='width: 160px; text-align: center; margin-top: 5px;'>Remote Storage</div>"]
B("<div style='margin: 5px 6px 5px 5px;'>Flow</div>"):::yellow

subgraph Remote Storage [Remote Storage]
D(Flow Code)
end
subgraph Infrastructure ["<div style='width: 150px; text-align: center; margin-top: 5px;'>Infrastructure</div>"]
G("<div style='margin: 5px 10px 5px 5px;'>Flow Run</div>"):::blue

E(Worker)

subgraph Infrastructure [Infrastructure]
F((Flow Run))
end

A --> D
D --> E("<div style='margin: 5px 10px 5px 5px;'>Worker</div>"):::red
B -.-> E
A -.-> B
E -.-> G

classDef gold fill:goldenrod,stroke:goldenrod,stroke-width:4px,color:black
classDef yellow fill:gold,stroke:gold,stroke-width:4px,color:black
classDef gray fill:lightgray,stroke:lightgray,stroke-width:4px
classDef blue fill:blue,stroke:blue,stroke-width:4px,color:white
classDef green fill:green,stroke:green,stroke-width:4px,color:white
classDef red fill:red,stroke:red,stroke-width:4px,color:white
classDef dkgray fill:darkgray,stroke:darkgray,stroke-width:4px,color:white
B --> C
B -.-> D
C --> E
D -.-> E
E -.-> F
```

### Work pool configuration
Expand Down
27 changes: 17 additions & 10 deletions docs/3.0/deploy/infrastructure-concepts/workers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,24 @@ As a result, when deployments are assigned to a work pool, you know in which exe
The following diagram summarizes the architecture of a worker-based work pool deployment:

```mermaid
graph TD
%%{
init: {
'theme': 'neutral',
'themeVariables': {
'margin': '10px'
}
}
}%%

flowchart TD
subgraph your_infra["Your Execution Environment"]
worker["Worker"]
subgraph flow_run_infra[Flow Run Infra]
flow_run_a(("Flow Run A"))
end
subgraph flow_run_infra_2[Flow Run Infra]
flow_run_b(("Flow Run B"))
end
subgraph flow_run_infra[Infrastructure]
flow_run_a(("Flow Run A"))
end
subgraph flow_run_infra_2[Infrastructure]
flow_run_b(("Flow Run B"))
end
end

subgraph api["Prefect API"]
Expand All @@ -33,9 +42,7 @@ graph TD
worker --> |creates| flow_run_infra_2
```

<Tip>
Notice above that the worker is in charge of provisioning the _flow run infrastructure_.
</Tip>
The worker is in charge of provisioning the _flow run infrastructure_.

### Worker types

Expand Down
53 changes: 23 additions & 30 deletions docs/integrations/prefect-aws/ecs_guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,48 +20,41 @@ For details on how workers and work pools are implemented for ECS, see the diagr
```mermaid
%%{
init: {
'theme': 'base',
'theme': 'neutral',
'themeVariables': {
'primaryColor': '#2D6DF6',
'primaryTextColor': '#fff',
'lineColor': '#FE5A14',
'secondaryColor': '#E04BF0',
'tertiaryColor': '#fff'
'margin': '10px'
}
}
}%%
graph TB

subgraph ecs_cluster[ECS cluster]
subgraph ecs_service[ECS service]
td_worker[Worker task definition] --> |defines| prefect_worker((Prefect worker))
end
prefect_worker -->|kicks off| ecs_task
fr_task_definition[Flow run task definition]

flowchart TB
subgraph ecs_cluster[ECS Cluster]
subgraph ecs_service[ECS Service]
td_worker[Worker Task Definition] --> |defines| prefect_worker[Prefect Worker]
end

subgraph ecs_task["ECS task execution"]
style ecs_task text-align:center,display:flex
prefect_worker -->|kicks off| ecs_task

fr_task_definition[Flow Run Task Definition]

subgraph ecs_task[ECS Task Execution]
flow_run((Flow Run))
end

flow_run((Flow run))
fr_task_definition -->|defines| ecs_task
end

subgraph prefect_cloud[Prefect Cloud]
work_pool[ECS Work Pool]
end
fr_task_definition -->|defines| ecs_task
end

subgraph prefect_cloud[Prefect Cloud]
subgraph prefect_workpool[ECS work pool]
workqueue[Work queue]
subgraph github[ECR]
flow_code["Flow Code"]
end
end

subgraph github["ECR"]
flow_code{{"Flow code"}}
end
flow_code --> |pulls| ecs_task
prefect_worker -->|polls| workqueue
prefect_workpool -->|configures| fr_task_definition

flow_code --> |pulls| ecs_task
prefect_worker -->|polls| work_pool
work_pool -->|configures| fr_task_definition
```

## ECS and Prefect
Expand Down
2 changes: 0 additions & 2 deletions scripts/generate_sdk_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ def main():
continue
modules.append(submodule)

print(modules)

package_docs = docs_path() / "mkdocs"

for module in sorted(modules):
Expand Down
Loading