Skip to content

Commit

Permalink
doc: add diagram with boot stages (#5539)
Browse files Browse the repository at this point in the history
SC-1835
Fixes GH-5334
  • Loading branch information
aciba90 authored Jul 24, 2024
1 parent 02beb9a commit 8ceae8b
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 7 deletions.
1 change: 1 addition & 0 deletions doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ sphinx-design
sphinx-copybutton
sphinx-notfound-page
sphinxcontrib.datatemplates
sphinxcontrib-mermaid
sphinxcontrib-spelling
1 change: 1 addition & 0 deletions doc/rtd/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"sphinx.ext.autosectionlabel",
"sphinx.ext.viewcode",
"sphinxcontrib.datatemplates",
"sphinxcontrib.mermaid",
"sphinxcontrib.spelling",
]

Expand Down
46 changes: 39 additions & 7 deletions doc/rtd/explanation/boot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,42 @@
Boot stages
***********

There are five stages to boot:
There are five stages to boot which are run seqentially: ``Detect``, ``Local``,
``Network``, ``Config`` and ``Final``

1. Detect
2. Local
3. Network
4. Config
5. Final
Visual representation of cloud-init boot stages with respect to network config
and system accessibility:

.. mermaid::

graph TB

D["<a href='#detect'>Detect</a>"] ---> L

L --> NU([Network up])
L & NU --> N
subgraph L["<a href='#local'>Local</a>"]
FI[Fetch IMDS]
end

N --> NO([Network online])
N & NO --> C
N --> S([SSH])
N --> Login([Login])

subgraph N["<a href='#network'>Network</a>"]
cloud_init_modules
end
%% cloud_config_modules

subgraph C["<a href='#config'>Config</a>"]
cloud_config_modules
end

C --> F
subgraph F["<a href='#final'>Final</a>"]
cloud_final_modules
end

.. _boot-Detect:

Expand Down Expand Up @@ -83,7 +112,7 @@ Network
+---------+--------+----------------------------------------------------------+
| runs | after local stage and configured networking is up |
+---------+--------+----------------------------------------------------------+
| blocks | as much of remaining boot as possible |
| blocks | majority of remaining boot (e.g. SSH and console login) |
+---------+--------+----------------------------------------------------------+
| modules | *cloud_init_modules* in ``/etc/cloud/cloud.cfg`` |
+---------+--------+----------------------------------------------------------+
Expand Down Expand Up @@ -111,6 +140,9 @@ necessary for cloud-init to run should not be done until after this stage.
A part-handler and :ref:`boothooks<explanation/format:\`\`cloud-boothook\`\`>`
will run at this stage.

After this stage completes, expect to be able to access the system via serial
console login or SSH.

.. _boot-Config:

Config
Expand Down

0 comments on commit 8ceae8b

Please sign in to comment.