Skip to content

Commit 31aaab0

Browse files
author
Filip Čúzy
authored
Updated documentation (#2)
* Documentation Update Signed-off-by: Filip Čúzy [email protected]
1 parent 9b88e09 commit 31aaab0

File tree

19 files changed

+676
-512
lines changed

19 files changed

+676
-512
lines changed

CNF-INDEX.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
Indexes (IDs) registry
22
============================================
33

4-
For integration with StoneWork it is required that each CNF has a unique
5-
identifier. It is recommended for the index to be assigned statically so
4+
For an integration with StoneWork, it is **required** that each CNF has a unique
5+
identifier. It is recommended for the index to be assigned statically, so
66
that the assignment is deterministic and remains the same between deployment
7-
restarts. The following table contains indexes reserved by organizations.
7+
restarts.
8+
9+
The following table contains indexes reserved by organizations.
810
You can reserve your own range by creating a pull request.
911

1012

README.md

Lines changed: 98 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,83 @@
1-
StoneWork, high-performance dataplane, modular control-plane solution
2-
=====================================================================
1+
# StoneWork
32

4-
StoneWork is used by PANTHEON.tech to integrate its CNFs on top of a single shared
5-
[FD.io VPP][VPP] data-plane instance to achieve the best possible resource
6-
utilization. This network appliance, however, is not a step back from
7-
distributed chained/meshed microservices to the monolith architecture. Instead,
8-
the integration is dynamic, based on container orchestration, CNF discovery,
9-
sharing of network namespaces and re-use of data paths for packet punting
10-
between CNFs.
3+
A **high-performance** data plane, **modular** control plane solution.
4+
5+
StoneWork is used by PANTHEON.tech to integrate [its cloud-native network functions][cdnf-io] on top of a single shared
6+
[FD.io VPP][VPP] data plane instance, to achieve the *best possible* resource
7+
utilization.
8+
9+
This network appliance, however, is not a step back from distributed chained/meshed microservices, to monolithic architecture.
10+
11+
Instead, the integration is:
12+
- Dynamic
13+
- Based on container orchestration
14+
- CNF discovery
15+
- Sharing of network namespaces and
16+
- Re-use of data paths for packet punting between CNFs
1117

1218

1319
Features
1420
--------
1521

16-
* High-performance [VPP][VPP]-based data-plane
22+
* High-performance [VPP][VPP]-based **data plane**
1723
* Management agent build on top of [Ligato VPP-Agent][ligato-vpp-agent]
18-
* Suitable for both cloud and bare-metal deployments
19-
* Can be deployed as either multiple interconnected instances (service function
20-
chaining), or a set of control/management plane microservices that use a
24+
* Suitable for both **cloud & bare-metal** deployments
25+
* Can be deployed as either *multiple* interconnected instances (service function
26+
chaining), or *a set* of control/management plane microservices that use a
2127
single VPP instance for data plane (this is a trade-off between flexibility
2228
and resource utilization)
23-
* Northbound APIs are modeled with protobuf and accessible over `gRPC`, `REST`,
29+
* **Northbound APIs** are modeled with protobuf and accessible over `gRPC`, `REST`,
2430
`K8s CRD`or through a key-value DB (`etcd`, `redis`, ...)
25-
* Wide-range of networking features natively implemented in VPP, e.g.:
31+
* Wide-range of **networking features**, natively implemented in VPP, e.g.:
2632
* High-performance device drivers (DPDK, RDMA, virtio)
2733
* Routing, switching
2834
* Tunneling (VXLAN, GRE, IP-IP)
2935
* ACL-based filtering and routing
3036
* NAT44, NAT64
3137
* Segment routing
32-
* VPN (wireguard, IPSec)
38+
* VPN (Wireguard, IPSec)
3339
* Bridge domains, VRFs (multi-tenancy)
34-
* Management of features provided by the Linux network stack:
40+
* **Management features** provided by the Linux network stack:
3541
* Routes, ARPs
3642
* iptables
3743
* Namespaces, VRFs (multi-tenancy)
38-
* Dynamically (at run-time) extensible with additional features provided by
39-
[CNFs from our offering][cdnf-io]
40-
44+
* Dynamically (at run-time) **extensible** with additional features provided by
45+
[CNFs from PANTHEON.tech][cdnf-io]
4146

4247
Examples
4348
--------
4449

45-
Before using StoneWork we recommend reading in this README and related
46-
documentation in the StoneWork distribution folder about how to install and
47-
configure StoneWork. If you are new to StoneWork, it may be easier to first
50+
Before using StoneWork, we recommend reading this README and related
51+
documentation in the StoneWork [distribution folder][docs].
52+
53+
If you are **new to StoneWork**, it may be easier to first
4854
explore and run the provided examples, rather than trying to create deployment
4955
manifests from scratch.
5056

51-
Examples of deployment manifests and configurations for various use-cases can be
52-
found under the [examples sub-directory][examples].\ The [Getting Started]
53-
[getting-started] example will guide you through your first StoneWork
57+
Examples of deployment manifests and configurations for various use-cases can be found under the [examples sub-directory][examples].
58+
59+
The [Getting Started][getting-started] example will guide you through your first StoneWork
5460
deployment.
5561

5662

5763
Configuration
5864
-------------
5965

60-
Configuration for StoneWork is twofold:
66+
Configuration for StoneWork consists of two tasks:
6167

6268
#### 1. VPP Startup Configuration
6369

64-
The VPP Startup Configuration comprises configuration options which are set
65-
before VPP is started. They cannot be changed at the run-time, either by a
70+
The VPP Startup Configuration comprises configuration options, which are set
71+
before VPP is started. They *cannot* be changed at the run-time, either by a
6672
management plane API or the VPP CLI). For StoneWork, the default VPP startup
67-
configuration file is packaged in the image under `/etc/vpp/vpp.conf`. Some of
68-
the [examples][examples] override the default configuration with a customized
73+
configuration file is packaged in the image, under `/etc/vpp/vpp.conf`.
74+
75+
Some of the [examples][examples] override the default configuration with a customized
6976
version of `vpp.conf`mounted into the container using volumes. Typically, the
7077
only configuration section that may require customization is the `dpdk` stanza,
71-
where PCI addresses of NICs to be used by VPP should be listed. Run the
72-
`lshw-class network -businfo` command to obtain the available network devices
78+
where PCI addresses of NICs, used by VPP, should be listed.
79+
80+
Run the `lshw-class network -businfo` command to view the available network devices
7381
and their respective PCI addresses. For example, if the PCI addresses of
7482
interfaces were `0000:00:08.0` and `0000:00:09.0` (e.g. inside and outside
7583
network), then the `dpdk` configuration would be:
@@ -83,7 +91,7 @@ dpdk {
8391
}
8492
}
8593
```
86-
Interface names can be selected arbitrarily, for example as `eth0` and `eth1`'
94+
Interface names can be selected arbitrarily, for example `eth0` and `eth1`'
8795
in the above example.
8896

8997
More information about attaching physical interfaces into VPP can be found
@@ -92,59 +100,72 @@ More information about attaching physical interfaces into VPP can be found
92100
#### 2. Protobuf-modeled Network Configuration
93101

94102
StoneWork's network configuration (VPP, Linux, CNFs) is modeled using
95-
Google Protocol Buffers. A summary of all configuration items and their
96-
attributes with descriptions can be found [here][config] (in markdown; also
97-
available as a single [PDF document][config-pdf]). Provided is also a
98-
[JSON Schema][config-jsonschema] that can be used to validate input
99-
configuration before it is submitted. Some text editors, for example
103+
Google Protocol Buffers.
104+
105+
A summary of all configuration items and their
106+
attributes, with descriptions, can be found [here][config] (in markdown; also
107+
available as a single [PDF document][config-pdf]).
108+
109+
A [JSON Schema][config-jsonschema] is provided as well, and can be used to validate input
110+
configuration before it is submitted.
111+
112+
Some text editors, for example
100113
[VS Code][vscode-jsonschema], can even load the Schema and provide
101114
autocomplete suggestions based on it, thus making the process of preparing
102-
input configuration a lot easier. The original protobuf files from which the
103-
documentation and schema were generated can be found in the `/api` folder inside
115+
input configuration a lot easier.
116+
117+
The original protobuf files, from which the
118+
documentation and schema were generated, can be found in the `/api` folder inside
104119
the StoneWork distribution. There is also the `/api/models.spec.yaml` file,
105-
which contains one yaml document with metadata for every configuration model.
106-
These metadata are used to associate configuration model with corresponding
120+
which contains one ZAML document with metadata for every configuration model.
121+
122+
These metadata are used to associate a configuration model with the corresponding
107123
protobuf definitions.
108124

109-
Network configuration is submitted into the control-plane agent either via
110-
[CLI][agentctl] (yaml formatted), written into a key-value datastore (e.g.
111-
`etcd`; JSON-formatted) or applied programmatically over gRPC (serialized by
125+
Network configuration is submitted into the control-plane agent either via:
126+
127+
- a **[CLI][agentctl]** (YAML formatted), written into a key-value datastore (e.g.
128+
`etcd`; JSON-formatted)
129+
130+
- or applied programmatically over **gRPC** (serialized by
112131
protobuf) or REST (JSON) APIs. The initial configuration that should be applied
113132
immediately after StoneWork starts up can be mounted into the container under
114133
`/etc/stonework/config/day0-config.yaml` (YAML formatted).
115134

116135
Each of the attached [examples][examples] has a sub-directory named `config`,
117136
where you can find configuration stanzas to learn from. Each example contains
118-
the startup configuration `day0-config.yaml`. Additional attached `*.yaml` files
119-
are used to show how run-time configuration can be modified over CLI. Please
120-
refer to each example's `EXAMPLE.md` file for more information.
137+
the startup configuration `day0-config.yaml`.
138+
139+
Additional `*.yaml` files are used to show how run-time configuration can be modified over CLI. Please
140+
refer to each examples `EXAMPLE.md` file for more information.
121141

122142

123143
Installation
124144
------------
125145

126-
The following steps will guide you through the StoneWork installation process.
127-
The distribution package contains the StoneWork docker image (`stonework.image`),
146+
The following steps will guide you through the StoneWork **installation process**.
147+
The distribution package contains the **StoneWork Docker image** (`stonework.image`),
128148
documentation (`*.md`) and some examples to get you started.
129149

130150
#### Requirements
131151

132-
1. StoneWork requires a Ubuntu VM or a bare-metal server running Ubuntu,
133-
preferably version 18.04 (Bionic Beaver).
152+
1. StoneWork requires an *Ubuntu VM** or a **bare-metal server** running Ubuntu, preferably version **18.04 (Bionic Beaver)**.
134153

135154

136-
2. Next, Docker and Docker-compose must be installed.
155+
2. Next, Docker and docker-compose must be installed.
137156

138157
Install with:
139158
```
140159
$ apt-get install docker.io docker-compose
141160
```
142161

143-
3. **[For DPDK only]**\
162+
3. **(DPDK Only)** Install/Enable Drivers
163+
144164
Depending on the type of NICs that VPP of StoneWork should bind to, you may
145-
have to install/enable the corresponding drivers. For example, in a VM
146-
environment, the [Virtual Function I/O (VFIO)][vfio] is preferred over the
147-
UIO framework for better performance and more security. In order to load VFIO
165+
have to install/enable the corresponding drivers.
166+
167+
For example, in a VM environment, the [Virtual Function I/O (VFIO)][vfio] is preferred over the
168+
UIO framework for better performance and more security. In order to load a VFIO
148169
driver, run:
149170
```
150171
$ modprobe vfio-pci
@@ -159,15 +180,17 @@ documentation (`*.md`) and some examples to get you started.
159180
DPDK (used by VPP), can be found [here][dpdk-linux-drivers].
160181

