b8a95ff3378b65f47f5398b9c367d7a0193f6e7a
[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 Abstract
7 ========
8
9 This document describes how to install the Fraser release of
10 OPNFV when using Fuel as a deployment tool, covering its usage,
11 limitations, dependencies and required system resources.
12 This is an unified documentation for both x86_64 and aarch64
13 architectures. All information is common for both architectures
14 except when explicitly stated.
15
16 ============
17 Introduction
18 ============
19
20 This document provides guidelines on how to install and
21 configure the Fraser release of OPNFV when using Fuel as a
22 deployment tool, including required software and hardware configurations.
23
24 Although the available installation options provide a high degree of
25 freedom in how the system is set up, including architecture, services
26 and features, etc., said permutations may not provide an OPNFV
27 compliant reference architecture. This document provides a
28 step-by-step guide that results in an OPNFV Fraser compliant
29 deployment.
30
31 The audience of this document is assumed to have good knowledge of
32 networking and Unix/Linux administration.
33
34 =======
35 Preface
36 =======
37
38 Before starting the installation of the Fraser release of
39 OPNFV, using Fuel as a deployment tool, some planning must be
40 done.
41
42 Preparations
43 ============
44
45 Prior to installation, a number of deployment specific parameters must be 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 #.     Network overlay you plan to deploy (VLAN, VXLAN, FLAT)
56
57 #.     How many nodes and what roles you want to deploy (Controllers, Storage, Computes)
58
59 #.     Monitoring options you want to deploy (Ceilometer, Syslog, etc.).
60
61 #.     Other options not covered in the document are available in the links above
62
63
64 This information will be needed for the configuration procedures
65 provided in this document.
66
67 =========================================
68 Hardware Requirements for Virtual Deploys
69 =========================================
70
71 The following minimum hardware requirements must be met for the virtual
72 installation of Fraser using Fuel:
73
74 +----------------------------+--------------------------------------------------------+
75 | **HW Aspect**              | **Requirement**                                        |
76 |                            |                                                        |
77 +============================+========================================================+
78 | **1 Jumpserver**           | A physical node (also called Foundation Node) that     |
79 |                            | will host a Salt Master VM and each of the VM nodes in |
80 |                            | the virtual deploy                                     |
81 +----------------------------+--------------------------------------------------------+
82 | **CPU**                    | Minimum 1 socket with Virtualization support           |
83 +----------------------------+--------------------------------------------------------+
84 | **RAM**                    | Minimum 32GB/server (Depending on VNF work load)       |
85 +----------------------------+--------------------------------------------------------+
86 | **Disk**                   | Minimum 100GB (SSD or SCSI (15krpm) highly recommended)|
87 +----------------------------+--------------------------------------------------------+
88
89
90 ===========================================
91 Hardware Requirements for Baremetal Deploys
92 ===========================================
93
94 The following minimum hardware requirements must be met for the baremetal
95 installation of Fraser using Fuel:
96
97 +-------------------------+------------------------------------------------------+
98 | **HW Aspect**           | **Requirement**                                      |
99 |                         |                                                      |
100 +=========================+======================================================+
101 | **# of nodes**          | Minimum 5                                            |
102 |                         |                                                      |
103 |                         | - 3 KVM servers which will run all the controller    |
104 |                         |   services                                           |
105 |                         |                                                      |
106 |                         | - 2 Compute nodes                                    |
107 |                         |                                                      |
108 +-------------------------+------------------------------------------------------+
109 | **CPU**                 | Minimum 1 socket with Virtualization support         |
110 +-------------------------+------------------------------------------------------+
111 | **RAM**                 | Minimum 16GB/server (Depending on VNF work load)     |
112 +-------------------------+------------------------------------------------------+
113 | **Disk**                | Minimum 256GB 10kRPM spinning disks                  |
114 +-------------------------+------------------------------------------------------+
115 | **Networks**            | 4 VLANs (PUBLIC, MGMT, STORAGE, PRIVATE) - can be    |
116 |                         | a mix of tagged/native                               |
117 |                         |                                                      |
118 |                         | 1 Un-Tagged VLAN for PXE Boot - ADMIN Network        |
119 |                         |                                                      |
120 |                         | Note: These can be allocated to a single NIC -       |
121 |                         | or spread out over multiple NICs                     |
122 +-------------------------+------------------------------------------------------+
123 | **1 Jumpserver**        | A physical node (also called Foundation Node) that   |
124 |                         | hosts the Salt Master and MaaS VMs                   |
125 +-------------------------+------------------------------------------------------+
126 | **Power management**    | All targets need to have power management tools that |
127 |                         | allow rebooting the hardware and setting the boot    |
128 |                         | order (e.g. IPMI)                                    |
129 +-------------------------+------------------------------------------------------+
130
131 **NOTE:** All nodes including the Jumpserver must have the same architecture (either x86_64 or aarch64).
132
133 **NOTE:** For aarch64 deployments an UEFI compatible firmware with PXE support is needed (e.g. EDK2).
134
135 ===============================
136 Help with Hardware Requirements
137 ===============================
138
139 Calculate hardware requirements:
140
141 For information on compatible hardware types available for use,
142 please see `Fuel OpenStack Hardware Compatibility List <https://www.mirantis.com/software/hardware-compatibility/>`_
143
144 When choosing the hardware on which you will deploy your OpenStack
145 environment, you should think about:
146
147 - CPU -- Consider the number of virtual machines that you plan to deploy in your cloud environment and the CPUs per virtual machine.
148
149 - Memory -- Depends on the amount of RAM assigned per virtual machine and the controller node.
150
151 - Storage -- Depends on the local drive space per virtual machine, remote volumes that can be attached to a virtual machine, and object storage.
152
153 - Networking -- Depends on the Choose Network Topology, the network bandwidth per virtual machine, and network storage.
154
155 ================================================
156 Top of the Rack (TOR) Configuration Requirements
157 ================================================
158
159 The switching infrastructure provides connectivity for the OPNFV
160 infrastructure operations, tenant networks (East/West) and provider
161 connectivity (North/South); it also provides needed connectivity for
162 the Storage Area Network (SAN).
163 To avoid traffic congestion, it is strongly suggested that three
164 physically separated networks are used, that is: 1 physical network
165 for administration and control, one physical network for tenant private
166 and public networks, and one physical network for SAN.
167 The switching connectivity can (but does not need to) be fully redundant,
168 in such case it comprises a redundant 10GE switch pair for each of the
169 three physically separated networks.
170
171 The physical TOR switches are **not** automatically configured from
172 the Fuel OPNFV reference platform. All the networks involved in the OPNFV
173 infrastructure as well as the provider networks and the private tenant
174 VLANs needs to be manually configured.
175
176 Manual configuration of the Fraser hardware platform should
177 be carried out according to the `OPNFV Pharos Specification
178 <https://wiki.opnfv.org/display/pharos/Pharos+Specification>`_.
179
180 ============================
181 OPNFV Software Prerequisites
182 ============================
183
184 The Jumpserver node should be pre-provisioned with an operating system,
185 according to the Pharos specification. Relevant network bridges should
186 also be pre-configured (e.g. admin_br, mgmt_br, public_br).
187
188 - The admin bridge (admin_br) is mandatory for the baremetal nodes PXE booting during Fuel installation.
189 - The management bridge (mgmt_br) is required for testing suites (e.g. functest/yardstick), it is
190   suggested to pre-configure it for debugging purposes.
191 - The public bridge (public_br) is also nice to have for debugging purposes, but not mandatory.
192
193 The user running the deploy script on the Jumpserver should belong to "sudo" and "libvirt" groups,
194 and have passwordless sudo access.
195
196 The following example adds the groups to the user "jenkins"
197
198 .. code-block:: bash
199
200     $ sudo usermod -aG sudo jenkins
201     $ sudo usermod -aG libvirt jenkins
202     $ reboot
203     $ groups
204     jenkins sudo libvirt
205
206     $ sudo visudo
207     ...
208     %jenkins ALL=(ALL) NOPASSWD:ALL
209
210 The folder containing the temporary deploy artifacts (/home/jenkins/tmpdir in the examples below)
211 needs to have mask 777 in order for libvirt to be able to use them.
212
213 .. code-block:: bash
214
215     $ mkdir -p -m 777 /home/jenkins/tmpdir
216
217 For an AArch64 Jumpserver, the "libvirt" minimum required version is 3.x, 3.5 or newer highly recommended.
218 While not mandatory, upgrading the kernel and QEMU on the Jumpserver is also highly recommended
219 (especially on AArch64 Jumpservers).
220
221 For CentOS 7.4 (AArch64), distro provided packages are already new enough.
222 For Ubuntu 16.04 (arm64), distro packages are too old and 3rd party repositories should be used.
223 For convenience, Armband provides a DEB repository holding all the required packages.
224
225 To add and enable the Armband repository on an Ubuntu 16.04 system,
226 create a new sources list file `/apt/sources.list.d/armband.list` with the following contents:
227
228 .. code-block:: bash
229
230     $ cat /etc/apt/sources.list.d/armband.list
231     //for OpenStack Pike release
232     deb http://linux.enea.com/mcp-repos/pike/xenial pike-armband main
233
234     $ apt-get update
235
236 Fuel@OPNFV has been validated by CI using the following distributions
237 installed on the Jumpserver:
238
239 - CentOS 7 (recommended by Pharos specification);
240 - Ubuntu Xenial;
241
242 **NOTE**: The install script expects 'libvirt' to be already running on the Jumpserver. In case libvirt
243 packages are missing, the script will install them; but depending on the OS distribution, the user
244 might have to start the 'libvirtd' service manually, then run the deploy script again. Therefore, it
245 is recommended to install libvirt-bin explicitly on the Jumpserver before the deployment.
246
247 **NOTE**: It is also recommended to install the newer kernel on the Jumpserver before the deployment.
248
249 **NOTE**: The install script will automatically install the rest of required distro package
250 dependencies on the Jumpserver, unless explicitly asked not to (via -P deploy arg). This includes
251 Python, QEMU, libvirt etc.
252
253 **NOTE**: The install script will alter Jumpserver sysconf and disable `net.bridge.bridge-nf-call`.
254
255 .. code-block:: bash
256
257     $ apt-get install linux-image-generic-hwe-16.04-edge libvirt-bin
258
259
260 ==========================================
261 OPNFV Software Installation and Deployment
262 ==========================================
263
264 This section describes the process of installing all the components needed to
265 deploy the full OPNFV reference platform stack across a server cluster.
266
267 The installation is done with Mirantis Cloud Platform (MCP), which is based on
268 a reclass model. This model provides the formula inputs to Salt, to make the deploy
269 automatic based on deployment scenario.
270 The reclass model covers:
271
272    - Infrastructure node definition: Salt Master node (cfg01) and MaaS node (mas01)
273    - OpenStack node definition: Controller nodes (ctl01, ctl02, ctl03) and Compute nodes (cmp001, cmp002)
274    - Infrastructure components to install (software packages, services etc.)
275    - OpenStack components and services (rabbitmq, galera etc.), as well as all configuration for them
276
277
278 Automatic Installation of a Virtual POD
279 =======================================
280
281 For virtual deploys all the targets are VMs on the Jumpserver. The deploy script will:
282
283    - Create a Salt Master VM on the Jumpserver which will drive the installation
284    - Create the bridges for networking with virsh (only if a real bridge does not already exist for a given network)
285    - Install OpenStack on the targets
286       - Leverage Salt to install & configure OpenStack services
287
288 .. figure:: img/fuel_virtual.png
289    :align: center
290    :alt: Fuel@OPNFV Virtual POD Network Layout Examples
291
292    Fuel@OPNFV Virtual POD Network Layout Examples
293
294    +-----------------------+------------------------------------------------------------------------+
295    | cfg01                 | Salt Master VM                                                         |
296    +-----------------------+------------------------------------------------------------------------+
297    | ctl01                 | Controller VM                                                          |
298    +-----------------------+------------------------------------------------------------------------+
299    | cmp01/cmp02           | Compute VMs                                                            |
300    +-----------------------+------------------------------------------------------------------------+
301    | gtw01                 | Gateway VM with neutron services (dhcp agent, L3 agent, metadata, etc) |
302    +-----------------------+------------------------------------------------------------------------+
303    | odl01                 | VM on which ODL runs (for scenarios deployed with ODL)                 |
304    +-----------------------+------------------------------------------------------------------------+
305
306
307 In this figure there are examples of two virtual deploys:
308    - Jumphost 1 has only virsh bridges, created by the deploy script
309    - Jumphost 2 has a mix of Linux and virsh bridges; When Linux bridge exists for a specified network,
310      the deploy script will skip creating a virsh bridge for it
311
312 **Note**: A virtual network "mcpcontrol" is always created for initial connection
313 of the VMs on Jumphost.
314
315
316 Automatic Installation of a Baremetal POD
317 =========================================
318
319 The baremetal installation process can be done by editing the information about
320 hardware and environment in the reclass files, or by using the files Pod Descriptor
321 File (PDF) and Installer Descriptor File (IDF) as described in the OPNFV Pharos project.
322 These files contain all the information about the hardware and network of the deployment
323 that will be fed to the reclass model during deployment.
324
325 The installation is done automatically with the deploy script, which will:
326
327    - Create a Salt Master VM on the Jumpserver which will drive the installation
328    - Create a MaaS Node VM on the Jumpserver which will provision the targets
329    - Install OpenStack on the targets
330       - Leverage MaaS to provision baremetal nodes with the operating system
331       - Leverage Salt to configure the operating system on the baremetal nodes
332       - Leverage Salt to install & configure OpenStack services
333
334 .. figure:: img/fuel_baremetal.png
335    :align: center
336    :alt: Fuel@OPNFV Baremetal POD Network Layout Example
337
338    Fuel@OPNFV Baremetal POD Network Layout Example
339
340    +-----------------------+---------------------------------------------------------+
341    | cfg01                 | Salt Master VM                                          |
342    +-----------------------+---------------------------------------------------------+
343    | mas01                 | MaaS Node VM                                            |
344    +-----------------------+---------------------------------------------------------+
345    | kvm01..03             | Baremetals which hold the VMs with controller functions |
346    +-----------------------+---------------------------------------------------------+
347    | cmp001/cmp002         | Baremetal compute nodes                                 |
348    +-----------------------+---------------------------------------------------------+
349    | prx01/prx02           | Proxy VMs for Nginx                                     |
350    +-----------------------+---------------------------------------------------------+
351    | msg01..03             | RabbitMQ Service VMs                                    |
352    +-----------------------+---------------------------------------------------------+
353    | dbs01..03             | MySQL service VMs                                       |
354    +-----------------------+---------------------------------------------------------+
355    | mdb01..03             | Telemetry VMs                                           |
356    +-----------------------+---------------------------------------------------------+
357    | odl01                 | VM on which ODL runs (for scenarios deployed with ODL)  |
358    +-----------------------+---------------------------------------------------------+
359    | Tenant VM             | VM running in the cloud                                 |
360    +-----------------------+---------------------------------------------------------+
361
362 In the baremetal deploy all bridges but "mcpcontrol" are Linux bridges. For the Jumpserver, it is
363 required to pre-configure at least the admin_br bridge for the PXE/Admin.
364 For the targets, the bridges are created by the deploy script.
365
366 **Note**: A virtual network "mcpcontrol" is always created for initial connection
367 of the VMs on Jumphost.
368
369
370 Steps to Start the Automatic Deploy
371 ===================================
372
373 These steps are common both for virtual and baremetal deploys.
374
375 #. Clone the Fuel code from gerrit
376
377    For x86_64
378
379    .. code-block:: bash
380
381        $ git clone https://git.opnfv.org/fuel
382        $ cd fuel
383
384    For aarch64
385
386    .. code-block:: bash
387
388        $ git clone https://git.opnfv.org/armband
389        $ cd armband
390
391 #. Checkout the Fraser release
392
393    .. code-block:: bash
394
395        $ git checkout opnfv-6.2.0
396
397 #. Start the deploy script
398
399     Besides the basic options,  there are other recommended deploy arguments:
400
401     - use **-D** option to enable the debug info
402     - use **-S** option to point to a tmp dir where the disk images are saved. The images will be
403       re-used between deploys
404     - use **|& tee** to save the deploy log to a file
405
406    .. code-block:: bash
407
408        $ ci/deploy.sh -l <lab_name> \
409                       -p <pod_name> \
410                       -b <URI to configuration repo containing the PDF file> \
411                       -s <scenario> \
412                       -D \
413                       -S <Storage directory for disk images> |& tee deploy.log
414
415 Examples
416 --------
417 #. Virtual deploy
418
419    To start a virtual deployment, it is required to have the `virtual` keyword
420    while specifying the pod name to the installer script.
421
422    It will create the required bridges and networks, configure Salt Master and
423    install OpenStack.
424
425       .. code-block:: bash
426
427           $ ci/deploy.sh -l ericsson \
428                          -p virtual3 \
429                          -s os-nosdn-nofeature-noha \
430                          -D \
431                          -S /home/jenkins/tmpdir |& tee deploy.log
432
433    Once the deployment is complete, the OpenStack Dashboard, Horizon, is
434    available at http://<controller VIP>:8078
435    The administrator credentials are **admin** / **opnfv_secret**.
436
437 #. Baremetal deploy
438
439    A x86 deploy on pod2 from Linux Foundation lab
440
441       .. code-block:: bash
442
443           $ ci/deploy.sh -l lf \
444                          -p pod2 \
445                          -s os-nosdn-nofeature-ha \
446                          -D \
447                          -S /home/jenkins/tmpdir |& tee deploy.log
448
449       .. figure:: img/lf_pod2.png
450          :align: center
451          :alt: Fuel@OPNFV LF POD2 Network Layout
452
453          Fuel@OPNFV LF POD2 Network Layout
454
455    An aarch64 deploy on pod5 from Arm lab
456
457       .. code-block:: bash
458
459           $ ci/deploy.sh -l arm \
460                          -p pod5 \
461                          -s os-nosdn-nofeature-ha \
462                          -D \
463                          -S /home/jenkins/tmpdir |& tee deploy.log
464
465       .. figure:: img/arm_pod5.png
466          :align: center
467          :alt: Fuel@OPNFV ARM POD5 Network Layout
468
469          Fuel@OPNFV ARM POD5 Network Layout
470
471    Once the deployment is complete, the SaltStack Deployment Documentation is
472    available at http://<proxy public VIP>:8090
473
474 **NOTE**: The deployment uses the OPNFV Pharos project as input (PDF and IDF files)
475 for hardware and network configuration of all current OPNFV PODs.
476 When deploying a new POD, one can pass the `-b` flag to the deploy script to override
477 the path for the labconfig directory structure containing the PDF and IDF.
478
479    .. code-block:: bash
480
481        $ ci/deploy.sh -b file://<absolute_path_to_labconfig> \
482                       -l <lab_name> \
483                       -p <pod_name> \
484                       -s <scenario> \
485                       -D \
486                       -S <tmp_folder> |& tee deploy.log
487
488    - <absolute_path_to_labconfig> is the absolute path to a local directory, populated
489      similar to Pharos, i.e. PDF/IDF reside in <absolute_path_to_labconfig>/labs/<lab_name>
490    - <lab_name> is the same as the directory in the path above
491    - <pod_name> is the name used for the PDF (<pod_name>.yaml) and IDF (idf-<pod_name>.yaml) files
492
493
494
495 Pod and Installer Descriptor Files
496 ==================================
497
498 Descriptor files provide the installer with an abstraction of the target pod
499 with all its hardware characteristics and required parameters. This information
500 is split into two different files:
501 Pod Descriptor File (PDF) and Installer Descriptor File (IDF).
502
503 The Pod Descriptor File is a hardware description of the pod
504 infrastructure. The information is modeled under a yaml structure.
505 A reference file with the expected yaml structure is available at
506 *mcp/config/labs/local/pod1.yaml*
507
508 The hardware description is arranged into a main "jumphost" node and a "nodes"
509 set for all target boards. For each node the following characteristics
510 are defined:
511
512 - Node parameters including CPU features and total memory.
513 - A list of available disks.
514 - Remote management parameters.
515 - Network interfaces list including mac address, speed, advanced features and name.
516
517 **Note**: The fixed IPs are ignored by the MCP installer script and it will instead
518 assign based on the network ranges defined in IDF.
519
520 The Installer Descriptor File extends the PDF with pod related parameters
521 required by the installer. This information may differ per each installer type
522 and it is not considered part of the pod infrastructure.
523 The IDF file must be named after the PDF with the prefix "idf-". A reference file with the expected
524 structure is available at *mcp/config/labs/local/idf-pod1.yaml*
525
526 The file follows a yaml structure and two sections "net_config" and "fuel" are expected.
527
528 The "net_config" section describes all the internal and provider networks
529 assigned to the pod. Each used network is expected to have a vlan tag, IP subnet and
530 attached interface on the boards. Untagged vlans shall be defined as "native".
531
532 The "fuel" section defines several sub-sections required by the Fuel installer:
533
534 - jumphost: List of bridge names for each network on the Jumpserver.
535 - network: List of device name and bus address info of all the target nodes.
536   The order must be aligned with the order defined in PDF file. Fuel installer relies on the IDF model
537   to setup all node NICs by defining the expected device name and bus address.
538 - maas: Defines the target nodes commission timeout and deploy timeout. (optional)
539 - reclass: Defines compute parameter tuning, including huge pages, cpu pinning
540   and other DPDK settings. (optional)
541
542 The following parameters can be defined in the IDF files under "reclass". Those value will
543 overwrite the default configuration values in Fuel repository:
544
545 - nova_cpu_pinning: List of CPU cores nova will be pinned to. Currently disabled.
546 - compute_hugepages_size: Size of each persistent huge pages. Usual values are '2M' and '1G'.
547 - compute_hugepages_count: Total number of persistent huge pages.
548 - compute_hugepages_mount: Mount point to use for huge pages.
549 - compute_kernel_isolcpu: List of certain CPU cores that are isolated from Linux scheduler.
550 - compute_dpdk_driver: Kernel module to provide userspace I/O support.
551 - compute_ovs_pmd_cpu_mask: Hexadecimal mask of CPUs to run DPDK Poll-mode drivers.
552 - compute_ovs_dpdk_socket_mem: Set of amount huge pages in MB to be used by OVS-DPDK daemon
553   taken for each NUMA node. Set size is equal to NUMA nodes count, elements are divided by comma.
554 - compute_ovs_dpdk_lcore_mask: Hexadecimal mask of DPDK lcore parameter used to run DPDK processes.
555 - compute_ovs_memory_channels: Number of memory channels to be used.
556 - dpdk0_driver: NIC driver to use for physical network interface.
557 - dpdk0_n_rxq: Number of RX queues.
558
559
560 The full description of the PDF and IDF file structure are available as yaml schemas.
561 The schemas are defined as a git submodule in Fuel repository. Input files provided
562 to the installer will be validated against the schemas.
563
564 - *mcp/scripts/pharos/config/pdf/pod1.schema.yaml*
565 - *mcp/scripts/pharos/config/pdf/idf-pod1.schema.yaml*
566
567 =============
568 Release Notes
569 =============
570
571 Please refer to the :ref:`Release Notes <fuel-release-notes-label>` article.
572
573 ==========
574 References
575 ==========
576
577 OPNFV
578
579 1) `OPNFV Home Page <http://www.opnfv.org>`_
580 2) `OPNFV documentation <http://docs.opnfv.org>`_
581 3) `Software downloads <https://www.opnfv.org/software/download>`_
582
583 OpenStack
584
585 4) `OpenStack Pike Release Artifacts <http://www.openstack.org/software/pike>`_
586 5) `OpenStack Documentation <http://docs.openstack.org>`_
587
588 OpenDaylight
589
590 6) `OpenDaylight Artifacts <http://www.opendaylight.org/software/downloads>`_
591
592 Fuel
593
594 7) `Mirantis Cloud Platform Documentation <https://docs.mirantis.com/mcp/latest>`_
595
596 Salt
597
598 8) `Saltstack Documentation <https://docs.saltstack.com/en/latest/topics>`_
599 9) `Saltstack Formulas <http://salt-formulas.readthedocs.io/en/latest/develop/overview-reclass.html>`_
600
601 Reclass
602
603 10) `Reclass model <http://reclass.pantsfullofunix.net>`_