Infrastructure work is full of moving parts: maintenance windows, migrations, staged rollouts, approval gates, and dependencies.
A Gantt chart is one of the clearest ways to answer:
- What’s the plan?
- What depends on what?
- What can run in parallel?
- Where are the risk windows?
Mermaid Gantt charts let you keep the plan in plain text so it’s easy to review, update, and keep alongside change tickets and runbooks.
This guide focuses on Mermaid features that matter for infra: phases, dependencies, milestones, critical tasks, and clear naming.
A quick refresher
Mermaid Gantt charts start with gantt.
At a minimum you define:
- a title
- a date format
- sections
- tasks
Source
|
1 2 3 4 5 6 7 8 9 10 11 12 |
gantt title Simple maintenance plan dateFormat YYYY-MM-DD section Prep Create change ticket :a1, 2025-12-24, 1d Notify stakeholders :a2, after a1, 1d section Window Perform upgrade :b1, 2025-12-27, 2h Validate :b2, after b1, 1h |
Rendered
Tip: For infra work, use sections like phases: Prep, Build, Cutover, Validation, Rollback.
1) Use task dependencies (after) to document the real order of operations
Dependencies are where Gantt charts shine: they show what must happen before something else can begin.
Example: migration with dependency chain
Source
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
gantt title Database migration (high-level) dateFormat YYYY-MM-DD section Prep Capacity review :p1, 2025-12-24, 1d Backups verified :p2, after p1, 1d Runbook reviewed :p3, after p2, 1d section Build Create new DB cluster :b1, 2025-12-27, 1d Enable replication :b2, after b1, 1d Warm up read replicas :b3, after b2, 1d section Cutover Freeze writes :c1, 2025-12-30, 2h Switch application :c2, after c1, 1h Thaw writes :c3, after c2, 30m section Validation Smoke tests :v1, after c3, 1h Monitor error budget :v2, after v1, 4h |
Rendered
2) Use milestones for “gates” (approval, change window open, go/no-go)
Milestones help readers spot the moments that matter.
Source
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
gantt title Cutover with gates dateFormat YYYY-MM-DD section Gates CAB approval :milestone, g1, 2025-12-28, 0d Window opens :milestone, g2, 2025-12-30, 0d Go/No-Go checkpoint :milestone, g3, 2025-12-30, 0d Window closes :milestone, g4, 2025-12-30, 0d section Cutover Freeze writes :c1, 2025-12-30, 2h Switch traffic :c2, after c1, 1h Validate :c3, after c2, 1h |
Rendered
Tip: Label gates with the decision they represent (e.g., “Go/No-Go”). Don’t make readers infer.
3) Show parallelism explicitly (what can run concurrently)
Infra plans often fail because “parallel tasks” were only implied.
Example: parallel prep work
Source
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
gantt title Parallel prep for rollout dateFormat YYYY-MM-DD section Prep (parallel) Update dashboards :p1, 2025-12-24, 2d Update alerts :p2, 2025-12-24, 2d Draft comms :p3, 2025-12-24, 2d Load test plan :p4, 2025-12-24, 2d section Rollout Stage to canary :r1, 2025-12-27, 1d Gradual traffic shift :r2, after r1, 2d Full rollout :r3, after r2, 1d |
Rendered
4) Use crit and done to communicate risk and progress
Mermaid Gantt supports task flags like crit (critical) and done.
Source
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
gantt title Upgrade plan (with critical path) dateFormat YYYY-MM-DD section Prep Backups verified :done, p1, 2025-12-24, 1d Confirm rollback :crit, p2, after p1, 1d section Window Apply change :crit, w1, 2025-12-27, 2h Validate :crit, w2, after w1, 1h Post-change monitoring :w3, after w2, 4h |
Rendered
Tip: In a blog post, explain what you mean by “critical” (e.g., cannot slip without moving the window).
5) A practical infra example: rolling upgrade with a maintenance window
This example mixes dependencies, milestones, and a rollback lane.
Source
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
gantt title Rolling upgrade with rollback plan dateFormat YYYY-MM-DD section Prep Confirm backups :done, p1, 2025-12-24, 1d Verify canary metrics :p2, 2025-12-24, 2d Pre-stage artifacts :p3, after p2, 1d section Window (Cutover) Window opens :milestone, g1, 2025-12-28, 0d Upgrade canary :crit, c1, 2025-12-28, 2h Observe canary :crit, c2, after c1, 2h Upgrade 25% :crit, c3, after c2, 2h Upgrade 100% :crit, c4, after c3, 2h Window closes :milestone, g2, 2025-12-28, 0d section Validation Smoke tests :v1, after c4, 1h Monitor errors & latency :v2, after v1, 6h section Rollback (if needed) Roll back canary :crit, r1, 2025-12-28, 2h Restore previous version :crit, r2, after r1, 4h |
Rendered
6) Common gotchas (and fixes)
Gotcha: mixing hours and days without stating it
Fix: pick one time scale per diagram. If you need both:
- use one chart for project timeline (days/weeks)
- one chart for maintenance window (hours)
Gotcha: too many tasks
Fix: keep the blog chart at the “narrative level” (10–20 tasks), and link to a detailed runbook elsewhere.
Gotcha: dependencies that imply impossible scheduling
Fix: if tasks share the same engineer or require the same lock, don’t place them in parallel.
7) A blog-ready checklist for Mermaid Gantt charts
Before you publish:
- Use sections as phases: Prep, Build, Cutover, Validate, Rollback.
- Name tasks with verbs:
Freeze writes,Switch traffic,Validate. - Add milestones for decision points and window boundaries.
- Use
critsparingly and define what it means. - Keep one diagram focused on one change.
Where to go next
If Gantt charts are helping you plan infra work, the next Mermaid feature to learn is GitGraph for release branching and rollout coordination—or sequence diagrams to document the exact cutover steps.




