Commit 21a0dd4d authored by Jonas Kaufmann's avatar Jonas Kaufmann Committed by Antoine Kaufmann
Browse files

orchestration.rst: pass over existing content

parent 756f34d9
...@@ -28,11 +28,11 @@ SimBricks Orchestration ...@@ -28,11 +28,11 @@ SimBricks Orchestration
################################### ###################################
Our orchestration framework replaces hand-crafted scripts for setting up and Our orchestration framework replaces hand-crafted scripts for setting up and
running experiments. Instead, they are described in a declarative fashion. The running experiments. Instead, experiments are described in a declarative
orchestration framework then takes care of the details managing launching the fashion. The orchestration framework then takes care of the details, manages
respective component simulators, setting up the SimBricks communication channels launching the respective component simulators, sets up the SimBricks
between them, and monitoring their execution. All output is collected in a JSON communication channels between them, and monitors their execution. All output is
file, which allows post-processing afterwards. collected in a JSON file, which allows easy post-processing afterwards.
****************************** ******************************
Concepts Concepts
...@@ -44,11 +44,12 @@ which we now introduce. ...@@ -44,11 +44,12 @@ which we now introduce.
Experiments Experiments
=========== ===========
An *experiment* defines which component simulators to run, how they are An *experiment* defines which component simulators to run and how they are
connected, and which workload is executed. To define an experiment, instantiate connected. To define one, instantiate the class
the class :class:`~simbricks.orchestration.experiments.Experiment` in your own :class:`~simbricks.orchestration.experiments.Experiment` in your own Python
Python module, which has member functions to further define the component module, which has member functions to further define the component simulators to
simulators to run. SimBricks comes with many pre-defined experiments, which can serve as starting guides and are located in the repository under ``experiments/pyexps``. run. SimBricks comes with many pre-defined experiments, which can serve as
starting guides and are located in the repository under ``experiments/pyexps``.
.. autoclass:: simbricks.orchestration.experiments.Experiment .. autoclass:: simbricks.orchestration.experiments.Experiment
:members: add_host, add_pcidev, add_nic, add_network :members: add_host, add_pcidev, add_nic, add_network
...@@ -58,86 +59,80 @@ Runs ...@@ -58,86 +59,80 @@ Runs
Experiments can be executed multiple times, for example, to gain statistical Experiments can be executed multiple times, for example, to gain statistical
insights when including a random or non-deterministic component. We call each insights when including a random or non-deterministic component. We call each
execution one *run* of the experiment. Each run produces its own output JSON execution a *run* of the experiment. Each run produces its own output JSON file.
file. The file name includes the number of the run. The file name includes the number of the run.
The number of runs can be specified when invoking the orchestration framework, The number of runs can be specified when invoking the orchestration framework,
see :ref:`sec-command-line`. When using simulator checkpointing, we use one run see :ref:`sec-command-line`. When using simulator checkpointing, we use one run
to boot the simulator and take the checkpoint, and a second one to execute the to boot the simulator and take the checkpoint, and a second one to carry out the
actual experiment. This is the reason for two output JSON files being produced. actual experiment. This is the reason for two output JSON files being produced
For more information, see :ref:`sec-checkpointing`. in this case. For more information, see :ref:`sec-checkpointing`.
Component Simulators Component Simulators
==================== ====================
SimBricks provides multiple already implemented component simulators, which SimBricks comes with multiple, ready-to-use component simulators for your
can be used in experiments. This selection includes host, NIC, network, and PCI experiments in :mod:`simbricks.orchestration.simulators`. These include host,
device simulators. Each simulator is implemented in a class deriving from NIC, network, and PCIe device simulators. On the orchestration side, each
simulator is implemented in a class deriving from
:class:`~simbricks.orchestration.simulators.Simulator`, which provides the :class:`~simbricks.orchestration.simulators.Simulator`, which provides the
necessary commands and arguments for its execution and for specifying the necessary commands for their execution. We also offer more specialized base
SimBricks communication channel to connect to. We also offer more specialized classes for the different component types, which implement common member
base classes for the different component types, which implement common member functions, for example, to connect NICs or network component simulators to a
functions, for example, add connected NICs or network component simulators to a host simulator.
host component simulator. Every already implemented component simulator can be
found in the module. :mod:`simbricks.orchestration.simulators`.
.. automodule:: simbricks.orchestration.simulators .. automodule:: simbricks.orchestration.simulators
.. autoclass:: simbricks.orchestration.simulators.Simulator .. autoclass:: simbricks.orchestration.simulators.Simulator
:members: resreq_cores, resreq_mem, prep_cmds, run_cmd, dependencies :members: prep_cmds, run_cmd, resreq_cores, resreq_mem
.. autoclass:: simbricks.orchestration.simulators.HostSim .. autoclass:: simbricks.orchestration.simulators.HostSim
:members: add_pcidev, add_nic, add_netdirect :members: sync_mode, sync_period, pci_latency, add_pcidev, add_nic, add_netdirect
:show-inheritance:
.. autoclass:: simbricks.orchestration.simulators.NICSim
:members: set_network .. autoclass:: simbricks.orchestration.simulators.NetSim
:members: sync_mode, sync_period, eth_latency, connect_network
.. autoclass:: simbricks.orchestration.simulators.NetSim :show-inheritance:
:members: connect_network
.. autoclass:: simbricks.orchestration.simulators.PCIDevSim
.. autoclass:: simbricks.orchestration.simulators.PCIDevSim :members: sync_mode, sync_period, pci_latency
:show-inheritance:
.. _sec-node-config: .. autoclass:: simbricks.orchestration.simulators.NICSim
:members: eth_latency, set_network
Node Configuration :show-inheritance:
==================
.. _sec-node_app_config:
The configuration and workload to run on individual host simulators or, more
generally, nodes that should run in the experiment, are defined using the *******************
classes :class:`~simbricks.orchestration.nodeconfig.NodeConfig` and Node and App Config
:class:`~simbricks.orchestration.nodeconfig.AppConfig`, respectively. *******************
:class:`~simbricks.orchestration.nodeconfig.NodeConfig` defines, for example, To configure the workload and the software environment of nodes, use the classes
the networking configuration like IP address and subnet mask, how much system :class:`~simbricks.orchestration.nodeconfig.NodeConfig` and
memory the node has, and which disk image to run. The latter can be used, for :class:`~simbricks.orchestration.nodeconfig.AppConfig`. The former is passed to
example, to run a specific version of the Linux kernel on a node. You can find every host simulator and defines, for example, the networking configuration like
more information on this in the :ref:`next section <sec-howto-custom_image>`. IP address and subnet mask, how much system memory the node has, but also which
:class:`~simbricks.orchestration.nodeconfig.NodeConfig` contains an attribute disk image to run. You can read more about the latter under
for a :class:`~simbricks.orchestration.nodeconfig.AppConfig`. :ref:`sec-howto-custom_image`.
The :class:`~simbricks.orchestration.nodeconfig.NodeConfig` contains an
attribute for an instance of
:class:`~simbricks.orchestration.nodeconfig.AppConfig`, which defines the
workload or the concrete commands that are executed on the node. You can also
override :meth:`~simbricks.orchestration.nodeconfig.AppConfig.config_files` to
specify additional files to be copied into the host. These are specified as key
value pairs, where the key represents the path/filename inside the simulated
guest system and the value is an IO handle of the file to be copied over.
.. automodule:: simbricks.orchestration.nodeconfig .. automodule:: simbricks.orchestration.nodeconfig
.. autoclass:: simbricks.orchestration.nodeconfig.NodeConfig .. autoclass:: simbricks.orchestration.nodeconfig.NodeConfig
:members: ip, prefix, mtu, cores, memory, disk_image, app, run_cmds, cleanup_cmds, config_files :members: ip, prefix, mtu, cores, memory, disk_image, app, run_cmds,
cleanup_cmds, config_files
.. _sec-app-config:
Application Configuration
-------------------------
The class :class:`~simbricks.orchestration.nodeconfig.AppConfig` offers member
functions to define the concrete commands to run on the node. It also provides a
member function
:meth:`~simbricks.orchestration.nodeconfig.AppConfig.config_files` to specify
additional files to be made available on the host, which are specified as key
value pairs, where the key represents the filename inside the simulated guest
system and the value is an IO handle to the file on the host running the
simulators.
.. autoclass:: simbricks.orchestration.nodeconfig.AppConfig .. autoclass:: simbricks.orchestration.nodeconfig.AppConfig
:members: run_cmds, config_files :members: run_cmds, config_files
.. _sec-command-line: .. _sec-command-line:
...@@ -153,9 +148,9 @@ practice, running experiments will look similar to this: ...@@ -153,9 +148,9 @@ practice, running experiments will look similar to this:
.. code-block:: bash .. code-block:: bash
$ python3.10 run.py --verbose --force pyexps/qemu_i40e_pair.py $ python run.py --verbose --force pyexps/simple_ping.py
# only available inside docker images # only available inside docker images
$ simbricks-run --verbose --force qemu_i40e_pair.py $ simbricks-run --verbose --force pyexps/simple_ping.py
Here are all the command line arguments for the ``experiments/run.py`` script: Here are all the command line arguments for the ``experiments/run.py`` script:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment