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