bdb52d8df2b53041760b1776d31a4d1fc8f1f7da
[fuel.git] / docs / release / installation / installation.instruction.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. (c) Open Platform for NFV Project, Inc. and its contributors
4
5 ***********************************
6 OPNFV Fuel Installation Instruction
7 ***********************************
8
9 Abstract
10 ========
11
12 This document describes how to install the ``Hunter`` release of
13 OPNFV when using Fuel as a deployment tool, covering its usage,
14 limitations, dependencies and required system resources.
15
16 This is an unified documentation for both ``x86_64`` and ``aarch64``
17 architectures. All information is common for both architectures
18 except when explicitly stated.
19
20 Introduction
21 ============
22
23 This document provides guidelines on how to install and
24 configure the ``Hunter`` release of OPNFV when using Fuel as a
25 deployment tool, including required software and hardware configurations.
26
27 Although the available installation options provide a high degree of
28 freedom in how the system is set up, including architecture, services
29 and features, etc., said permutations may not provide an OPNFV
30 compliant reference architecture. This document provides a
31 step-by-step guide that results in an OPNFV ``Hunter`` compliant
32 deployment.
33
34 The audience of this document is assumed to have good knowledge of
35 networking and Unix/Linux administration.
36
37 Before starting the installation of the ``Hunter`` release of
38 OPNFV, using Fuel as a deployment tool, some planning must be
39 done.
40
41 Preparations
42 ============
43
44 Prior to installation, a number of deployment specific parameters must be
45 collected, those are:
46
47 #.     Provider sub-net and gateway information
48
49 #.     Provider ``VLAN`` information
50
51 #.     Provider ``DNS`` addresses
52
53 #.     Provider ``NTP`` addresses
54
55 #.     How many nodes and what roles you want to deploy (Controllers, Computes)
56
57 This information will be needed for the configuration procedures
58 provided in this document.
59
60 Hardware Requirements
61 =====================
62
63 Mininum hardware requirements depend on the deployment type.
64
65 .. WARNING::
66
67     If ``baremetal`` nodes are present in the cluster, the architecture of the
68     nodes running the control plane (``kvm01``, ``kvm02``, ``kvm03`` for
69     ``HA`` scenarios, respectively ``ctl01``, ``gtw01``, ``odl01`` for
70     ``noHA`` scenarios) and the ``jumpserver`` architecture must be the same
71     (either ``x86_64`` or ``aarch64``).
72
73 .. TIP::
74
75     The compute nodes may have different architectures, but extra
76     configuration might be required for scheduling VMs on the appropiate host.
77     This use-case is not tested in OPNFV CI, so it is considered experimental.
78
79 Hardware Requirements for ``virtual`` Deploys
80 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81
82 The following minimum hardware requirements must be met for the ``virtual``
83 installation of ``Hunter`` using Fuel:
84
85 +------------------+------------------------------------------------------+
86 | **HW Aspect**    | **Requirement**                                      |
87 |                  |                                                      |
88 +==================+======================================================+
89 | **1 Jumpserver** | A physical node (also called Foundation Node) that   |
90 |                  | will host a Salt Master container and each of the VM |
91 |                  | nodes in the virtual deploy                          |
92 +------------------+------------------------------------------------------+
93 | **CPU**          | Minimum 1 socket with Virtualization support         |
94 +------------------+------------------------------------------------------+
95 | **RAM**          | Minimum 32GB/server (Depending on VNF work load)     |
96 +------------------+------------------------------------------------------+
97 | **Disk**         | Minimum 100GB (SSD or 15krpm SCSI highly recommended)|
98 +------------------+------------------------------------------------------+
99
100 Hardware Requirements for ``baremetal`` Deploys
101 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102
103 The following minimum hardware requirements must be met for the ``baremetal``
104 installation of ``Hunter`` using Fuel:
105
106 +------------------+------------------------------------------------------+
107 | **HW Aspect**    | **Requirement**                                      |
108 |                  |                                                      |
109 +==================+======================================================+
110 | **1 Jumpserver** | A physical node (also called Foundation Node) that   |
111 |                  | hosts the Salt Master and MaaS containers            |
112 +------------------+------------------------------------------------------+
113 | **# of nodes**   | Minimum 5                                            |
114 |                  |                                                      |
115 |                  | - 3 KVM servers which will run all the controller    |
116 |                  |   services                                           |
117 |                  |                                                      |
118 |                  | - 2 Compute nodes                                    |
119 |                  |                                                      |
120 |                  | .. WARNING::                                         |
121 |                  |                                                      |
122 |                  |     ``kvm01``, ``kvm02``, ``kvm03`` nodes and the    |
123 |                  |     ``jumpserver`` must have the same architecture   |
124 |                  |     (either ``x86_64`` or ``aarch64``).              |
125 |                  |                                                      |
126 |                  | .. NOTE::                                            |
127 |                  |                                                      |
128 |                  |     ``aarch64`` nodes should run an ``UEFI``         |
129 |                  |     compatible firmware with PXE support             |
130 |                  |     (e.g. ``EDK2``).                                 |
131 +------------------+------------------------------------------------------+
132 | **CPU**          | Minimum 1 socket with Virtualization support         |
133 +------------------+------------------------------------------------------+
134 | **RAM**          | Minimum 16GB/server (Depending on VNF work load)     |
135 +------------------+------------------------------------------------------+
136 | **Disk**         | Minimum 256GB 10kRPM spinning disks                  |
137 +------------------+------------------------------------------------------+
138 | **Networks**     | Mininum 4                                            |
139 |                  |                                                      |
140 |                  | - 3 VLANs (``public``, ``mgmt``, ``private``) -      |
141 |                  |   can be a mix of tagged/native                      |
142 |                  |                                                      |
143 |                  | - 1 Un-Tagged VLAN for PXE Boot -                    |
144 |                  |   ``PXE/admin`` Network                              |
145 |                  |                                                      |
146 |                  | .. NOTE::                                            |
147 |                  |                                                      |
148 |                  |     These can be allocated to a single NIC           |
149 |                  |     or spread out over multiple NICs.                |
150 |                  |                                                      |
151 |                  | .. WARNING::                                         |
152 |                  |                                                      |
153 |                  |     No external ``DHCP`` server should be present    |
154 |                  |     in the ``PXE/admin`` network segment, as it      |
155 |                  |     would interfere with ``MaaS`` ``DHCP`` during    |
156 |                  |     ``baremetal`` node commissioning/deploying.      |
157 +------------------+------------------------------------------------------+
158 | **Power mgmt**   | All targets need to have power management tools that |
159 |                  | allow rebooting the hardware (e.g. ``IPMI``).        |
160 +------------------+------------------------------------------------------+
161
162 Hardware Requirements for ``hybrid`` (``baremetal`` + ``virtual``) Deploys
163 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
164
165 The following minimum hardware requirements must be met for the ``hybrid``
166 installation of ``Hunter`` using Fuel:
167
168 +------------------+------------------------------------------------------+
169 | **HW Aspect**    | **Requirement**                                      |
170 |                  |                                                      |
171 +==================+======================================================+
172 | **1 Jumpserver** | A physical node (also called Foundation Node) that   |
173 |                  | hosts the Salt Master and MaaS containers, and       |
174 |                  | each of the virtual nodes defined in ``PDF``         |
175 +------------------+------------------------------------------------------+
176 | **# of nodes**   | .. NOTE::                                            |
177 |                  |                                                      |
178 |                  |     Depends on ``PDF`` configuration.                |
179 |                  |                                                      |
180 |                  | If the control plane is virtualized, minimum         |
181 |                  | baremetal requirements are:                          |
182 |                  |                                                      |
183 |                  | - 2 Compute nodes                                    |
184 |                  |                                                      |
185 |                  | If the computes are virtualized, minimum             |
186 |                  | baremetal requirements are:                          |
187 |                  |                                                      |
188 |                  | - 3 KVM servers which will run all the controller    |
189 |                  |   services                                           |
190 |                  |                                                      |
191 |                  | .. WARNING::                                         |
192 |                  |                                                      |
193 |                  |     ``kvm01``, ``kvm02``, ``kvm03`` nodes and the    |
194 |                  |     ``jumpserver`` must have the same architecture   |
195 |                  |     (either ``x86_64`` or ``aarch64``).              |
196 |                  |                                                      |
197 |                  | .. NOTE::                                            |
198 |                  |                                                      |
199 |                  |     ``aarch64`` nodes should run an ``UEFI``         |
200 |                  |     compatible firmware with PXE support             |
201 |                  |     (e.g. ``EDK2``).                                 |
202 +------------------+------------------------------------------------------+
203 | **CPU**          | Minimum 1 socket with Virtualization support         |
204 +------------------+------------------------------------------------------+
205 | **RAM**          | Minimum 16GB/server (Depending on VNF work load)     |
206 +------------------+------------------------------------------------------+
207 | **Disk**         | Minimum 256GB 10kRPM spinning disks                  |
208 +------------------+------------------------------------------------------+
209 | **Networks**     | Same as for ``baremetal`` deployments                |
210 +------------------+------------------------------------------------------+
211 | **Power mgmt**   | Same as for ``baremetal`` deployments                |
212 +------------------+------------------------------------------------------+
213
214 Help with Hardware Requirements
215 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
216
217 Calculate hardware requirements:
218
219 When choosing the hardware on which you will deploy your OpenStack
220 environment, you should think about:
221
222 - CPU -- Consider the number of virtual machines that you plan to deploy in
223   your cloud environment and the CPUs per virtual machine.
224
225 - Memory -- Depends on the amount of RAM assigned per virtual machine and the
226   controller node.
227
228 - Storage -- Depends on the local drive space per virtual machine, remote
229   volumes that can be attached to a virtual machine, and object storage.
230
231 - Networking -- Depends on the Choose Network Topology, the network bandwidth
232   per virtual machine, and network storage.
233
234 Top of the Rack (``TOR``) Configuration Requirements
235 ====================================================
236
237 The switching infrastructure provides connectivity for the OPNFV
238 infrastructure operations, tenant networks (East/West) and provider
239 connectivity (North/South); it also provides needed connectivity for
240 the Storage Area Network (SAN).
241
242 To avoid traffic congestion, it is strongly suggested that three
243 physically separated networks are used, that is: 1 physical network
244 for administration and control, one physical network for tenant private
245 and public networks, and one physical network for SAN.
246
247 The switching connectivity can (but does not need to) be fully redundant,
248 in such case it comprises a redundant 10GE switch pair for each of the
249 three physically separated networks.
250
251 .. WARNING::
252
253     The physical ``TOR`` switches are **not** automatically configured from
254     the OPNFV Fuel reference platform. All the networks involved in the OPNFV
255     infrastructure as well as the provider networks and the private tenant
256     VLANs needs to be manually configured.
257
258 Manual configuration of the ``Hunter`` hardware platform should
259 be carried out according to the `OPNFV Pharos Specification`_.
260
261 OPNFV Software Prerequisites
262 ============================
263
264 .. NOTE::
265
266     All prerequisites described in this chapter apply to the ``jumpserver``
267     node.
268
269 OS Distribution Support
270 ~~~~~~~~~~~~~~~~~~~~~~~
271
272 The Jumpserver node should be pre-provisioned with an operating system,
273 according to the `OPNFV Pharos specification`_.
274
275 OPNFV Fuel has been validated by CI using the following distributions
276 installed on the Jumpserver:
277
278 - ``CentOS 7`` (recommended by Pharos specification);
279 - ``Ubuntu Xenial 16.04``;
280
281 .. TOPIC:: ``aarch64`` notes
282
283     For an ``aarch64`` Jumpserver, the ``libvirt`` minimum required
284     version is ``3.x``, ``3.5`` or newer highly recommended.
285
286     .. TIP::
287
288         ``CentOS 7`` (``aarch64``) distro provided packages are already new
289         enough.
290
291     .. WARNING::
292
293         ``Ubuntu 16.04`` (``arm64``), distro packages are too old and 3rd party
294         repositories should be used.
295
296     For convenience, Armband provides a DEB repository holding all the
297     required packages.
298
299     To add and enable the Armband repository on an Ubuntu 16.04 system,
300     create a new sources list file ``/apt/sources.list.d/armband.list``
301     with the following contents:
302
303     .. code-block:: console
304
305         jenkins@jumpserver:~$ cat /etc/apt/sources.list.d/armband.list
306         deb http://linux.enea.com/mcp-repos/rocky/xenial rocky-armband main
307
308         jenkins@jumpserver:~$ sudo apt-key adv --keyserver keys.gnupg.net \
309                                                --recv 798AB1D1
310         jenkins@jumpserver:~$ sudo apt-get update
311
312 OS Distribution Packages
313 ~~~~~~~~~~~~~~~~~~~~~~~~
314
315 By default, the ``deploy.sh`` script will automatically install the required
316 distribution package dependencies on the Jumpserver, so the end user does
317 not have to manually install them before starting the deployment.
318
319 This includes Python, QEMU, libvirt etc.
320
321 .. SEEALSO::
322
323     To disable automatic package installation (and/or upgrade) during
324     deployment, check out the ``-P`` deploy argument.
325
326 .. WARNING::
327
328     The install script expects ``libvirt`` to be already running on the
329     Jumpserver.
330
331 In case ``libvirt`` packages are missing, the script will install them; but
332 depending on the OS distribution, the user might have to start the
333 ``libvirt`` daemon service manually, then run the deploy script again.
334
335 Therefore, it is recommended to install ``libvirt`` explicitly on the
336 Jumpserver before the deployment.
337
338 While not mandatory, upgrading the kernel on the Jumpserver is also highly
339 recommended.
340
341 .. code-block:: console
342
343     jenkins@jumpserver:~$ sudo apt-get install \
344                           linux-image-generic-hwe-16.04-edge libvirt-bin
345     jenkins@jumpserver:~$ sudo reboot
346
347 User Requirements
348 ~~~~~~~~~~~~~~~~~
349
350 The user running the deploy script on the Jumpserver should belong to
351 ``sudo`` and ``libvirt`` groups, and have passwordless sudo access.
352
353 .. NOTE::
354
355     Throughout this documentation, we will use the ``jenkins`` username for
356     this role.
357
358 The following example adds the groups to the user ``jenkins``:
359
360 .. code-block:: console
361
362     jenkins@jumpserver:~$ sudo usermod -aG sudo jenkins
363     jenkins@jumpserver:~$ sudo usermod -aG libvirt jenkins
364     jenkins@jumpserver:~$ sudo reboot
365     jenkins@jumpserver:~$ groups
366     jenkins sudo libvirt
367
368     jenkins@jumpserver:~$ sudo visudo
369     ...
370     %jenkins ALL=(ALL) NOPASSWD:ALL
371
372 Local Artifact Storage
373 ~~~~~~~~~~~~~~~~~~~~~~
374
375 The folder containing the temporary deploy artifacts (``/home/jenkins/tmpdir``
376 in the examples below) needs to have mask ``777`` in order for ``libvirt`` to
377 be able to use them.
378
379 .. code-block:: console
380
381     jenkins@jumpserver:~$ mkdir -p -m 777 /home/jenkins/tmpdir
382
383 Network Configuration
384 ~~~~~~~~~~~~~~~~~~~~~
385
386 Relevant Linux bridges should also be pre-configured for certain networks,
387 depending on the type of the deployment.
388
389 +------------+---------------+----------------------------------------------+
390 | Network    | Linux Bridge  | Linux Bridge necessity based on deploy type  |
391 |            |               +--------------+---------------+---------------+
392 |            |               | ``virtual``  | ``baremetal`` | ``hybrid``    |
393 +============+===============+==============+===============+===============+
394 | PXE/admin  | ``admin_br``  | absent       | present       | present       |
395 +------------+---------------+--------------+---------------+---------------+
396 | management | ``mgmt_br``   | optional     | optional,     | optional,     |
397 |            |               |              | recommended,  | recommended,  |
398 |            |               |              | required for  | required for  |
399 |            |               |              | ``functest``, | ``functest``, |
400 |            |               |              | ``yardstick`` | ``yardstick`` |
401 +------------+---------------+--------------+---------------+---------------+
402 | internal   | ``int_br``    | optional     | optional      | present       |
403 +------------+---------------+--------------+---------------+---------------+
404 | public     | ``public_br`` | optional     | optional,     | optional,     |
405 |            |               |              | recommended,  | recommended,  |
406 |            |               |              | useful for    | useful for    |
407 |            |               |              | debugging     | debugging     |
408 +------------+---------------+--------------+---------------+---------------+
409
410 .. TIP::
411
412     IP addresses should be assigned to the created bridge interfaces (not
413     to one of its ports).
414
415 .. WARNING::
416
417     ``PXE/admin`` bridge (``admin_br``) **must** have an IP address.
418
419 Changes ``deploy.sh`` Will Perform to Jumpserver OS
420 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
421
422 .. WARNING::
423
424     The install script will alter Jumpserver sysconf and disable
425     ``net.bridge.bridge-nf-call``.
426
427 .. WARNING::
428
429     On Jumpservers running Ubuntu with AppArmor enabled, when deploying
430     on baremetal nodes (i.e. when MaaS is used), the install script
431     will disable certain conflicting AppArmor profiles that interfere with
432     MaaS services inside the container, e.g. ``ntpd``, ``named``, ``dhcpd``,
433     ``tcpdump``.
434
435 .. WARNING::
436
437     The install script will automatically install and/or upgrade the
438     required distribution package dependencies on the Jumpserver,
439     unless explicitly asked not to (via the ``-P`` deploy arg).
440
441 OPNFV Software Configuration (``XDF``)
442 ======================================
443
444 .. versionadded:: 5.0.0
445 .. versionchanged:: 7.0.0
446
447 Unlike the old approach based on OpenStack Fuel, OPNFV Fuel no longer has a
448 graphical user interface for configuring the environment, but instead
449 switched to OPNFV specific descriptor files that we will call generically
450 ``XDF``:
451
452 - ``PDF`` (POD Descriptor File) provides an abstraction of the target POD
453   with all its hardware characteristics and required parameters;
454 - ``IDF`` (Installer Descriptor File) extends the ``PDF`` with POD related
455   parameters required by the OPNFV Fuel installer;
456 - ``SDF`` (Scenario Descriptor File, **not** yet adopted) will later
457   replace embedded scenario definitions, describing the roles and layout of
458   the cluster enviroment for a given reference architecture;
459
460 .. TIP::
461
462     For ``virtual`` deployments, if the ``public`` network will be accessed
463     from outside the ``jumpserver`` node, a custom ``PDF``/``IDF`` pair is
464     required for customizing ``idf.net_config.public`` and
465     ``idf.fuel.jumphost.bridges.public``.
466
467 .. NOTE::
468
469     For OPNFV CI PODs, as well as simple (no ``public`` bridge) ``virtual``
470     deployments, ``PDF``/``IDF`` files are already available in the
471     `pharos git repo`_. They can be used as a reference for user-supplied
472     inputs or to kick off a deployment right away.
473
474 +----------+------------------------------------------------------------------+
475 | LAB/POD  | ``PDF``/``IDF`` availability based on deploy type                |
476 |          +------------------------+--------------------+--------------------+
477 |          | ``virtual``            | ``baremetal``      | ``hybrid``         |
478 +==========+========================+====================+====================+
479 | OPNFV CI | available in           | available in       | N/A, as currently  |
480 | POD      | `pharos git repo`_     | `pharos git repo`_ | there are 0 hybrid |
481 |          | (e.g.                  | (e.g. ``lf-pod2``, | PODs in OPNFV CI   |
482 |          | ``ericsson-virtual1``) | ``arm-pod5``)      |                    |
483 +----------+------------------------+--------------------+--------------------+
484 | local or | ``user-supplied``      | ``user-supplied``  | ``user-supplied``  |
485 | new POD  |                        |                    |                    |
486 +----------+------------------------+--------------------+--------------------+
487
488 .. TIP::
489
490     Both ``PDF`` and ``IDF`` structure are modelled as ``yaml`` schemas in the
491     `pharos git repo`_, also included as a git submodule in OPNFV Fuel.
492
493     .. SEEALSO::
494
495         - ``mcp/scripts/pharos/config/pdf/pod1.schema.yaml``
496         - ``mcp/scripts/pharos/config/pdf/idf-pod1.schema.yaml``
497
498     Schema files are also used during the initial deployment phase to validate
499     the user-supplied input ``PDF``/``IDF`` files.
500
501 ``PDF``
502 ~~~~~~~
503
504 The Pod Descriptor File is a hardware description of the POD
505 infrastructure. The information is modeled under a ``yaml`` structure.
506
507 The hardware description covers the ``jumphost`` node and a set of ``nodes``
508 for the cluster target boards. For each node the following characteristics
509 are defined:
510
511 - Node parameters including ``CPU`` features and total memory;
512 - A list of available disks;
513 - Remote management parameters;
514 - Network interfaces list including name, ``MAC`` address, link speed,
515   advanced features;
516
517 .. SEEALSO::
518
519     A reference file with the expected ``yaml`` structure is available at:
520
521     - ``mcp/scripts/pharos/config/pdf/pod1.yaml``
522
523     For more information on ``PDF``, see the `OPNFV PDF Wiki Page`_.
524
525 .. WARNING::
526
527     The fixed IPs defined in ``PDF`` are ignored by the OPNFV Fuel installer
528     script and it will instead assign addresses based on the network ranges
529     defined in ``IDF``.
530
531     For more details on the way IP addresses are assigned, see
532     :ref:`OPNFV Fuel User Guide <fuel-userguide>`.
533
534 ``PDF``/``IDF`` Role (hostname) Mapping
535 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
536
537 Upcoming ``SDF`` support will introduce a series of possible node roles.
538 Until that happens, the role mapping logic is hardcoded, based on node index
539 in ``PDF``/``IDF`` (which should also be in sync, i.e. the parameters of the
540 ``n``-th cluster node defined in ``PDF`` should be the ``n``-th node in
541 ``IDF`` structures too).
542
543 +-------------+------------------+----------------------+
544 | Node index  | ``HA`` scenario  | ``noHA`` scenario    |
545 +=============+==================+======================+
546 | 1st         | ``kvm01``        | ``ctl01``            |
547 +-------------+------------------+----------------------+
548 | 2nd         | ``kvm02``        | ``gtw01``            |
549 +-------------+------------------+----------------------+
550 | 3rd         | ``kvm03``        | ``odl01``/``unused`` |
551 +-------------+------------------+----------------------+
552 | 4th,        | ``cmp001``,      | ``cmp001``,          |
553 | 5th,        | ``cmp002``,      | ``cmp002``,          |
554 | ...         | ``...``          | ``...``              |
555 +-------------+------------------+----------------------+
556
557 .. TIP::
558
559     To switch node role(s), simply reorder the node definitions in
560     ``PDF``/``IDF`` (make sure to keep them in sync).
561
562 ``IDF``
563 ~~~~~~~
564
565 The Installer Descriptor File extends the ``PDF`` with POD related parameters
566 required by the installer. This information may differ per each installer type
567 and it is not considered part of the POD infrastructure.
568
569 ``idf.*`` Overview
570 ------------------
571
572 The ``IDF`` file must be named after the ``PDF`` it attaches to, with the
573 prefix ``idf-``.
574
575 .. SEEALSO::
576
577     A reference file with the expected ``yaml`` structure is available at:
578
579     - ``mcp/scripts/pharos/config/pdf/idf-pod1.yaml``
580
581 The file follows a ``yaml`` structure and at least two sections
582 (``idf.net_config`` and ``idf.fuel``) are expected.
583
584 The ``idf.fuel`` section defines several sub-sections required by the OPNFV
585 Fuel installer:
586
587 - ``jumphost``: List of bridge names for each network on the Jumpserver;
588 - ``network``: List of device name and bus address info of all the target nodes.
589   The order must be aligned with the order defined in the ``PDF`` file.
590   The OPNFV Fuel installer relies on the ``IDF`` model to setup all node NICs
591   by defining the expected device name and bus address;
592 - ``maas``: Defines the target nodes commission timeout and deploy timeout;
593 - ``reclass``: Defines compute parameter tuning, including huge pages, ``CPU``
594   pinning and other ``DPDK`` settings;
595
596 .. code-block:: yaml
597
598     ---
599     idf:
600       version: 0.1     # fixed, the only supported version (mandatory)
601       net_config:      # POD network configuration overview (mandatory)
602         oob: ...       # mandatory
603         admin: ...     # mandatory
604         mgmt: ...      # mandatory
605         storage: ...   # mandatory
606         private: ...   # mandatory
607         public: ...    # mandatory
608       fuel:            # OPNFV Fuel specific section (mandatory)
609         jumphost:      # OPNFV Fuel jumpserver bridge configuration (mandatory)
610           bridges:                          # Bridge name mapping (mandatory)
611             admin: 'admin_br'               # <PXE/admin bridge name> or ~
612             mgmt: 'mgmt_br'                 # <mgmt bridge name> or ~
613             private: ~                      # <private bridge name> or ~
614             public: 'public_br'             # <public bridge name> or ~
615           trunks: ...                       # Trunked networks (optional)
616         maas:                               # MaaS timeouts (optional)
617           timeout_comissioning: 10          # commissioning timeout in minutes
618           timeout_deploying: 15             # deploy timeout in minutes
619         network:                            # Cluster nodes network (mandatory)
620           interface_mtu: 1500               # Cluster-level MTU (optional)
621           ntp_strata_host1: 1.pool.ntp.org  # NTP1 (optional)
622           ntp_strata_host2: 0.pool.ntp.org  # NTP2 (optional)
623           node: ...                         # List of per-node cfg (mandatory)
624         reclass:                            # Additional params (mandatory)
625           node: ...                         # List of per-node cfg (mandatory)
626
627 ``idf.net_config``
628 ------------------
629
630 ``idf.net_config`` was introduced as a mechanism to map all the usual cluster
631 networks (internal and provider networks, e.g. ``mgmt``) to their ``VLAN``
632 tags, ``CIDR`` and a physical interface index (used to match networks to
633 interface names, like ``eth0``, on the cluster nodes).
634
635
636 .. WARNING::
637
638     The mapping between one network segment (e.g. ``mgmt``) and its ``CIDR``/
639     ``VLAN`` is not configurable on a per-node basis, but instead applies to
640     all the nodes in the cluster.
641
642 For each network, the following parameters are currently supported:
643
644 +--------------------------+--------------------------------------------------+
645 | ``idf.net_config.*`` key | Details                                          |
646 +==========================+==================================================+
647 | ``interface``            | The index of the interface to use for this net.  |
648 |                          | For each cluster node (if network is present),   |
649 |                          | OPNFV Fuel will determine the underlying physical|
650 |                          | interface by picking the element at index        |
651 |                          | ``interface`` from the list of network interface |
652 |                          | names defined in                                 |
653 |                          | ``idf.fuel.network.node.*.interfaces``.          |
654 |                          | Required for each network.                       |
655 |                          |                                                  |
656 |                          | .. NOTE::                                        |
657 |                          |                                                  |
658 |                          |     The interface index should be the            |
659 |                          |     same on all cluster nodes. This can be       |
660 |                          |     achieved by ordering them accordingly in     |
661 |                          |     ``PDF``/``IDF``.                             |
662 +--------------------------+--------------------------------------------------+
663 | ``vlan``                 | ``VLAN`` tag (integer) or the string ``native``. |
664 |                          | Required for each network.                       |
665 +--------------------------+--------------------------------------------------+
666 | ``ip-range``             | When specified, all cluster IPs dynamically      |
667 |                          | allocated by OPNFV Fuel for that network will be |
668 |                          | assigned inside this range.                      |
669 |                          | Required for ``oob``, optional for others.       |
670 |                          |                                                  |
671 |                          | .. NOTE::                                        |
672 |                          |                                                  |
673 |                          |     For now, only range start address is used.   |
674 +--------------------------+--------------------------------------------------+
675 | ``network``              | Network segment address.                         |
676 |                          | Required for each network, except ``oob``.       |
677 +--------------------------+--------------------------------------------------+
678 | ``mask``                 | Network segment mask.                            |
679 |                          | Required for each network, except ``oob``.       |
680 +--------------------------+--------------------------------------------------+
681 | ``gateway``              | Gateway IP address.                              |
682 |                          | Required for ``public``, N/A for others.         |
683 +--------------------------+--------------------------------------------------+
684 | ``dns``                  | List of DNS IP addresses.                        |
685 |                          | Required for ``public``, N/A for others.         |
686 +--------------------------+--------------------------------------------------+
687
688 Sample ``public`` network configuration block:
689
690 .. code-block:: yaml
691
692     idf:
693         net_config:
694             public:
695               interface: 1
696               vlan: native
697               network: 10.0.16.0
698               ip-range: 10.0.16.100-10.0.16.253
699               mask: 24
700               gateway: 10.0.16.254
701               dns:
702                 - 8.8.8.8
703                 - 8.8.4.4
704
705 .. TOPIC:: ``hybrid`` POD notes
706
707     Interface indexes must be the same for all nodes, which is problematic
708     when mixing ``virtual`` nodes (where all interfaces were untagged
709     so far) with ``baremetal`` nodes (where interfaces usually carry
710     tagged VLANs).
711
712     .. TIP::
713
714         To achieve this, a special ``jumpserver`` network layout is used:
715         ``mgmt``, ``storage``, ``private``, ``public`` are trunked together
716         in a single ``trunk`` bridge:
717
718         - without decapsulating them (if they are also tagged on ``baremetal``);
719           a ``trunk.<vlan_tag>`` interface should be created on the
720           ``jumpserver`` for each tagged VLAN so the kernel won't drop the
721           packets;
722         - by decapsulating them  first (if they are also untagged on
723           ``baremetal`` nodes);
724
725     The ``trunk`` bridge is then used for all bridges OPNFV Fuel
726     is aware of in ``idf.fuel.jumphost.bridges``, e.g. for a ``trunk`` where
727     only ``mgmt`` network is not decapsulated:
728
729     .. code-block:: yaml
730
731         idf:
732             fuel:
733               jumphost:
734                 bridges:
735                   admin: 'admin_br'
736                   mgmt: 'trunk'
737                   private: 'trunk'
738                   public: 'trunk'
739                 trunks:
740                   # mgmt network is not decapsulated for jumpserver infra nodes,
741                   # to align with the VLAN configuration of baremetal nodes.
742                   mgmt: True
743
744 .. WARNING::
745
746     The Linux kernel limits the name of network interfaces to 16 characters.
747     Extra care is required when choosing bridge names, so appending the
748     ``VLAN`` tag won't lead to an interface name length exceeding that limit.
749
750 ``idf.fuel.network``
751 --------------------
752
753 ``idf.fuel.network`` allows mapping the cluster networks (e.g. ``mgmt``) to
754 their physical interface name (e.g. ``eth0``) and bus address on the cluster
755 nodes.
756
757 ``idf.fuel.network.node`` should be a list with the same number (and order) of
758 elements as the cluster nodes defined in ``PDF``, e.g. the second cluster node
759 in ``PDF`` will use the interface name and bus address defined in the second
760 list element.
761
762 Below is a sample configuration block for a single node with two interfaces:
763
764 .. code-block:: yaml
765
766     idf:
767       fuel:
768         network:
769           node:
770             # Ordered-list, index should be in sync with node index in PDF
771             - interfaces:
772                 # Ordered-list, index should be in sync with interface index
773                 # in PDF
774                 - 'ens3'
775                 - 'ens4'
776               busaddr:
777                 # Bus-info reported by `ethtool -i ethX`
778                 - '0000:00:03.0'
779                 - '0000:00:04.0'
780
781
782 ``idf.fuel.reclass``
783 --------------------
784
785 ``idf.fuel.reclass`` provides a way of overriding default values in the
786 reclass cluster model.
787
788 This currently covers strictly compute parameter tuning, including huge
789 pages, ``CPU`` pinning and other ``DPDK`` settings.
790
791 ``idf.fuel.reclass.node`` should be a list with the same number (and order) of
792 elements as the cluster nodes defined in ``PDF``, e.g. the second cluster node
793 in ``PDF`` will use the parameters defined in the second list element.
794
795 The following parameters are currently supported:
796
797 +---------------------------------+-------------------------------------------+
798 | ``idf.fuel.reclass.node.*``     | Details                                   |
799 | key                             |                                           |
800 +=================================+===========================================+
801 | ``nova_cpu_pinning``            | List of CPU cores nova will be pinned to. |
802 |                                 |                                           |
803 |                                 | .. NOTE::                                 |
804 |                                 |                                           |
805 |                                 |     Currently disabled.                   |
806 +---------------------------------+-------------------------------------------+
807 | ``compute_hugepages_size``      | Size of each persistent huge pages.       |
808 |                                 |                                           |
809 |                                 | Usual values are ``2M`` and ``1G``.       |
810 +---------------------------------+-------------------------------------------+
811 | ``compute_hugepages_count``     | Total number of persistent huge pages.    |
812 +---------------------------------+-------------------------------------------+
813 | ``compute_hugepages_mount``     | Mount point to use for huge pages.        |
814 +---------------------------------+-------------------------------------------+
815 | ``compute_kernel_isolcpu``      | List of certain CPU cores that are        |
816 |                                 | isolated from Linux scheduler.            |
817 +---------------------------------+-------------------------------------------+
818 | ``compute_dpdk_driver``         | Kernel module to provide userspace I/O    |
819 |                                 | support.                                  |
820 +---------------------------------+-------------------------------------------+
821 | ``compute_ovs_pmd_cpu_mask``    | Hexadecimal mask of CPUs to run ``DPDK``  |
822 |                                 | Poll-mode drivers.                        |
823 +---------------------------------+-------------------------------------------+
824 | ``compute_ovs_dpdk_socket_mem`` | Set of amount huge pages in ``MB`` to be  |
825 |                                 | used by ``OVS-DPDK`` daemon taken for each|
826 |                                 | ``NUMA`` node. Set size is equal to       |
827 |                                 | ``NUMA`` nodes count, elements are        |
828 |                                 | divided by comma.                         |
829 +---------------------------------+-------------------------------------------+
830 | ``compute_ovs_dpdk_lcore_mask`` | Hexadecimal mask of ``DPDK`` lcore        |
831 |                                 | parameter used to run ``DPDK`` processes. |
832 +---------------------------------+-------------------------------------------+
833 | ``compute_ovs_memory_channels`` | Number of memory channels to be used.     |
834 +---------------------------------+-------------------------------------------+
835 | ``dpdk0_driver``                | NIC driver to use for physical network    |
836 |                                 | interface.                                |
837 +---------------------------------+-------------------------------------------+
838 | ``dpdk0_n_rxq``                 | Number of ``RX`` queues.                  |
839 +---------------------------------+-------------------------------------------+
840
841 Sample ``compute_params`` configuration block (for a single node):
842
843 .. code-block:: yaml
844
845     idf:
846       fuel:
847         reclass:
848           node:
849             - compute_params:
850                 common: &compute_params_common
851                   compute_hugepages_size: 2M
852                   compute_hugepages_count: 2048
853                   compute_hugepages_mount: /mnt/hugepages_2M
854                 dpdk:
855                   <<: *compute_params_common
856                   compute_dpdk_driver: uio
857                   compute_ovs_pmd_cpu_mask: "0x6"
858                   compute_ovs_dpdk_socket_mem: "1024"
859                   compute_ovs_dpdk_lcore_mask: "0x8"
860                   compute_ovs_memory_channels: "2"
861                   dpdk0_driver: igb_uio
862                   dpdk0_n_rxq: 2
863
864 ``SDF``
865 ~~~~~~~
866
867 Scenario Descriptor Files are not yet implemented in the OPNFV Fuel ``Hunter``
868 release.
869
870 Instead, embedded OPNFV Fuel scenarios files are locally available in
871 ``mcp/config/scenario``.
872
873 OPNFV Software Installation and Deployment
874 ==========================================
875
876 This section describes the process of installing all the components needed to
877 deploy the full OPNFV reference platform stack across a server cluster.
878
879 Deployment Types
880 ~~~~~~~~~~~~~~~~
881
882 .. WARNING::
883
884     OPNFV releases previous to ``Hunter`` used to rely on the ``virtual``
885     keyword being part of the POD name (e.g. ``ericsson-virtual2``) to
886     configure the deployment type as ``virtual``. Otherwise ``baremetal``
887     was implied.
888
889 ``Gambia`` and newer releases are more flexbile towards supporting a mix
890 of ``baremetal`` and ``virtual`` nodes, so the type of deployment is
891 now automatically determined based on the cluster nodes types in ``PDF``:
892
893 +---------------------------------+-------------------------------------------+
894 | ``PDF`` has nodes of type       | Deployment type                           |
895 +---------------+-----------------+                                           |
896 | ``baremetal`` | ``virtual``     |                                           |
897 +===============+=================+===========================================+
898 | yes           | no              | ``baremetal``                             |
899 +---------------+-----------------+-------------------------------------------+
900 | yes           | yes             | ``hybrid``                                |
901 +---------------+-----------------+-------------------------------------------+
902 | no            | yes             | ``virtual``                               |
903 +---------------+-----------------+-------------------------------------------+
904
905 Based on that, the deployment script will later enable/disable certain extra
906 nodes (e.g. ``mas01``) and/or ``STATE`` files (e.g. ``maas``).
907
908 ``HA`` vs ``noHA``
909 ~~~~~~~~~~~~~~~~~~
910
911 High availability of OpenStack services is determined based on scenario name,
912 e.g. ``os-nosdn-nofeature-noha`` vs ``os-nosdn-nofeature-ha``.
913
914 .. TIP::
915
916     ``HA`` scenarios imply a virtualized control plane (``VCP``) for the
917     OpenStack services running on the 3 ``kvm`` nodes.
918
919     .. SEEALSO::
920
921         An experimental feature argument (``-N``) is supported by the deploy
922         script for disabling ``VCP``, although it might not be supported by
923         all scenarios and is not being continuosly validated by OPNFV CI/CD.
924
925 .. WARNING::
926
927     ``virtual`` ``HA`` deployments are not officially supported, due to
928     poor performance and various limitations of nested virtualization on
929     both ``x86_64`` and ``aarch64`` architectures.
930
931     .. TIP::
932
933         ``virtual`` ``HA`` deployments without ``VCP`` are supported, but
934         highly experimental.
935
936 +-------------------------------+-------------------------+-------------------+
937 | Feature                       | ``HA`` scenario         | ``noHA`` scenario |
938 +===============================+=========================+===================+
939 | ``VCP``                       | yes,                    | no                |
940 | (Virtualized Control Plane)   | disabled with ``-N``    |                   |
941 +-------------------------------+-------------------------+-------------------+
942 | OpenStack APIs SSL            | yes                     | no                |
943 +-------------------------------+-------------------------+-------------------+
944 | Storage                       | ``GlusterFS``           | ``NFS``           |
945 +-------------------------------+-------------------------+-------------------+
946
947 Steps to Start the Automatic Deploy
948 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
949
950 These steps are common for ``virtual``, ``baremetal`` or ``hybrid`` deploys,
951 ``x86_64``, ``aarch64`` or ``mixed`` (``x86_64`` and ``aarch64``):
952
953 - Clone the OPNFV Fuel code from gerrit
954 - Checkout the ``Hunter`` release tag
955 - Start the deploy script
956
957 .. NOTE::
958
959     The deployment uses the OPNFV Pharos project as input (``PDF`` and
960     ``IDF`` files) for hardware and network configuration of all current
961     OPNFV PODs.
962
963     When deploying a new POD, one may pass the ``-b`` flag to the deploy
964     script to override the path for the labconfig directory structure
965     containing the ``PDF`` and ``IDF`` (``<URI to configuration repo ...>`` is
966     the absolute path to a local or remote directory structure, populated
967     similar to `pharos git repo`_, i.e. ``PDF``/``IDF`` reside in a
968     subdirectory called ``labs/<lab_name>``).
969
970 .. code-block:: console
971
972     jenkins@jumpserver:~$ git clone https://git.opnfv.org/fuel
973     jenkins@jumpserver:~$ cd fuel
974     jenkins@jumpserver:~/fuel$ git checkout opnfv-8.1.0
975     jenkins@jumpserver:~/fuel$ ci/deploy.sh -l <lab_name> \
976                                             -p <pod_name> \
977                                             -b <URI to configuration repo containing the PDF/IDF files> \
978                                             -s <scenario> \
979                                             -D \
980                                             -S <Storage directory for deploy artifacts> |& tee deploy.log
981
982 .. TIP::
983
984     Besides the basic options,  there are other recommended deploy arguments:
985
986     - use ``-D`` option to enable the debug info
987     - use ``-S`` option to point to a tmp dir where the disk images are saved.
988       The deploy artifacts will be re-used on subsequent (re)deployments.
989     - use ``|& tee`` to save the deploy log to a file
990
991 Typical Cluster Examples
992 ~~~~~~~~~~~~~~~~~~~~~~~~
993
994 Common cluster layouts usually fall into one of the cases described below,
995 categorized by deployment type (``baremetal``, ``virtual`` or ``hybrid``) and
996 high availability (``HA`` or ``noHA``).
997
998 A simplified overview of the steps ``deploy.sh`` will automatically perform is:
999
1000 - create a Salt Master Docker container on the jumpserver, which will drive
1001   the rest of the installation;
1002 - ``baremetal`` or ``hybrid`` only: create a ``MaaS`` container node,
1003   which will be leveraged using Salt to handle OS provisioning on the
1004   ``baremetal`` nodes;
1005 - leverage Salt to install & configure OpenStack;
1006
1007 .. NOTE::
1008
1009     A Docker network ``mcpcontrol`` is always created for initial connection
1010     of the infrastructure containers (``cfg01``, ``mas01``) on Jumphost.
1011
1012 .. WARNING::
1013
1014     A single cluster deployment per ``jumpserver`` node is currently supported,
1015     indifferent of its type (``virtual``, ``baremetal`` or ``hybrid``).
1016
1017 Once the deployment is complete, the following should be accessible:
1018
1019 +---------------+----------------------------------+---------------------------+
1020 | Resource      | ``HA`` scenario                  | ``noHA`` scenario         |
1021 +===============+==================================+===========================+
1022 | ``Horizon``   | ``https://<prx public VIP>``     | ``http://<ctl VIP>:8078`` |
1023 | (Openstack    |                                  |                           |
1024 | Dashboard)    |                                  |                           |
1025 +---------------+----------------------------------+---------------------------+
1026 | ``SaltStack`` | ``http://<prx public VIP>:8090`` | N/A                       |
1027 | Deployment    |                                  |                           |
1028 | Documentation |                                  |                           |
1029 +---------------+----------------------------------+---------------------------+
1030
1031 .. SEEALSO::
1032
1033     For more details on locating and importing the generated SSL certificate,
1034     see :ref:`OPNFV Fuel User Guide <fuel-userguide>`.
1035
1036 ``virtual`` ``noHA`` POD
1037 ------------------------
1038
1039 In the following figure there are two generic examples of ``virtual`` deploys,
1040 each on a separate Jumphost node, both behind the same ``TOR`` switch:
1041
1042 - Jumphost 1 has only virsh bridges (created by the deploy script);
1043 - Jumphost 2 has a mix of Linux (manually created) and ``libvirt`` managed
1044   bridges (created by the deploy script);
1045
1046 .. figure:: img/fuel_virtual_noha.png
1047    :align: center
1048    :width: 60%
1049    :alt: OPNFV Fuel Virtual noHA POD Network Layout Examples
1050
1051    OPNFV Fuel Virtual noHA POD Network Layout Examples
1052
1053    +-------------+------------------------------------------------------------+
1054    | ``cfg01``   | Salt Master Docker container                               |
1055    +-------------+------------------------------------------------------------+
1056    | ``ctl01``   | Controller VM                                              |
1057    +-------------+------------------------------------------------------------+
1058    | ``gtw01``   | Gateway VM with neutron services                           |
1059    |             | (``DHCP`` agent, ``L3`` agent, ``metadata`` agent etc)     |
1060    +-------------+------------------------------------------------------------+
1061    | ``odl01``   | VM on which ``ODL`` runs                                   |
1062    |             | (for scenarios deployed with ODL)                          |
1063    +-------------+------------------------------------------------------------+
1064    | ``cmp001``, | Compute VMs                                                |
1065    | ``cmp002``  |                                                            |
1066    +-------------+------------------------------------------------------------+
1067
1068 .. TIP::
1069
1070     If external access to the ``public`` network is not required, there is
1071     little to no motivation to create a custom ``PDF``/``IDF`` set for a
1072     virtual deployment.
1073
1074     Instead, the existing virtual PODs definitions in `pharos git repo`_ can
1075     be used as-is:
1076
1077     - ``ericsson-virtual1`` for ``x86_64``;
1078     - ``arm-virtual2`` for ``aarch64``;
1079
1080 .. code-block:: console
1081
1082     # example deploy cmd for an x86_64 virtual cluster
1083     jenkins@jumpserver:~/fuel$ ci/deploy.sh -l ericsson \
1084                                             -p virtual1 \
1085                                             -s os-nosdn-nofeature-noha \
1086                                             -D \
1087                                             -S /home/jenkins/tmpdir |& tee deploy.log
1088
1089 ``baremetal`` ``noHA`` POD
1090 --------------------------
1091
1092 .. WARNING::
1093
1094     These scenarios are not tested in OPNFV CI, so they are considered
1095     experimental.
1096
1097 .. figure:: img/fuel_baremetal_noha.png
1098    :align: center
1099    :width: 60%
1100    :alt: OPNFV Fuel Baremetal noHA POD Network Layout Example
1101
1102    OPNFV Fuel Baremetal noHA POD Network Layout Example
1103
1104    +-------------+------------------------------------------------------------+
1105    | ``cfg01``   | Salt Master Docker container                               |
1106    +-------------+------------------------------------------------------------+
1107    | ``mas01``   | MaaS Node Docker container                                 |
1108    +-------------+------------------------------------------------------------+
1109    | ``ctl01``   | Baremetal controller node                                  |
1110    +-------------+------------------------------------------------------------+
1111    | ``gtw01``   | Baremetal Gateway with neutron services                    |
1112    |             | (dhcp agent, L3 agent, metadata, etc)                      |
1113    +-------------+------------------------------------------------------------+
1114    | ``odl01``   | Baremetal node on which ODL runs                           |
1115    |             | (for scenarios deployed with ODL, otherwise unused         |
1116    +-------------+------------------------------------------------------------+
1117    | ``cmp001``, | Baremetal Computes                                         |
1118    | ``cmp002``  |                                                            |
1119    +-------------+------------------------------------------------------------+
1120    | Tenant VM   | VM running in the cloud                                    |
1121    +-------------+------------------------------------------------------------+
1122
1123 ``baremetal`` ``HA`` POD
1124 ------------------------
1125
1126 .. figure:: img/fuel_baremetal_ha.png
1127    :align: center
1128    :width: 60%
1129    :alt: OPNFV Fuel Baremetal HA POD Network Layout Example
1130
1131    OPNFV Fuel Baremetal HA POD Network Layout Example
1132
1133    +---------------------------+----------------------------------------------+
1134    | ``cfg01``                 | Salt Master Docker container                 |
1135    +---------------------------+----------------------------------------------+
1136    | ``mas01``                 | MaaS Node Docker container                   |
1137    +---------------------------+----------------------------------------------+
1138    | ``kvm01``,                | Baremetals which hold the VMs with           |
1139    | ``kvm02``,                | controller functions                         |
1140    | ``kvm03``                 |                                              |
1141    +---------------------------+----------------------------------------------+
1142    | ``prx01``,                | Proxy VMs for Nginx                          |
1143    | ``prx02``                 |                                              |
1144    +---------------------------+----------------------------------------------+
1145    | ``msg01``,                | RabbitMQ Service VMs                         |
1146    | ``msg02``,                |                                              |
1147    | ``msg03``                 |                                              |
1148    +---------------------------+----------------------------------------------+
1149    | ``dbs01``,                | MySQL service VMs                            |
1150    | ``dbs02``,                |                                              |
1151    | ``dbs03``                 |                                              |
1152    +---------------------------+----------------------------------------------+
1153    | ``mdb01``,                | Telemetry VMs                                |
1154    | ``mdb02``,                |                                              |
1155    | ``mdb03``                 |                                              |
1156    +---------------------------+----------------------------------------------+
1157    | ``odl01``                 | VM on which ``OpenDaylight`` runs            |
1158    |                           | (for scenarios deployed with ``ODL``)        |
1159    +---------------------------+----------------------------------------------+
1160    | ``cmp001``,               | Baremetal Computes                           |
1161    | ``cmp002``                |                                              |
1162    +---------------------------+----------------------------------------------+
1163    | Tenant VM                 | VM running in the cloud                      |
1164    +---------------------------+----------------------------------------------+
1165
1166 .. code-block:: console
1167
1168     # x86_x64 baremetal deploy on pod2 from Linux Foundation lab (lf-pod2)
1169     jenkins@jumpserver:~/fuel$ ci/deploy.sh -l lf \
1170                                             -p pod2 \
1171                                             -s os-nosdn-nofeature-ha \
1172                                             -D \
1173                                             -S /home/jenkins/tmpdir |& tee deploy.log
1174
1175 .. code-block:: console
1176
1177     # aarch64 baremetal deploy on pod5 from Enea ARM lab (arm-pod5)
1178     jenkins@jumpserver:~/fuel$ ci/deploy.sh -l arm \
1179                                             -p pod5 \
1180                                             -s os-nosdn-nofeature-ha \
1181                                             -D \
1182                                             -S /home/jenkins/tmpdir |& tee deploy.log
1183
1184 ``hybrid`` ``noHA`` POD
1185 -----------------------
1186
1187 .. figure:: img/fuel_hybrid_noha.png
1188    :align: center
1189    :width: 60%
1190    :alt: OPNFV Fuel Hybrid noHA POD Network Layout Examples
1191
1192    OPNFV Fuel Hybrid noHA POD Network Layout Examples
1193
1194    +-------------+------------------------------------------------------------+
1195    | ``cfg01``   | Salt Master Docker container                               |
1196    +-------------+------------------------------------------------------------+
1197    | ``mas01``   | MaaS Node Docker container                                 |
1198    +-------------+------------------------------------------------------------+
1199    | ``ctl01``   | Controller VM                                              |
1200    +-------------+------------------------------------------------------------+
1201    | ``gtw01``   | Gateway VM with neutron services                           |
1202    |             | (``DHCP`` agent, ``L3`` agent, ``metadata`` agent etc)     |
1203    +-------------+------------------------------------------------------------+
1204    | ``odl01``   | VM on which ``ODL`` runs                                   |
1205    |             | (for scenarios deployed with ODL)                          |
1206    +-------------+------------------------------------------------------------+
1207    | ``cmp001``, | Baremetal Computes                                         |
1208    | ``cmp002``  |                                                            |
1209    +-------------+------------------------------------------------------------+
1210
1211 Automatic Deploy Breakdown
1212 ~~~~~~~~~~~~~~~~~~~~~~~~~~
1213
1214 When an automatic deploy is started, the following operations are performed
1215 sequentially by the deploy script:
1216
1217 +------------------+----------------------------------------------------------+
1218 | **Deploy stage** | **Details**                                              |
1219 +==================+==========================================================+
1220 | Argument         | enviroment variables and command line arguments passed   |
1221 | Parsing          | to ``deploy.sh`` are interpreted                         |
1222 +------------------+----------------------------------------------------------+
1223 | Distribution     | Install and/or configure mandatory requirements on the   |
1224 | Package          | ``jumpserver`` node:                                     |
1225 | Installation     |                                                          |
1226 |                  | - ``Docker`` (from upstream and not distribution repos,  |
1227 |                  |   as the version included in ``Ubuntu`` ``Xenial`` is    |
1228 |                  |   outdated);                                             |
1229 |                  | - ``docker-compose`` (from upstream, as the version      |
1230 |                  |   included in both ``CentOS 7`` and                      |
1231 |                  |   ``Ubuntu Xenial 16.04`` has dependency issues on most  |
1232 |                  |   systems);                                              |
1233 |                  | - ``virt-inst`` (from upstream, as the version included  |
1234 |                  |   in ``Ubuntu Xenial 16.04`` is outdated and lacks       |
1235 |                  |   certain required features);                            |
1236 |                  | - other miscelaneous requirements, depending on          |
1237 |                  |   ``jumpserver`` distribution OS;                        |
1238 |                  |                                                          |
1239 |                  | .. SEEALSO::                                             |
1240 |                  |                                                          |
1241 |                  |     - ``mcp/scripts/requirements_deb.yaml`` (``Ubuntu``) |
1242 |                  |     - ``mcp/scripts/requirements_rpm.yaml`` (``CentOS``) |
1243 |                  |                                                          |
1244 |                  | .. WARNING::                                             |
1245 |                  |                                                          |
1246 |                  |     Mininum required ``Docker`` version is ``17.x``.     |
1247 |                  |                                                          |
1248 |                  | .. WARNING::                                             |
1249 |                  |                                                          |
1250 |                  |     Mininum required ``virt-inst`` version is ``1.4``.   |
1251 +------------------+----------------------------------------------------------+
1252 | Patch            | For each ``git`` submodule in OPNFV Fuel repository,     |
1253 | Apply            | if a subdirectory with the same name exists under        |
1254 |                  | ``mcp/patches``, all patches in that subdirectory are    |
1255 |                  | applied using ``git-am`` to the respective ``git``       |
1256 |                  | submodule.                                               |
1257 |                  |                                                          |
1258 |                  | This allows OPNFV Fuel to alter upstream repositories    |
1259 |                  | contents before consuming them, including:               |
1260 |                  |                                                          |
1261 |                  | - ``Docker`` container build process customization;      |
1262 |                  | - ``salt-formulas`` customization;                       |
1263 |                  | - ``reclass.system`` customization;                      |
1264 |                  |                                                          |
1265 |                  | .. SEEALSO::                                             |
1266 |                  |                                                          |
1267 |                  |     - ``mcp/patches/README.rst``                         |
1268 +------------------+----------------------------------------------------------+
1269 | SSH RSA Keypair  | If not already present, a RSA keypair is generated on    |
1270 | Generation       | the ``jumpserver`` node at:                              |
1271 |                  |                                                          |
1272 |                  | - ``/var/lib/opnfv/mcp.rsa{,.pub}``                      |
1273 |                  |                                                          |
1274 |                  | The public key will be added to the ``authorized_keys``  |
1275 |                  | list for ``ubuntu`` user, so the private key can be used |
1276 |                  | for key-based logins on:                                 |
1277 |                  |                                                          |
1278 |                  | - ``cfg01``, ``mas01`` infrastructure nodes;             |
1279 |                  | - all cluster nodes (``baremetal`` and/or ``virtual``),  |
1280 |                  |   including ``VCP`` VMs;                                 |
1281 +------------------+----------------------------------------------------------+
1282 | ``j2``           | Based on ``XDF`` (``PDF``, ``IDF``, ``SDF``) and         |
1283 | Expansion        | additional deployment configuration determined during    |
1284 |                  | ``argument parsing`` stage described above, all jinja2   |
1285 |                  | templates are expanded, including:                       |
1286 |                  |                                                          |
1287 |                  | - various classes in ``reclass.cluster``;                |
1288 |                  | - docker-compose ``yaml`` for Salt Master bring-up;      |
1289 |                  | - ``libvirt`` network definitions (``xml``);             |
1290 +------------------+----------------------------------------------------------+
1291 | Jumpserver       | Basic validation that common ``jumpserver`` requirements |
1292 | Requirements     | are satisfied, e.g. ``PXE/admin`` is Linux bridge if     |
1293 | Check            | ``baremetal`` nodes are defined in the ``PDF``.          |
1294 +------------------+----------------------------------------------------------+
1295 | Infrastucture    | .. NOTE::                                                |
1296 | Setup            |                                                          |
1297 |                  |     All steps apply to and only to the ``jumpserver``.   |
1298 |                  |                                                          |
1299 |                  | - prepare virtual machines;                              |
1300 |                  | - (re)create ``libvirt`` managed networks;               |
1301 |                  | - apply ``sysctl`` configuration;                        |
1302 |                  | - apply ``udev`` configuration;                          |
1303 |                  | - create & start virtual machines prepared earlier;      |
1304 |                  | - create & start Salt Master (``cfg01``) Docker          |
1305 |                  |   container;                                             |
1306 +------------------+----------------------------------------------------------+
1307 | ``STATE``        | Based on deployment type, scenario and other parameters, |
1308 | Files            | a ``STATE`` file list is constructed, then executed      |
1309 |                  | sequentially.                                            |
1310 |                  |                                                          |
1311 |                  | .. TIP::                                                 |
1312 |                  |                                                          |
1313 |                  |     The table below lists all current ``STATE`` files    |
1314 |                  |     and their intended action.                           |
1315 |                  |                                                          |
1316 |                  | .. SEEALSO::                                             |
1317 |                  |                                                          |
1318 |                  |     For more information on how the list of ``STATE``    |
1319 |                  |     files is constructed, see                            |
1320 |                  |     :ref:`OPNFV Fuel User Guide <fuel-userguide>`.       |
1321 +------------------+----------------------------------------------------------+
1322 | Log              | Contents of ``/var/log`` are recursively gathered from   |
1323 | Collection       | all the nodes, then archived together for later          |
1324 |                  | inspection.                                              |
1325 +------------------+----------------------------------------------------------+
1326
1327 ``STATE`` Files Overview
1328 ------------------------
1329
1330 +---------------------------+-------------------------------------------------+
1331 | ``STATE`` file            | Targets involved and main intended action       |
1332 +===========================+=================================================+
1333 | ``virtual_init``          | ``cfg01``: reclass node generation              |
1334 |                           |                                                 |
1335 |                           | ``jumpserver`` VMs (if present): basic OS       |
1336 |                           | config                                          |
1337 +---------------------------+-------------------------------------------------+
1338 | ``maas``                  | ``mas01``: OS, MaaS configuration               |
1339 |                           | ``baremetal`` node commissioning and deploy     |
1340 |                           |                                                 |
1341 |                           | .. NOTE::                                       |
1342 |                           |                                                 |
1343 |                           |     Skipped if no ``baremetal`` nodes are       |
1344 |                           |     defined in ``PDF`` (``virtual`` deploy).    |
1345 +---------------------------+-------------------------------------------------+
1346 | ``baremetal_init``        | ``kvm``, ``cmp``: OS install, config            |
1347 +---------------------------+-------------------------------------------------+
1348 | ``dpdk``                  | ``cmp``: configure OVS-DPDK                     |
1349 +---------------------------+-------------------------------------------------+
1350 | ``networks``              | ``ctl``: create OpenStack networks              |
1351 +---------------------------+-------------------------------------------------+
1352 | ``neutron_gateway``       | ``gtw01``: configure Neutron gateway            |
1353 +---------------------------+-------------------------------------------------+
1354 | ``opendaylight``          | ``odl01``: install & configure ``ODL``          |
1355 +---------------------------+-------------------------------------------------+
1356 | ``openstack_noha``        | cluster nodes: install OpenStack without ``HA`` |
1357 +---------------------------+-------------------------------------------------+
1358 | ``openstack_ha``          | cluster nodes: install OpenStack with ``HA``    |
1359 +---------------------------+-------------------------------------------------+
1360 | ``virtual_control_plane`` | ``kvm``: create ``VCP`` VMs                     |
1361 |                           |                                                 |
1362 |                           | ``VCP`` VMs: basic OS config                    |
1363 |                           |                                                 |
1364 |                           | .. NOTE::                                       |
1365 |                           |                                                 |
1366 |                           |     Skipped if ``-N`` deploy argument is used.  |
1367 +---------------------------+-------------------------------------------------+
1368 | ``tacker``                | ``ctl``: install & configure Tacker             |
1369 +---------------------------+-------------------------------------------------+
1370
1371 Release Notes
1372 =============
1373
1374 Please refer to the :ref:`OPNFV Fuel Release Notes <fuel-releasenotes>`
1375 article.
1376
1377 References
1378 ==========
1379
1380 For more information on the OPNFV ``Hunter`` 8.1 release, please see:
1381
1382 #. `OPNFV Home Page`_
1383 #. `OPNFV Documentation`_
1384 #. `OPNFV Software Downloads`_
1385 #. `OPNFV Hunter Wiki Page`_
1386 #. `OpenStack Rocky Release Artifacts`_
1387 #. `OpenStack Documentation`_
1388 #. `OpenDaylight Artifacts`_
1389 #. `Mirantis Cloud Platform Documentation`_
1390 #. `Saltstack Documentation`_
1391 #. `Saltstack Formulas`_
1392 #. `Reclass`_
1393
1394 .. FIXME: cleanup unused refs, extend above list
1395 .. _`OpenDaylight`: https://www.opendaylight.org
1396 .. _`OpenDaylight Artifacts`: https://www.opendaylight.org/software/downloads
1397 .. _`MCP`: https://www.mirantis.com/software/mcp/
1398 .. _`Mirantis Cloud Platform Documentation`: https://docs.mirantis.com/mcp/latest/
1399 .. _`fuel git repository`: https://git.opnfv.org/fuel
1400 .. _`pharos git repo`: https://git.opnfv.org/pharos
1401 .. _`OpenStack Documentation`: https://docs.openstack.org/rocky
1402 .. _`OpenStack Rocky Release Artifacts`: https://www.openstack.org/software/rocky
1403 .. _`OPNFV Home Page`: https://www.opnfv.org
1404 .. _`OPNFV Hunter Wiki Page`: https://wiki.opnfv.org/display/SWREL/Hunter
1405 .. _`OPNFV Documentation`: https://docs.opnfv.org
1406 .. _`OPNFV Software Downloads`: https://www.opnfv.org/software/downloads
1407 .. _`Apache License 2.0`: https://www.apache.org/licenses/LICENSE-2.0
1408 .. _`Saltstack Documentation`: https://docs.saltstack.com/en/latest/topics/
1409 .. _`Saltstack Formulas`: https://salt-formulas.readthedocs.io/en/latest/
1410 .. _`Reclass`: https://reclass.pantsfullofunix.net
1411 .. _`OPNFV Pharos Specification`: https://wiki.opnfv.org/display/pharos/Pharos+Specification
1412 .. _`OPNFV PDF Wiki Page`: https://wiki.opnfv.org/display/INF/POD+Descriptor