161182

162-
4. **[For DPDK only]**\
183+
4. **(DPDK Only)** Check Network Interfaces
184+
163185
Make sure that the network interfaces are not already used by the Linux
164186
kernel, or else VPP/DPDK will not be able to grab them. Run `ip link set
165187
dev {device} down` for each device to un-configure it from Linux. Preferably
166188
disable the interfaces using configuration files to make the changes
167189
persistent (e.g. inside `/etc/network/interfaces`).
168190

169191

170-
5. **[For DPDK only]**\
192+
5. **(DPDK Only)** Huge Pages
193+
171194
In order to optimize memory access, VPP/DPDK uses [Huge Pages][hugepages],
172195
which have to be allocated before deploying StoneWork.
173196
For example, to allocate 512 Huge Pages (1024MiB memory for default 2M
@@ -181,7 +204,7 @@ documentation (`*.md`) and some examples to get you started.
181204

182205

183206
6. Finally, the StoneWork image has to be loaded so that
184-
Docker/DockerCompose/K8s is able to provision a container instance. Run:
207+
Docker/docker-compose/K8s is able to provision a container instance. Run:
185208
```
186209
$ docker load <./stonework.image
187210
```
@@ -192,12 +215,15 @@ Deployment
192215

193216
StoneWork is deployed using [Docker Compose][docker-compose] version 3.3 or
194217
newer. StoneWork itself is only a single container (with VPP and StoneWork agent
195-
inside), but every CNF that is deployed alongside it runs in a separate
196-
container, hence the use of Compose. The following is a template of
218+
inside), but every CNF that is deployed alongside it runs in a **separate
219+
container**, hence the use of Compose.
220+
221+
The following is a template for the
197222
`docker-compose.yaml` file, used to describe deployment in the language of
198-
Docker Compose. The template contains detailed comments that explain the meaning
199-
of attributes contained in the template and how they relate to StoneWork. Angle
200-
brackets are used to mark placeholders that have to be replaced with appropriate
223+
Docker Compose. The template contains detailed comments, that explain the meaning
224+
of attributes contained in the template and how they work in StoneWork.
225+
226+
Angle brackets are used to mark placeholders that have to be replaced with appropriate
201227
actual values in the target deployment.
202228

