Merge "deploy.sh: Factor out pkg deps into yaml files"
[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 Euphrates 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 Euphrates 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 Euphrates 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 Euphrates 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 Euphrates 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 Euphrates 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 ===============================
137 Help with Hardware Requirements
138 ===============================
139
140 Calculate hardware requirements:
141
142 For information on compatible hardware types available for use, 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 Euphrates 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, management, public).
187
188 Fuel@OPNFV has been validated by CI using the following distributions
189 installed on the Jumpserver:
190
191    - CentOS 7 (recommended by Pharos specification);
192    - Ubuntu Xenial;
193
194 **NOTE:** The install script will automatically install all required distro
195 package dependencies on the Jumpserver, unless explicitly asked not to
196 (via `-P` deploy arg). This includes Python, QEMU, libvirt etc.
197
198 **NOTE:** The install script expects 'libvirt' to be already running on the
199 Jumpserver. In case libvirt packages are missing, the script will install
200 them; but depending on the OS distribution, the user might have to start the
201 'libvirtd' service manually, then run the deploy script again.
202
203 ==========================================
204 OPNFV Software Installation and Deployment
205 ==========================================
206
207 This section describes the process of installing all the components needed to
208 deploy the full OPNFV reference platform stack across a server cluster.
209
210 The installation is done with Mirantis Cloud Platform (MCP), which is based on
211 a reclass model. This model provides the formula inputs to Salt, to make the deploy
212 automatic based on deployment scenario.
213 The reclass model covers:
214
215    - Infrastucture node definition: Salt Master node (cfg01) and MaaS node (mas01)
216    - Openstack node defition: Controler nodes (ctl01, ctl02, ctl03) and Compute nodes (cmp001, cmp002)
217    - Infrastructure components to install (software packages, services etc.)
218    - Openstack components and services (rabbitmq, galera etc.), as well as all configuration for them
219
220
221 Automatic Installation of a Virtual POD
222 =======================================
223
224 For virtual deploys all the targets are VMs on the Jumpserver. The deploy script will:
225
226    - Create a Salt Master VM on the Jumpserver which will drive the installation
227    - Create the bridges for networking with virsh (only if a real bridge does not already exists for a given network)
228    - Install Openstack on the targets
229       - Leverage Salt to install & configure Openstack services
230
231 .. figure:: img/fuel_virtual.png
232    :align: center
233    :alt: Fuel@OPNFV Virtual POD Network Layout Examples
234
235    Fuel@OPNFV Virtual POD Network Layout Examples
236
237    +-----------------------+------------------------------------------------------------------------+
238    | cfg01                 | Salt Master VM                                                         |
239    +-----------------------+------------------------------------------------------------------------+
240    | ctl01                 | Controller VM                                                          |
241    +-----------------------+------------------------------------------------------------------------+
242    | cmp01/cmp02           | Compute VMs                                                            |
243    +-----------------------+------------------------------------------------------------------------+
244    | gtw01                 | Gateway VM with neutron services (dhcp agent, L3 agent, metadata, etc) |
245    +-----------------------+------------------------------------------------------------------------+
246    | odl01                 | VM on which ODL runs (for scenarios deployed with ODL)                 |
247    +-----------------------+------------------------------------------------------------------------+
248
249
250 In this figure there are examples of two virtual deploys:
251    - Jumphost 1 has only virsh bridges, created by the deploy script
252    - Jumphost 2 has a mix of linux and virsh briges; when linux bridge exist for a specified network,
253      the deploy script will skip creating a virsh bridge for it
254
255 **Note**: A virtual network "mcpcontrol" is always created. For virtual deploys, "mcpcontrol" is also used
256 for Admin, leaving the PXE/Admin bridge unused.
257
258
259 Automatic Installation of a Baremetal POD
260 =========================================
261
262 The baremetal installation process can be done by editing the information about
263 hardware and enviroment in the reclass files, or by using a Pod Descriptor File (PDF).
264 This file contains all the information about the hardware and network of the deployment
265 the will be fed to the reclass model during deployment.
266
267 The installation is done automatically with the deploy script, which will:
268
269    - Create a Salt Master VM on the Jumpserver which will drive the installation
270    - Create a MaaS Node VM on the Jumpserver which will provision the targets
271    - Install Openstack on the targets
272       - Leverage MaaS to provision baremetal nodes with the operating system
273       - Leverage Salt to configure the operatign system on the baremetal nodes
274       - Leverage Salt to install & configure Openstack services
275
276 .. figure:: img/fuel_baremetal.png
277    :align: center
278    :alt: Fuel@OPNFV Baremetal POD Network Layout Example
279
280    Fuel@OPNFV Baremetal POD Network Layout Example
281
282    +-----------------------+---------------------------------------------------------+
283    | cfg01                 | Salt Master VM                                          |
284    +-----------------------+---------------------------------------------------------+
285    | mas01                 | MaaS Node VM                                            |
286    +-----------------------+---------------------------------------------------------+
287    | kvm01..03             | Baremetals which hold the VMs with controller functions |
288    +-----------------------+---------------------------------------------------------+
289    | cmp001/cmp002         | Baremetal compute nodes                                 |
290    +-----------------------+---------------------------------------------------------+
291    | prx01/prx02           | Proxy VMs for Nginx                                     |
292    +-----------------------+---------------------------------------------------------+
293    | msg01..03             | RabbitMQ Service VMs                                    |
294    +-----------------------+---------------------------------------------------------+
295    | dbs01..03             | MySQL service VMs                                       |
296    +-----------------------+---------------------------------------------------------+
297    | mdb01..03             | Telemetry VMs                                           |
298    +-----------------------+---------------------------------------------------------+
299    | odl01                 | VM on which ODL runs (for scenarios deployed with ODL)  |
300    +-----------------------+---------------------------------------------------------+
301    | Tenant VM             | VM running in the cloud                                 |
302    +-----------------------+---------------------------------------------------------+
303
304 In the baremetal deploy all bridges but "mcpcontrol" are linux bridges. For the Jumpserver, if they are already created
305 they will be used; otherwise they will be created. For the targets, the bridges are created by the deploy script.
306
307 **Note**: A virtual network "mcpcontrol" is always created. For baremetal deploys, PXE bridge is used for
308 baremetal node provisioning, while "mcpcontrol" is used to provision the infrastructure VMs only.
309
310
311 Steps to Start the Automatic Deploy
312 ===================================
313
314 These steps are common both for virtual and baremetal deploys.
315
316 #. Clone the Fuel code from gerrit
317
318    For x86_64
319
320    .. code-block:: bash
321
322        $ git clone https://git.opnfv.org/fuel
323        $ cd fuel
324
325    For aarch64
326
327    .. code-block:: bash
328
329        $ git clone https://git.opnfv.org/armband
330        $ cd armband
331
332 #. Checkout the Euphrates release
333
334    .. code-block:: bash
335
336        $ git checkout opnfv-5.0.2
337
338 #. Start the deploy script
339
340    .. code-block:: bash
341
342        $ ci/deploy.sh -l <lab_name> \
343                       -p <pod_name> \
344                       -b <URI to configuration repo containing the PDF file> \
345                       -s <scenario> \
346                       -B <list of admin, management, private and public bridges>
347
348 Examples
349 --------
350 #. Virtual deploy
351
352    To start a virtual deployment, it is required to have the `virtual` keyword
353    while specifying the pod name to the installer script.
354
355    It will create the required bridges and networks, configure Salt Master and
356    install OpenStack.
357
358       .. code-block:: bash
359
360          $ ci/deploy.sh -b file:///home/jenkins/tmpdir/securedlab \
361                         -l ericsson \
362                         -p virtual_kvm \
363                         -s os-nosdn-nofeature-noha
364
365    Once the deployment is complete, the OpenStack Dashboard, Horizon is
366    available at http://<controller VIP>:8078, e.g. http://10.16.0.101:8078.
367    The administrator credentials are **admin** / **opnfv_secret**.
368
369 #. Baremetal deploy
370
371    A x86 deploy on pod2 from Linux Foundation lab
372
373       .. code-block:: bash
374
375           $ ci/deploy.sh -b file:///home/jenkins/tmpdir/securedlab \
376                          -l lf \
377                          -p pod2 \
378                          -s os-nosdn-nofeature-ha \
379                          -B pxebr,br-ctl
380
381       .. figure:: img/lf_pod2.png
382          :align: center
383          :alt: Fuel@OPNFV LF POD2 Network Layout
384
385          Fuel@OPNFV LF POD2 Network Layout
386
387    Once the deployment is complete, the SaltStack Deployment Documentation is
388    available at http://<Proxy VIP>:8090, e.g. http://172.30.10.103:8090.
389
390    An aarch64 deploy on pod5 from Arm lab
391
392       .. code-block:: bash
393
394          $ ci/deploy.sh -b file:///home/jenkins/tmpdir/securedlab \
395                         -l arm \
396                         -p pod5 \
397                         -s os-nosdn-nofeature-ha \
398                         -B admin7_br0,mgmt7_br0,,public7_br0
399
400       .. figure:: img/arm_pod5.png
401          :align: center
402          :alt: Fuel@OPNFV ARM POD5 Network Layout
403
404          Fuel@OPNFV ARM POD5 Network Layout
405
406    Once the deployment is complete, the SaltStack Deployment Documentation is
407    available at http://<Proxy VIP>:8090, e.g. http://10.0.8.103:8090.
408
409
410 Pod Descriptor Files
411 ====================
412
413 Descriptor files provide the installer with an abstraction of the target pod
414 with all its hardware characteristics and required parameters. This information
415 is split into two different files:
416 Pod Descriptor File (PDF) and Installer Descriptor File (IDF).
417
418
419 The Pod Descriptor File is a hardware and network description of the pod
420 infrastructure. The information is modeled under a yaml structure.
421 A reference file with the expected yaml structure is available at
422 *mcp/config/labs/local/pod1.yaml*
423
424 A common network section describes all the internal and provider networks
425 assigned to the pod. Each network is expected to have a vlan tag, IP subnet and
426 attached interface on the boards. Untagged vlans shall be defined as "native".
427
428 The hardware description is arranged into a main "jumphost" node and a "nodes"
429 set for all target boards. For each node the following characteristics
430 are defined:
431
432 - Node parameters including CPU features and total memory.
433 - A list of available disks.
434 - Remote management parameters.
435 - Network interfaces list including mac address, speed and advanced features.
436 - IP list of fixed IPs for the node
437
438 **Note**: the fixed IPs are ignored by the MCP installer script and it will instead
439 assign based on the network ranges defined under the pod network configuration.
440
441
442 The Installer Descriptor File extends the PDF with pod related parameters
443 required by the installer. This information may differ per each installer type
444 and it is not considered part of the pod infrastructure. Fuel installer relies
445 on the IDF model to map the networks to the bridges on the foundation node and
446 to setup all node NICs by defining the expected OS device name and bus address.
447
448
449 The file follows a yaml structure and a "fuel" section is expected. Contents and
450 references must be aligned with the PDF file. The IDF file must be named after
451 the PDF with the prefix "idf-". A reference file with the expected structure
452 is available at *mcp/config/labs/local/idf-pod1.yaml*
453
454
455 =============
456 Release Notes
457 =============
458
459 Please refer to the :ref:`Release Notes <fuel-release-notes-label>` article.
460
461 ==========
462 References
463 ==========
464
465 OPNFV
466
467 1) `OPNFV Home Page <http://www.opnfv.org>`_
468 2) `OPNFV documentation <http://docs.opnfv.org>`_
469 3) `Software downloads <https://www.opnfv.org/software/download>`_
470
471 OpenStack
472
473 4) `OpenStack Ocata Release Artifacts <http://www.openstack.org/software/ocata>`_
474 5) `OpenStack Documentation <http://docs.openstack.org>`_
475
476 OpenDaylight
477
478 6) `OpenDaylight Artifacts <http://www.opendaylight.org/software/downloads>`_
479
480 Fuel
481
482 7) `Mirantis Cloud Platform Documentation <https://docs.mirantis.com/mcp/latest>`_
483
484 Salt
485
486 8) `Saltstack Documentation <https://docs.saltstack.com/en/latest/topics>`_
487 9) `Saltstack Formulas <http://salt-formulas.readthedocs.io/en/latest/develop/overview-reclass.html>`_
488
489 Reclass
490
491 10) `Reclass model <http://reclass.pantsfullofunix.net>`_