8507b445346cc42a9451b87d8a1d7e4c8b306a44
[apex.git] / docs / installationprocedure / baremetal.rst
1 Installation High-Level Overview - Bare Metal Deployment
2 ========================================================
3
4 The setup presumes that you have 6 or more bare metal servers already setup
5 with network connectivity on at least 1 or more network interfaces for all
6 servers via a TOR switch or other network implementation.
7
8 The physical TOR switches are **not** automatically configured from the OPNFV
9 reference platform.  All the networks involved in the OPNFV infrastructure as
10 well as the provider networks and the private tenant VLANs needs to be manually
11 configured.
12
13 The Jumphost can be installed using the bootable ISO or by using the
14 (``opnfv-apex*.rpm``) RPMs and their dependencies.  The Jumphost should then be
15 configured with an IP gateway on its admin or public interface and configured
16 with a working DNS server.  The Jumphost should also have routable access
17 to the lights out network for the overcloud nodes.
18
19 ``opnfv-deploy`` is then executed in order to deploy the undercloud VM and to
20 provision the overcloud nodes.  ``opnfv-deploy`` uses three configuration files
21 in order to know how to install and provision the OPNFV target system.
22 The information gathered under section
23 `Execution Requirements (Bare Metal Only)`_ is put into the YAML file
24 ``/etc/opnfv-apex/inventory.yaml`` configuration file.  Deployment options are
25 put into the YAML file ``/etc/opnfv-apex/deploy_settings.yaml``.  Alternatively
26 there are pre-baked deploy_settings files available in ``/etc/opnfv-apex/``.
27 These files are named with the naming convention
28 os-sdn_controller-enabled_feature-[no]ha.yaml. These files can be used in place
29 of the ``/etc/opnfv-apex/deploy_settings.yaml`` file if one suites your
30 deployment needs.  Networking definitions gathered under section
31 `Network Requirements`_ are put into the YAML file
32 ``/etc/opnfv-apex/network_settings.yaml``.  ``opnfv-deploy`` will boot the
33 undercloud VM and load the target deployment configuration into the
34 provisioning toolchain.  This information includes MAC address, IPMI,
35 Networking Environment and OPNFV deployment options.
36
37 Once configuration is loaded and the undercloud is configured it will then
38 reboot the overcloud nodes via IPMI.  The nodes should already be set to PXE
39 boot first off the admin interface.  The nodes will first PXE off of the
40 undercloud PXE server and go through a discovery/introspection process.
41
42 Introspection boots off of custom introspection PXE images. These images are
43 designed to look at the properties of the hardware that is being booted
44 and report the properties of it back to the undercloud node.
45
46 After introspection the undercloud will execute a Heat Stack Deployment to
47 continue node provisioning and configuration.  The nodes will reboot and PXE
48 from the undercloud PXE server again to provision each node using Glance disk
49 images provided by the undercloud.  These disk images include all the necessary
50 packages and configuration for an OPNFV deployment to execute.  Once the disk
51 images have been written to node's disks the nodes will boot locally and
52 execute cloud-init which will execute the final node configuration. This
53 configuration is largly completed by executing a puppet apply on each node.
54
55 Installation High-Level Overview - VM Deployment
56 ================================================
57
58 The VM nodes deployment operates almost the same way as the bare metal
59 deployment with a few differences mainly related to power management.
60 ``opnfv-deploy`` still deploys an undercloud VM. In addition to the undercloud
61 VM a collection of VMs (3 control nodes + 2 compute for an HA deployment or 1
62 control node and 1 or more compute nodes for a Non-HA Deployment) will be
63 defined for the target OPNFV deployment.  The part of the toolchain that
64 executes IPMI power instructions calls into libvirt instead of the IPMI
65 interfaces on baremetal servers to operate the power managment.  These VMs are
66 then provisioned with the same disk images and configuration that baremetal
67 would be.
68
69 To Triple-O these nodes look like they have just built and registered the same
70 way as bare metal nodes, the main difference is the use of a libvirt driver for
71 the power management.
72
73 Installation Guide - Bare Metal Deployment
74 ==========================================
75
76 This section goes step-by-step on how to correctly install and provision the
77 OPNFV target system to bare metal nodes.
78
79 Install Bare Metal Jumphost
80 ---------------------------
81
82 1a. If your Jumphost does not have CentOS 7 already on it, or you would like to
83     do a fresh install, then download the Apex bootable ISO from the OPNFV
84     artifacts site <http://artifacts.opnfv.org/apex.html>.  There have been
85     isolated reports of problems with the ISO having trouble completing
86     installation successfully. In the unexpected event the ISO does not work
87     please workaround this by downloading the CentOS 7 DVD and performing a
88     "Virtualization Host" install.  If you perform a "Minimal Install" or
89     install type other than "Virtualization Host" simply run
90     ``sudo yum groupinstall "Virtualization Host"``
91     ``chkconfig libvirtd on && reboot``
92     to install virtualzation support and enable libvirt on boot. If you use the
93     CentOS 7 DVD proceed to step 1b once the CentOS 7 with "Virtualzation Host"
94     support is completed.
95
96 1b. If your Jump host already has CentOS 7 with libvirt running on it then
97     install the install the RDO Release RPM:
98
99     ``sudo yum install -y https://www.rdoproject.org/repos/rdo-release.rpm``
100
101     The RDO Project release repository is needed to install OpenVSwitch, which
102     is a dependency of opnfv-apex. If you do not have external connectivity to
103     use this repository you need to download the OpenVSwitch RPM from the RDO
104     Project repositories and install it with the opnfv-apex RPM.
105
106 2a. Boot the ISO off of a USB or other installation media and walk through
107     installing OPNFV CentOS 7.  The ISO comes prepared to be written directly
108     to a USB drive with dd as such:
109
110     ``dd if=opnfv-apex.iso of=/dev/sdX bs=4M``
111
112     Replace /dev/sdX with the device assigned to your usb drive. Then select
113     the USB device as the boot media on your Jumphost
114
115 2b. If your Jump host already has CentOS 7 with libvirt running on it then
116     install the opnfv-apex RPMs from the OPNFV artifacts site
117     <http://artifacts.opnfv.org/apex.html>. The following RPMS are available
118     for installation:
119
120     - opnfv-apex                  - OpenDaylight L2 / L3 and ONOS support *
121     - opnfv-apex-onos             - ONOS support *
122     - opnfv-apex-opendaylight-sfc - OpenDaylight SFC support *
123     - opnfv-apex-undercloud       - (reqed) Undercloud Image
124     - opnfv-apex-common           - (reqed) Supporting config files and scripts
125     - python34-markupsafe         - (reqed) Dependency of opnfv-apex-common **
126     - python3-jinja2              - (reqed) Dependency of opnfv-apex-common **
127     - python3-ipmi                - (reqed) Dependency of opnfv-apex-common **
128
129     \* One or more of these RPMs is required
130     Only one of opnfv-apex, opnfv-apex-onos and opnfv-apex-opendaylight-sfc is
131     required. It is safe to leave the unneeded SDN controller's RPMs
132     uninstalled if you do not intend to use them.
133
134     ** These RPMs are not yet distributed by CentOS or EPEL.
135     Apex has built these for distribution with Apex while CentOS and EPEL do
136     not distribute them. Once they are carried in an upstream channel Apex will
137     no longer carry them and they will not need special handling for
138     installation.
139
140     To install these RPMs download them to the local disk on your CentOS 7
141     install and pass the file names directly to yum:
142     ``sudo yum install python34-markupsafe-<version>.rpm
143     python3-jinja2-<version>.rpm python3-ipmi-<version>.rpm``
144     ``sudo yum install opnfv-apex-<version>.rpm
145     opnfv-apex-undercloud-<version>.rpm opnfv-apex-common-<version>.rpm``
146
147
148 3.  After the operating system and the opnfv-apex RPMs are installed, login to
149     your Jumphost as root.
150
151 4.  Configure IP addresses on the interfaces that you have selected as your
152     networks.
153
154 5.  Configure the IP gateway to the Internet either, preferably on the public
155     interface.
156
157 6.  Configure your ``/etc/resolv.conf`` to point to a DNS server
158     (8.8.8.8 is provided by Google).
159
160 Creating a Node Inventory File
161 ------------------------------
162
163 IPMI configuration information gathered in section
164 `Execution Requirements (Bare Metal Only)`_ needs to be added to the
165 ``inventory.yaml`` file.
166
167 1.  Copy ``/usr/share/doc/opnfv/inventory.yaml.example`` as your inventory file
168     template to ``/etc/opnfv-apex/inventory.yaml``.
169
170 2.  The nodes dictionary contains a definition block for each baremetal host
171     that will be deployed.  1 or more compute nodes and 3 controller nodes are
172     required.  (The example file contains blocks for each of these already).
173     It is optional at this point to add more compute nodes into the node list.
174
175 3.  Edit the following values for each node:
176
177     - ``mac_address``: MAC of the interface that will PXE boot from undercloud
178     - ``ipmi_ip``: IPMI IP Address
179     - ``ipmi_user``: IPMI username
180     - ``ipmi_password``: IPMI password
181     - ``pm_type``: Power Management driver to use for the node
182     - ``cpus``: (Introspected*) CPU cores available
183     - ``memory``: (Introspected*) Memory available in Mib
184     - ``disk``: (Introspected*) Disk space available in Gb
185     - ``arch``: (Introspected*) System architecture
186     - ``capabilities``: (Opt**) Node role (profile:control or profile:compute)
187
188 \* *Introspection looks up the overcloud node's resources and overrides these
189     value. You can leave default values and Apex will get the correct values when
190     it runs introspection on the nodes.*
191
192 ** *If capabilities profile is not specified then Apex will select node's roles
193    in the OPNFV cluster in a non-deterministic fashion.*
194
195 Creating the Settings Files
196 ---------------------------
197
198 Edit the 2 settings files in /etc/opnfv-apex/. These files have comments to
199 help you customize them.
200
201 1. deploy_settings.yaml
202    This file includes basic configuration options deployment.
203    Alternatively, there are pre-built deploy_settings files available in
204    (``/etc/opnfv-apex/``). These files are named with the naming convention
205    os-sdn_controller-enabled_feature-[no]ha.yaml. These files can be used in
206    place of the (``/etc/opnfv-apex/deploy_settings.yaml``) file if one suites
207    your deployment needs. If a pre-built deploy_settings file is choosen there
208    is no need to customize (``/etc/opnfv-apex/deploy_settings.yaml``). The
209    pre-built file can be used in place of the
210    (``/etc/opnfv-apex/deploy_settings.yaml``) file.
211
212 2. network_settings.yaml
213    This file provides Apex with the networking information that satisfies the
214    prerequisite `Network Requirements`_. These are specific to your
215    environment.
216
217 Running ``opnfv-deploy``
218 ------------------------
219
220 You are now ready to deploy OPNFV using Apex!
221 ``opnfv-deploy`` will use the inventory and settings files to deploy OPNFV.
222
223 Follow the steps below to execute:
224
225 1.  Execute opnfv-deploy
226     ``sudo opnfv-deploy [ --flat ] -n network_settings.yaml
227     -i inventory.yaml -d deploy_settings.yaml``
228     If you need more information about the options that can be passed to
229     opnfv-deploy use ``opnfv-deploy --help`` --flat collapses all networks to a
230     single nic, only uses the admin network from the network settings file.  -n
231     network_settings.yaml allows you to customize your networking topology.
232
233 2.  Wait while deployment is executed.
234     If something goes wrong during this part of the process, start by reviewing
235     your network or the information in your configuration files. It's not
236     uncommon for something small to be overlooked or mis-typed.
237     You will also notice outputs in your shell as the deployment progresses.
238
239 3.  When the deployment is complete the undercloud IP and ovecloud dashboard
240     url will be printed. OPNFV has now been deployed using Apex.
241
242 .. _`Execution Requirements (Bare Metal Only)`: requirements.html#execution-requirements-bare-metal-only
243 .. _`Network Requirements`: requirements.html#network-requirements