203229
```yaml
@@ -294,11 +320,10 @@ services:
294320
Development
295321
-----------
296322

297-
Build instruction for StoneWork can be found [here][build].\
298-
Architecture of StoneWork is described in detail [here][architecture].\
299-
A guide on how to make CNF compatible with StoneWork can be found [here][cnf-how-to].\
300-
Documentation about StoneWork GNS3 VM development is [here][gns3-vm-docs].
301-
323+
- **Build**: Build instruction for StoneWork can be found [here][build].
324+
- **Architecture**: StoneWork architecture is described in detail [here][architecture].
325+
- **CNF Compatibility**: A guide on how to make CNF compatible with StoneWork can be found [here][cnf-how-to].
326+
- **GNS3 & StoneWork**: StoneWork GNS3 VM development documentation is [here][gns3-vm-docs].
302327

303328
[architecture]: docs/ARCHITECTURE.md
304329
[build]: docs/BUILD.md
@@ -311,8 +336,8 @@ Documentation about StoneWork GNS3 VM development is [here][gns3-vm-docs].
311336
[vpp]: https://wiki.fd.io/view/VPP
312337
[ligato-vpp-agent]: https://github.com/ligato/vpp-agent
313338
[cdnf-io]: https://cdnf.io/cnf_list/
314-
[examples]: examples/INDEX.md
315-
[getting-started]: examples/getting-started/EXAMPLE.md
339+
[examples]: examples/README.md
340+
[getting-started]: examples/getting-started/README.md
316341
[agentctl]: https://docs.ligato.io/en/latest/user-guide/agentctl/
317342
[vpp-pci]: https://wiki.fd.io/view/VPP/How_To_Connect_A_PCI_Interface_To_VPP
318343
[vfio]: https://www.kernel.org/doc/Documentation/vfio.txt

docs/ARCHITECTURE.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,31 @@ CNF Integration
55
---------------
66

77
Each CNF remains to be packaged and delivered as a single docker image. The same image can be used to deploy the
8-
CNF either as **Standalone** (i.e. inside a chain/mesh of CNFs) or as a **StoneWork Module** or SW-Module for short.
8+
CNF either as **Standalone** (i.e. inside a chain/mesh of CNFs) or as a **StoneWork Module** or *SW-Module* for short.
9+
910
Simply by setting the environment variable `CNF_MODE` to `STANDALONE` or `STONEWORK_MODULE`, the CNF will either start
1011
its own instance of VPP or connect with the single shared VPP instance managed by Stonework, respectively.
1112

12-
StoneWork image itself consists of VPP (from upstream with some additional PANTHEON.tech plugins) and a control agent,
13-
which is effectively [Ligato VPP-Agent][ligato-vpp-agent] extended with only two additional plugins --
14-
[PuntManager][punt-manager-plugin] and [CNFRegistry][cnf-registry-plugin], working together to find and dynamically
15-
load all enabled CNFs.
13+
The StoneWork image itself consists of VPP (from upstream, with some additional PANTHEON.tech plugins) and a control agent,
14+
which is effectively [Ligato VPP-Agent][ligato-vpp-agent], extended with two additional plugins:
15+
16+
- [PuntManager][punt-manager-plugin]
17+
- [CNFRegistry][cnf-registry-plugin],
18+
19+
Both working together to find and dynamically load all enabled CNFs.
20+
1621
Neither control-plane nor data-plane features of any CNF are built-in to the StoneWork image directly. Not even
1722
the protobuf configuration models. This means that the StoneWork image remains quite small and doesn't have
18-
to be rebuilt even if a new CNF feature is added into the StoneWork. Instead every CNF runs as a separate container
19-
from its own image, running its own control-plane agent that communicates with StoneWork to cooperatively
20-
manage the single shared data-plane. All (enabled) CNFs and the StoneWork itself are typically orchestrated by
21-
docker-compose. To enable a new CNF feature is then as easy as to add a container entry into docker-compose.yaml
23+
to be rebuilt, even if a new CNF feature is added into StoneWork.
24+
25+
Instead, every CNF runs as a separate container from its own image, running its own control-plane agent that communicates with StoneWork to cooperatively
26+
manage the single, shared data-plane.
27+
28+
All (enabled) CNFs and the StoneWork itself are typically orchestrated by
29+
*docker-compose*. To enable a new CNF feature is then as easy, as to add a container entry into *docker-compose.yaml*
2230
for the CNF, restart the deployment and let the StoneWork to discover it.
23-
If instead for a particular deployment a given CNF is never used, it doesn't have to be mentioned in docker-compose.yaml
31+
32+
If a given CNF is never used, it doesn't have to be mentioned in *docker-compose.yaml*
2433
and the image itself does not have to be shipped to the target device. This means that only CNFs that are actually
2534
needed will use the system resources.
2635

@@ -29,7 +38,7 @@ learn their configuration models over gRPC and prepare KVDescriptors for them th
2938
between StoneWork and CNFs. [PuntManager][punt-manager-plugin] then allows to establish shared or separate data paths
3039
for punted packets (i.e. packets received by VPP but forwarded to the data-plane of a CNF for further processing).
3140

32-
The following diagram visually depicts StoneWork deployment consisting of one StoneWork container and one container
41+
The following diagram visually depicts StoneWork deployment, consisting of one StoneWork container and one container
3342
per CNF. The established data path links are marked with blue color, while control-plane links are orange colored.
3443
The proxying of CRUD operations is highlighted using the red color:
3544

0 commit comments

Comments
 (0)