Conform to interface change of ODL node in Fuel Deployment
[sdnvpn.git] / installation / index.rst
1 .. _sdnvpn-installation:
2
3 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
4 .. http://creativecommons.org/licenses/by/4.0
5 .. (c) Tim Irnich, (tim.irnich@ericsson.com) and others
6
7 ============================
8 SDN VPN feature installation
9 ============================
10
11 Hardware requirements
12 =====================
13
14 The SDNVPN scenarios can be deployed as a bare-metal or a virtual
15 environment on a single host.
16
17
18 Bare metal deployment on Pharos Lab
19 -----------------------------------
20
21 Hardware requirements for bare-metal deployments of the OPNFV
22 infrastructure are specified by the Pharos project. The Pharos project
23 provides an OPNFV hardware specification for configuring your hardware
24 at: http://artifacts.opnfv.org/pharos/docs/pharos-spec.html.
25
26
27 Virtual deployment on a single server
28 -------------------------------------
29
30 To perform a virtual deployment of an OPNFV scenario on a single host,
31 that host has to meet the hardware requirements outlined in the <missing
32 spec>.
33
34 When ODL is used as an SDN Controller in an OPNFV virtual deployment, ODL is
35 running on the OpenStack Controller VMs. It is therefore recommended to
36 increase the amount of resources for these VMs.
37
38 Our recommendation is to have 2 additional virtual cores and 8GB
39 additional virtual memory on top of the normally recommended
40 configuration.
41
42 Together with the commonly used recommendation this sums up to:
43 ::
44
45  6 virtual CPU cores
46  16 GB virtual memory
47
48 The installation section below has more details on how to configure this.
49
50 Installation using Fuel installer
51 =================================
52
53 Preparing the host to install Fuel by script
54 ============================================
55 .. Not all of these options are relevant for all scenarios.  I advise following the
56 .. instructions applicable to the deploy tool used in the scenario.
57
58 Before starting the installation of the os-odl-bgpnvp scenario some
59 preparation of the machine that will host the Fuel VM must be done.
60
61
62 Installation of required packages
63 ---------------------------------
64 To be able to run the installation of the basic OPNFV fuel installation the
65 Jumphost (or the host which serves the VMs for the virtual deployment) needs to
66 install the following packages:
67 ::
68
69  sudo apt-get install -y git make curl libvirt-bin libpq-dev qemu-kvm \
70                          qemu-system tightvncserver virt-manager sshpass \
71                          fuseiso genisoimage blackbox xterm python-pip \
72                          python-git python-dev python-oslo.config \
73                          python-pip python-dev libffi-dev libxml2-dev \
74                         libxslt1-dev libffi-dev libxml2-dev libxslt1-dev \
75                         expect curl python-netaddr p7zip-full
76
77  sudo pip install GitPython pyyaml netaddr paramiko lxml scp \
78                   python-novaclient python-neutronclient python-glanceclient \
79                   python-keystoneclient debtcollector netifaces enum
80
81 Download the source code and artifact
82 -------------------------------------
83 To be able to install the scenario os-odl-bgpvpn one can follow the way
84 CI is deploying the scenario.
85 First of all the opnfv-fuel repository needs to be cloned:
86 ::
87
88  git clone ssh://<user>@gerrit.opnfv.org:29418/fuel
89
90 To check out a specific
91 version of OPNFV, checkout the appropriate branch:
92 ::
93
94  cd fuel
95  git checkout stable/<colorado|danube|euphrates|fraser>
96
97 Now download the corresponding OPNFV Fuel ISO into an appropriate folder from
98 the website
99 ::
100  https://www.opnfv.org/software/downloads/release-archives
101
102 Have in mind that the fuel repo version needs to map with the downloaded
103 artifact. Note: it is also possible to build the Fuel image using the
104 tools found in the fuel git repository, but this is out of scope of the
105 procedure described here. Check the Fuel project documentation for more
106 information on building the Fuel ISO.
107
108
109 Simplified scenario deployment procedure using Fuel
110 ===================================================
111
112 This section describes the installation of the os-odl-bgpvpn-ha or
113 os-odl-bgpvpn-noha OPNFV reference platform stack across a server cluster
114 or a single host as a virtual deployment.
115
116 Scenario Preparation
117 --------------------
118 dea.yaml and dha.yaml need to be copied and changed according to the lab-name/host
119 where you deploy.
120 Copy the full lab config from:
121 ::
122
123  cp <path-to-opnfv-fuel-repo>/deploy/config/labs/devel-pipeline/elx \
124     <path-to-opnfv-fuel-repo>/deploy/config/labs/devel-pipeline/<your-lab-name>
125
126 Add at the bottom of dha.yaml
127 ::
128
129  disks:
130    fuel: 100G
131    controller: 100G
132    compute: 100G
133
134  define_vms:
135    controller:
136      vcpu:
137        value: 4
138      memory:
139        attribute_equlas:
140          unit: KiB
141        value: 16388608
142      currentMemory:
143        attribute_equlas:
144          unit: KiB
145        value: 16388608
146
147
148 Check if the default settings in dea.yaml are in line with your intentions
149 and make changes as required.
150
151 Installation procedures
152 -----------------------
153
154 We describe several alternative procedures in the following.
155 First, we describe several methods that are based on the deploy.sh script,
156 which is also used by the OPNFV CI system.
157 It can be found in the Fuel repository.
158
159 In addition, the SDNVPN feature can also be configured manually in the Fuel GUI.
160 This is described in the last subsection.
161
162 Before starting any of the following procedures, go to
163 ::
164
165  cd <opnfv-fuel-repo>/ci
166
167 Full automatic virtual deployment High Availablity Mode
168 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
169
170 The following command will deploy the high-availability flavor of SDNVPN scenario os-odl-bgpvpn-ha
171 in a fully automatic way, i.e. all installation steps (Fuel server installation, configuration,
172 node discovery and platform deployment) will take place without any further prompt for user input.
173 ::
174
175  sudo bash ./deploy.sh -b file://<path-to-opnfv-fuel-repo>/config/ -l devel-pipeline -p <your-lab-name> -s os-odl_l2-bgpvpn-ha -i file://<path-to-fuel-iso>
176
177 Full automatic virtual deployment NO High Availability Mode
178 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
179
180 The following command will deploy the SDNVPN scenario in its non-high-availability flavor (note the
181 different scenario name for the -s switch). Otherwise it does the same as described above.
182 ::
183
184  sudo bash ./deploy.sh -b file://<path-to-opnfv-fuel-repo>/config/ -l devel-pipeline -p <your-lab-name> -s os-odl_l2-bgpvpn-noha -i file://<path-to-fuel-iso>
185
186 Automatic Fuel installation and manual scenario deployment
187 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188
189 A useful alternative to the full automatic procedure is to only autodeploy the Fuel host and to run host selection, role assignment and SDNVPN scenario configuration manually.
190 ::
191
192  sudo bash ./deploy.sh -b file://<path-to-opnfv-fuel-repo>/config/ -l devel-pipeline -p <your-lab-name> -s os-odl_l2-bgpvpn-ha -i file://<path-to-fuel-iso> -e
193
194 With -e option the installer does not launch environment deployment, so
195 a user can do some modification before the scenario is really deployed.
196 Another interesting option is the -f option which deploys the scenario using an existing Fuel host.
197
198 The result of this installation is a fuel sever with the right config for
199 BGPVPN. Now the deploy button on fuel dashboard can be used to deploy the environment.
200 It is as well possible to do the configuration manuell.
201
202 Feature configuration on existing Fuel
203 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
204 If a Fuel server is already provided but the fuel plugins for Opendaylight, Openvswitch
205 and BGPVPN are not provided install them by:
206 ::
207
208  cd /opt/opnfv/
209  fuel plugins --install fuel-plugin-ovs-*.noarch.rpm
210  fuel plugins --install opendaylight-*.noarch.rpm
211  fuel plugins --install bgpvpn-*.noarch.rpm
212
213 If plugins are installed and you want to update them use --force flag.
214
215 Now the feature can be configured. Create a new environment with "Neutron with ML2 plugin" and
216 in there "Neutron with tunneling segmentation".
217 Go to Networks/Settings/Other and check "Assign public network to all nodes". This is required for
218 features such as floating IP, which require the Compute hosts to have public interfaces.
219 Then go to settings/other and check "OpenDaylight plugin", "Use ODL to manage L3 traffic",
220 "BGPVPN plugin" and set the OpenDaylight package version to "5.2.0-1". Then you should
221 be able to check "BGPVPN extensions" in OpenDaylight plugin section.
222
223 Now the deploy button on fuel dashboard can be used to deploy the environment.
224
225 Virtual deployment using Apex installer
226 =======================================
227
228 Prerequisites
229 ^^^^^^^^^^^^^
230 For Virtual Apex deployment a host with Centos 7 is needed. This installation
231 was tested on centos-release-7-2.1511.el7.centos.2.10.x86_64 however any other
232 Centos 7 version should be fine.
233
234 Build and Deploy
235 ^^^^^^^^^^^^^^^^
236 Download the Apex repo from opnfv gerrit and checkout stable/danube:
237 ::
238
239  git clone ssh://<user>@gerrit.opnfv.org:29418/apex
240  cd apex
241  git checkout stable/danube
242
243 In apex/contrib you will find simple_deploy.sh:
244 ::
245
246  #!/bin/bash
247  set -e
248  apex_home=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../
249  export CONFIG=$apex_home/build
250  export LIB=$apex_home/lib
251  export RESOURCES=$apex_home/.build/
252  export PYTHONPATH=$PYTHONPATH:$apex_home/lib/python
253  $apex_home/ci/dev_dep_check.sh || true
254  $apex_home/ci/clean.sh
255  pushd $apex_home/build
256  make clean
257  make undercloud
258  make overcloud-opendaylight
259  popd
260  pushd $apex_home/ci
261  echo "All further output will be piped to $PWD/nohup.out"
262  (nohup ./deploy.sh -v -n $apex_home/config/network/network_settings.yaml -d $apex_home/config/deploy/os-odl_l3-nofeature-noha.yaml &)
263  tail -f nohup.out
264  popd
265
266 This script will:
267
268 - "dev_dep_check.sh" install all required packages.
269 - "clean.sh" clean existing deployments
270 - "make clean" clean existing builds
271 - "make undercloud" building the undercloud image
272 - "make overcloud-opendaylight" build the overcloud image and convert that to a overcloud with opendaylight image
273 - "deploy.sh" deploy the os-odl_l3-nofeature-nohs.yaml scenario
274
275 Edit the script and change the scenario to os-odl-bgpvpn-noha.yaml. More scenraios can be found:
276 ./apex/config/deploy/
277
278 Execute the script in a own screen process:
279 ::
280
281  yum install -y screen
282  screen -S deploy
283  bash ./simple_deploy.sh
284
285 Accessing the undercloud
286 ^^^^^^^^^^^^^^^^^^^^^^^^
287 Determin the mac address of the undercloud vm:
288 ::
289
290  # virsh domiflist undercloud
291  -> Default network
292  Interface  Type       Source     Model       MAC
293  -------------------------------------------------------
294  vnet0      network    default    virtio      00:6a:9d:24:02:31
295  vnet1      bridge     admin      virtio      00:6a:9d:24:02:33
296  vnet2      bridge     external   virtio      00:6a:9d:24:02:35
297  # arp -n |grep 00:6a:9d:24:02:31
298  192.168.122.34           ether   00:6a:9d:24:02:31   C                     virbr0
299  # ssh stack@192.168.122.34
300  -> no password needed (password stack)
301
302 List overcloud deployment info:
303 ::
304
305  # source stackrc
306  # # Compute and controller:
307  # nova list
308  # # Networks
309  # neutron net-list
310
311 List overcloud openstack info:
312 ::
313
314  # source overcloudrc
315  # nova list
316  # ...
317
318
319 Access the overcloud hosts
320 ^^^^^^^^^^^^^^^^^^^^^^^^^^
321 On the undercloud:
322 ::
323
324  # . stackrc
325  # nova list
326  # ssh heat-admin@<ip-of-host>
327  -> there is no password the user has direct sudo rights.