VPP-device Draft
[csit.git] / docs / vpp-device.rst
1 VPP_Device Integration Tests
2 ============================
3
4 Abstract
5 --------
6
7 FD.io VPP software data plane technology has become very popular across
8 a wide range of VPP eco-system use cases, putting higher pressure on
9 continuous verification of VPP software quality.
10
11 This document describes a proposal for design and implementation of extended
12 continuous VPP testing by extending existing test environments.
13 Furthermore it describes and summarizes implementation details of Integration
14 and System tests platform *1-Node VPP_Device*. It aims to provide a complete
15 end-to-end view of *1-Node VPP_Device* environment in order to improve
16 extendibility and maintenance, under the guideline of VPP core team.
17
18 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
19 "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in this document are to be
20 interpreted as described in :rfc:`8174`.
21
22 Overview
23 --------
24
25 .. todo: Covert to SVG
26
27 .. image:: vpp-device.png
28
29 Physical Testbeds
30 -----------------
31
32 All :abbr:`FD.io (Fast Data Input/Ouput)` :abbr:`CSIT (Continuous System
33 Integration and Testing)` vpp-device tests are executed on physical testbeds
34 built with bare-metal servers hosted by :abbr:`LF (Linux Foundation)` FD.io
35 project. Two 1-node testbed topologies are used:
36
37 - **3-Node Topology**: Consisting of two Docker containers acting as SUTs
38   (Systems Under Test) and one Docker container as TG (Traffic Generator), all
39   connected in ring topology via physical NIC crossconnecting.
40 - **2-Node Topology**: Consisting of one Docker container acting as SUT (System
41   Under Test) and one Docker container as TG (Traffic Generator), both connected
42   in ring topology via physical NIC crossconnecting.
43
44 Current FD.io production testbeds are built with servers based on one
45 processor generation of Intel Xeons: Skylake (Platinum 8180). Testbeds built
46 with servers based on Arm processors are in the process of being added to FD.io
47 production.
48
49 Following section describe existing production 1n-skx testbed.
50
51 1-Node Xeon Skylake (1n-skx)
52 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53
54 1n-skx testbed is based on single SuperMicro SYS-7049GP-TRT server equipped with
55 two Intel Xeon Skylake Platinum 8180 2.5 GHz 28 core processors. Physical
56 testbed topology is depicted in a figure below.
57
58 .. only:: latex
59
60     .. raw:: latex
61
62         \begin{figure}[H]
63             \centering
64                 \graphicspath{{../_tmp/src/introduction/}}
65                 \includegraphics[width=0.90\textwidth]{testbed-1n-skx}
66                 \label{fig:testbed-1n-skx}
67         \end{figure}
68
69 .. only:: html
70
71     .. figure:: testbed-1n-skx.svg
72         :alt: testbed-1n-skx
73         :align: center
74
75 Logical view is depicted in a figure below.
76
77 .. only:: latex
78
79     .. raw:: latex
80
81         \begin{figure}[H]
82             \centering
83                 \graphicspath{{../_tmp/src/introduction/}}
84                 \includegraphics[width=0.90\textwidth]{logical-1n-skx}
85                 \label{fig:logical-1n-skx}
86         \end{figure}
87
88 .. only:: html
89
90     .. figure:: logical-1n-skx.svg
91         :alt: logical-1n-skx
92         :align: center
93
94 Server is populated with the following NIC models:
95
96 #. NIC-1: x710-DA4 4p10GE Intel.
97 #. NIC-2: x710-DA4 4p10GE Intel.
98 #. NIC-3: x710-DA4 4p10GE Intel.
99 #. NIC-4: x710-DA4 4p10GE Intel.
100 #. NIC-5: x710-DA4 4p10GE Intel.
101 #. NIC-6: x710-DA4 4p10GE Intel.
102
103 All Intel Xeon Skylake servers run with Intel Hyper-Threading enabled,
104 doubling the number of logical cores exposed to Linux, with 56 logical
105 cores and 28 physical cores per processor socket.
106
107 NIC interfaces are shared using Linux vfio_pci and VPP VF drivers:
108
109 - DPDK VF driver,
110 - Fortville AVF driver.
111
112 Provided Intel x710 4p10GE NICs suppport 32 VFs per interface, 128 per NIC.
113
114 Complete 1n-skx testbeds specification is available on
115 `CSIT LF Testbeds <https://wiki.fd.io/view/CSIT/Testbeds:_Xeon_Skx,_Arm,_Atom.>`_
116 wiki page.
117
118 Total of two 1n-skx testbeds are in operation in FD.io labs.
119
120 1-Node ARM (1n-arm)
121 ~~~~~~~~~~~~~~~~~~~
122
123 .. todo: Add specification of 1n-arm
124
125 Containers
126 ----------
127
128 It was agreed on :abbr:`TWS (Technical Work Stream)` call to continue with
129 Ubuntu 18.04 LTS as a baseline system with OPTIONAL extend to Centos 7 and
130 SuSE per demand [tws]_.
131
132 All :abbr:`DCR (Docker container)` images are REQUIRED to be hosted on Docker
133 registry available from LF network, publicly available and trackable. For
134 backup, tracking and contributing purposes all Dockerfiles (including files
135 needed for building container) MUST be available and stored in [fdiocsitgerrit]_
136 repository under appropriate folders. This allows the peer review process to be
137 done for every change of infrastructure related to scope of this document.
138 Currently only **csit-shim-dcr** and **csit-sut-dcr** containers will be stored
139 and maintained under CSIT repository by CSIT contributors.
140
141 At the time of designing solution described in this document the interconnection
142 between [dockerhub]_ and  [fdiocsitgerrit]_ for automated build purposes and
143 image hosting cannot be established with the trust and respectful to
144 security of FD.io project. Unless adressed, :abbr:`DCR` images will be placed in
145 custom registry service [fdioregistry]_. Automated Jenkins jobs will be created
146 in align of long term solution for container lifecycle.
147
148 In parallel, the effort is started to find the outsourced service.
149
150 Versioning
151 ~~~~~~~~~~
152
153 .. todo: Find the proper versioning scheme (achieved by tagging containers on registry service)
154
155 jenkins-slave-dcr
156 ~~~~~~~~~~~~~~~~~
157
158 This :abbr:`DCR` acts as the jenkins slave (known also as
159 jenkins minion) it can connect over SSH protocol to known port to
160 **csit-shim-dcr** and execute non-interactive scripts. This image acts as the
161 generic reservation mechanic to make sure that only Y number are spawned on any
162 given HW node. Responsible for scheduling test job execution onto specific
163 **1-Node VPP_Device** testbed.
164
165 All software dependencies including VPP/DPDK that are not present in package
166 lists of standard linux distributions and/or needs to be compiled prior running
167 on **csit-sut-dcr** SHOULD be compiled in this container.
168
169 - *Container Image Location*: Docker image at [jenkins-slave-dcr-img]_
170
171 - *Container Definition*: Docker file specified at [jenkins-slave-dcr-file]_
172
173 csit-shim-dcr
174 ~~~~~~~~~~~~~
175
176 This :abbr:`DCR` acts as an intermediate layer running scripts responsible for
177 orchestrating topologies under test and executing :abbr:`CSIT` environment
178 including :abbr:`CSIT` framework by instantiating **csit-sut-dcr**. Responsible
179 for managing VF resources and allocation to :abbr:`DUT (Device Under Test)` and
180 :abbr:`TG (Traffic Generator)` containers. This MUST to be done on
181 **csit-shim-dcr**, not on nomad instance running locally.
182
183 Container MAY do compilation of dependencies in future as an addition to
184 **jenkins-slave-dcr**. List of installed libraries does allow to compile
185 dependencies here.
186
187 - *Container Image Location*: Docker image at [csit-shim-dcr-img]_
188
189 - *Container Definition*: Docker file specified at [csit-shim-dcr-file]_
190
191 - *Initializing*:
192   .. todo: Describe initialization of csit-shim-dcr.
193
194 - *Connectivity*: Over SSH only, using <host>:6022 format. Currently using
195   *root* user account as primary. From the jenkins slave it will be able to
196   connect via env variable, since the jenkins slave doesn't actually know what
197   host its running on.
198   ::
199     ssh -p 6022 root@10.30.51.node
200
201 csit-sut-dcr
202 ~~~~~~~~~~~~
203
204 This :abbr:`DCR` acts as an :abbr:`SUT (System Under Test)`. Any :abbr:`DUT` or
205 :abbr:`TG` application is installed there. It is RECOMMENDED to install them
206 with packaging system (APT/DPKG on Debian based system or DNF/YUM on RedHat
207 based systems).
208
209 It is designed to be very lightweight Docker image that only installs packages
210 and execute binaries (built on **jenkins-slave-dcr**) and contains libraries
211 necessary to run CSIT framework.
212
213 - *Container Image Location*: Docker image at [csit-sut-dcr-img]_
214
215 - *Container Definition*: Docker file specified at [csit-sut-dcr-file]_
216
217 - *Initializing*:
218   ::
219     docker run --privileged --shm-size 512M -d -p 10.30.51.node:port:22/tcp hub/image
220
221 - *Connectivity*: Over SSH only, using <host>[:<port>] format. Currently using
222   *root* user account as primary.
223   ::
224     ssh -p <port> root@10.30.51.<node>
225
226 VF reservation
227 --------------
228
229 .. todo: Discuss VF reservation mechanics
230
231 Environment initialization
232 --------------------------
233
234 .. todo: Discuss Environment initialization
235
236 Links
237 -----
238
239 .. todo: Update the links below in case of change.
240
241 .. _tws: https://wiki.fd.io/view/CSIT/TWS
242 .. _dockerhub: https://hub.docker.com/
243 .. _fdiocsitgerrit: https://gerrit.fd.io/r/CSIT
244 .. _fdioregistry: registry.fdiopoc.net
245 .. _jenkins-slave-dcr-img: snergster/vpp-ubuntu18
246 .. _jenkins-slave-dcr-file: https://hub.docker.com/r/snergster/vpp-ubuntu18/~/dockerfile/
247 .. _csit-shim-dcr-img: registry.fdiopoc.net/vpp/ubuntu18ssh
248 .. _csit-shim-dcr-file: https://github.com/Snergster/vppcache/blob/master/ubuntu18-ssh/Dockerfile
249 .. _csit-sut-dcr-file: https://hub.docker.com/r/pmikus/csit-vpp-device-test/~/dockerfile/
250 .. _csit-sut-dcr-img: pmikus/csit-vpp-device-test