Fix links in Apex install manual
[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-undercloud       - (reqed) Undercloud Image
123     - opnfv-apex-common           - (reqed) Supporting config files and scripts
124     - python34-markupsafe         - (reqed) Dependency of opnfv-apex-common **
125     - python3-jinja2              - (reqed) Dependency of opnfv-apex-common **
126     - python3-ipmi                - (reqed) Dependency of opnfv-apex-common **
127
128     \* One or more of these RPMs is required
129     Only one of opnfv-apex or opnfv-apex-onos is required. It is safe to leave
130     the unneeded SDN controller's RPMs uninstalled if you do not intend to use
131     them.
132
133     ** These RPMs are not yet distributed by CentOS or EPEL.
134     Apex has built these for distribution with Apex while CentOS and EPEL do
135     not distribute them. Once they are carried in an upstream channel Apex will
136     no longer carry them and they will not need special handling for
137     installation.
138
139     Python 3.4 is also required and it needs to be installed if you are using
140     the Centos 7 base image:
141
142     ``sudo yum install epel-release``
143     ``sudo yum install python34``
144
145     To install these RPMs download them to the local disk on your CentOS 7
146     install and pass the file names directly to yum:
147     ``sudo yum install python34-markupsafe-<version>.rpm
148     python3-jinja2-<version>.rpm python3-ipmi-<version>.rpm``
149     ``sudo yum install opnfv-apex-<version>.rpm
150     opnfv-apex-undercloud-<version>.rpm opnfv-apex-common-<version>.rpm``
151
152
153 3.  After the operating system and the opnfv-apex RPMs are installed, login to
154     your Jumphost as root.
155
156 4.  Configure IP addresses on the interfaces that you have selected as your
157     networks.
158
159 5.  Configure the IP gateway to the Internet either, preferably on the public
160     interface.
161
162 6.  Configure your ``/etc/resolv.conf`` to point to a DNS server
163     (8.8.8.8 is provided by Google).
164
165 Creating a Node Inventory File
166 ------------------------------
167
168 IPMI configuration information gathered in section
169 `Execution Requirements (Bare Metal Only)`_ needs to be added to the
170 ``inventory.yaml`` file.
171
172 1.  Copy ``/usr/share/doc/opnfv/inventory.yaml.example`` as your inventory file
173     template to ``/etc/opnfv-apex/inventory.yaml``.
174
175 2.  The nodes dictionary contains a definition block for each baremetal host
176     that will be deployed.  1 or more compute nodes and 3 controller nodes are
177     required.  (The example file contains blocks for each of these already).
178     It is optional at this point to add more compute nodes into the node list.
179
180 3.  Edit the following values for each node:
181
182     - ``mac_address``: MAC of the interface that will PXE boot from undercloud
183     - ``ipmi_ip``: IPMI IP Address
184     - ``ipmi_user``: IPMI username
185     - ``ipmi_password``: IPMI password
186     - ``pm_type``: Power Management driver to use for the node
187         values: pxe_ipmitool (tested) or pxe_wol (untested) or pxe_amt (untested)
188     - ``cpus``: (Introspected*) CPU cores available
189     - ``memory``: (Introspected*) Memory available in Mib
190     - ``disk``: (Introspected*) Disk space available in Gb
191     - ``arch``: (Introspected*) System architecture
192     - ``capabilities``: (Opt**) Node's role in deployment
193         values: profile:control or profile:compute
194
195     \* Introspection looks up the overcloud node's resources and overrides these
196     value. You can leave default values and Apex will get the correct values when
197     it runs introspection on the nodes.
198
199     ** If capabilities profile is not specified then Apex will select node's roles
200     in the OPNFV cluster in a non-deterministic fashion.
201
202 Creating the Settings Files
203 ---------------------------
204
205 Edit the 2 settings files in /etc/opnfv-apex/. These files have comments to
206 help you customize them.
207
208 1. deploy_settings.yaml
209    This file includes basic configuration options deployment, and also documents
210    all available options.
211    Alternatively, there are pre-built deploy_settings files available in
212    (``/etc/opnfv-apex/``). These files are named with the naming convention
213    os-sdn_controller-enabled_feature-[no]ha.yaml. These files can be used in
214    place of the (``/etc/opnfv-apex/deploy_settings.yaml``) file if one suites
215    your deployment needs. If a pre-built deploy_settings file is choosen there
216    is no need to customize (``/etc/opnfv-apex/deploy_settings.yaml``). The
217    pre-built file can be used in place of the
218    (``/etc/opnfv-apex/deploy_settings.yaml``) file.
219
220 2. network_settings.yaml
221    This file provides Apex with the networking information that satisfies the
222    prerequisite `Network Requirements`_. These are specific to your
223    environment.
224
225 Running ``opnfv-deploy``
226 ------------------------
227
228 You are now ready to deploy OPNFV using Apex!
229 ``opnfv-deploy`` will use the inventory and settings files to deploy OPNFV.
230
231 Follow the steps below to execute:
232
233 1.  Execute opnfv-deploy
234     ``sudo opnfv-deploy [ --flat ] -n network_settings.yaml
235     -i inventory.yaml -d deploy_settings.yaml``
236     If you need more information about the options that can be passed to
237     opnfv-deploy use ``opnfv-deploy --help`` --flat collapses all networks to a
238     single nic, only uses the admin network from the network settings file.  -n
239     network_settings.yaml allows you to customize your networking topology.
240
241 2.  Wait while deployment is executed.
242     If something goes wrong during this part of the process, start by reviewing
243     your network or the information in your configuration files. It's not
244     uncommon for something small to be overlooked or mis-typed.
245     You will also notice outputs in your shell as the deployment progresses.
246
247 3.  When the deployment is complete the undercloud IP and ovecloud dashboard
248     url will be printed. OPNFV has now been deployed using Apex.
249
250 .. _`Execution Requirements (Bare Metal Only)`: index.html#execution-requirements-bare-metal-only
251 .. _`Network Requirements`: index.html#network-requirements