Remove quagga fix in the testcase
[sdnvpn.git] / docs / userguide / feature.userguide.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) Tim Irnich, Nikolas Hermanns, Christopher Price and others
4
5 Introduction
6 ============
7 .. Describe the specific features and how it is realised in the scenario in a brief manner
8 .. to ensure the user understand the context for the user guide instructions to follow.
9
10 This document will provide an overview of how to work with the SDN VPN features in
11 OPNFV.
12
13 SDN VPN feature description
14 ===========================
15 .. Describe the specific usage for <XYZ> feature.
16 .. Provide enough information that a user will be able to operate the feature on a deployed scenario.
17
18 A high-level description of the scenarios is provided in this section.
19 For details of the scenarios and their provided capabilities refer to
20 the scenario description document:
21 http://artifacts.opnfv.org/danube/sdnpvn/scenarios/os-odl_l2-bgpvpn/index.html
22
23 The BGPVPN feature enables creation of BGP VPNs on the Neutron API according to the OpenStack
24 BGPVPN blueprint at https://blueprints.launchpad.net/neutron/+spec/neutron-bgp-vpn.
25 In a nutshell, the blueprint defines a BGPVPN object and a number of ways
26 how to associate it with the existing Neutron object model, as well as a unique
27 definition of the related semantics. The BGPVPN framework supports a backend
28 driver model with currently available drivers for Bagpipe, OpenContrail, Nuage
29 and OpenDaylight. The OPNFV scenario makes use of the OpenDaylight driver and backend
30 implementation through the ODL NetVirt project.
31
32 Hardware requirements
33 =====================
34
35 The SDNVPN scenarios can be deployed as a bare-metal or a virtual environment on a single host.
36
37 Bare metal deployment on Pharos Lab
38 -----------------------------------
39
40 Hardware requirements for bare-metal deployments of the OPNFV infrastructure are specified
41 by the Pharos project. The Pharos project provides an OPNFV hardware specification for
42 configuring your hardware at: http://artifacts.opnfv.org/pharos/docs/pharos-spec.html.
43
44 Virtual deployment hardware requirements
45 ----------------------------------------
46
47 To perform a virtual deployment of an OPNFV scenario on a single host, that host has to
48 meet the hardware requirements outlined in the <missing spec>.
49
50 When ODL is used as an SDN Controller in an OPNFV virtual deployment, ODL is
51 running on the OpenStack Controller VMs. It is therefore recommended to
52 increase the amount of resources for these VMs.
53
54 Our recommendation is to have 2 additional virtual cores and 8GB additional virtual memory
55 on top of the normally recommended configuration.
56
57 Together with the commonly used recommendation this sums up to:
58 ::
59
60  4 virtual cores
61  16 GB virtual memory
62
63 See in Installation section below how to configure this.
64
65 Preparing the host to install Fuel by script
66 ============================================
67 .. Not all of these options are relevant for all scenarios.  I advise following the
68 .. instructions applicable to the deploy tool used in the scenario.
69
70 Before starting the installation of the os-odl_l2-bgpnvp scenario some preparation of the
71 machine that will host the Fuel VM must be done.
72
73 Installation of required packages
74 ---------------------------------
75 To be able to run the installation of the basic OPNFV fuel installation the
76 Jumphost (or the host which serves the VMs for the virtual deployment) needs to
77 install the following packages:
78 ::
79
80  sudo apt-get install -y git make curl libvirt-bin libpq-dev qemu-kvm \
81                          qemu-system tightvncserver virt-manager sshpass \
82                          fuseiso genisoimage blackbox xterm python-pip \
83                          python-git python-dev python-oslo.config \
84                          python-pip python-dev libffi-dev libxml2-dev \
85                         libxslt1-dev libffi-dev libxml2-dev libxslt1-dev \
86                         expect curl python-netaddr p7zip-full
87
88  sudo pip install GitPython pyyaml netaddr paramiko lxml scp \
89                   python-novaclient python-neutronclient python-glanceclient \
90                   python-keystoneclient debtcollector netifaces enum
91
92 Download the source code and artifact
93 -------------------------------------
94 To be able to install the scenario os-odl_l2-bgpvpn one can follow the way
95 CI is deploying the scenario.
96 First of all the opnfv-fuel repository needs to be cloned:
97 ::
98
99  git clone ssh://<user>@gerrit.opnfv.org:29418/fuel
100
101 This command downloads the whole repository fuel. To checkout a specific
102 version of OPNFV, checkout the appropriate branch:
103 ::
104
105  cd fuel
106  git checkout stable/<colorado|danube>
107
108 Now download the corresponding OPNFV Fuel ISO into an appropriate folder from
109 the website
110 ::
111  https://www.opnfv.org/software/downloads/release-archives
112
113 Have in mind that the fuel repo version needs to map with the downloaded artifact.
114
115 Simplified scenario deployment procedure using Fuel
116 ===================================================
117
118 This section describes the installation of the os-odl_l2-bgpvpn-ha or
119 os-odl_l2-bgpvpn-noha OPNFV reference platform stack across a server cluster
120 or a single host as a virtual deployment.
121
122 Scenario Preparation
123 --------------------
124 dea.yaml and dha.yaml need to be copied and changed according to the lab-name/host
125 where you deploy.
126 Copy the full lab config from:
127 ::
128
129  cp <path-to-opnfv-fuel-repo>/deploy/config/labs/devel-pipeline/elx \
130     <path-to-opnfv-fuel-repo>/deploy/config/labs/devel-pipeline/<your-lab-name>
131
132 Add at the bottom of dha.yaml
133 ::
134
135  disks:
136    fuel: 100G
137    controller: 100G
138    compute: 100G
139
140  define_vms:
141    controller:
142      vcpu:
143        value: 4
144      memory:
145        attribute_equlas:
146          unit: KiB
147        value: 16388608
148      currentMemory:
149        attribute_equlas:
150          unit: KiB
151        value: 16388608
152
153
154 Check if the default settings in dea.yaml are in line with your intentions
155 and make changes as required.
156
157 Installation procedures
158 -----------------------
159
160 We describe several alternative procedures in the following.
161 First, we describe several methods that are based on the deploy.sh script,
162 which is also used by the OPNFV CI system.
163 It can be found in the Fuel repository.
164
165 In addition, the SDNVPN feature can also be configured manually in the Fuel GUI.
166 This is described in the last subsection.
167
168 Before starting any of the following procedures, go to
169 ::
170
171  cd <opnfv-fuel-repo>/ci
172
173 Full automatic virtual deployment High Availablity Mode
174 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
175
176 The following command will deploy the high-availability flavor of SDNVPN scenario os-odl_l2-bgpvpn-ha
177 in a fully automatic way, i.e. all installation steps (Fuel server installation, configuration,
178 node discovery and platform deployment) will take place without any further prompt for user input.
179 ::
180
181  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>
182
183 Full automatic virtual deployment NO High Availability Mode
184 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
185
186 The following command will deploy the SDNVPN scenario in its non-high-availability flavor (note the
187 different scenario name for the -s switch). Otherwise it does the same as described above.
188 ::
189
190  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>
191
192 Automatic Fuel installation and manual scenario deployment
193 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
194
195 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.
196 ::
197
198  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
199
200 With -e option the installer does not launch environment deployment, so
201 a user can do some modification before the scenario is really deployed.
202 Another interesting option is the -f option which deploys the scenario using an existing Fuel host.
203
204 The result of this installation is a fuel sever with the right config for
205 BGPVPN. Now the deploy button on fuel dashboard can be used to deploy the environment.
206 It is as well possible to do the configuration manuell.
207
208 Feature configuration on existing Fuel
209 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
210 If a Fuel server is already provided but the fuel plugins for Opendaylight, Openvswitch
211 and BGPVPN are not provided install them by:
212 ::
213
214  cd /opt/opnfv/
215  fuel plugins --install fuel-plugin-ovs-*.noarch.rpm
216  fuel plugins --install opendaylight-*.noarch.rpm
217  fuel plugins --install bgpvpn-*.noarch.rpm
218
219 If plugins are installed and you want to update them use --force flag.
220
221 Now the feature can be configured. Create a new environment with "Neutron with ML2 plugin" and
222 in there "Neutron with tunneling segmentation".
223 Go to Networks/Settings/Other and check "Assign public network to all nodes". This is required for
224 features such as floating IP, which require the Compute hosts to have public interfaces.
225 Then go to settings/other and check "OpenDaylight plugin", "Use ODL to manage L3 traffic",
226 "BGPVPN plugin" and set the OpenDaylight package version to "5.2.0-1". Then you should
227 be able to check "BGPVPN extensions" in OpenDaylight plugin section.
228
229 Now the deploy button on fuel dashboard can be used to deploy the environment.
230
231 Feature and API usage guidelines and example
232 ============================================
233 .. Describe with examples how to use specific features, provide API examples and details required to
234 .. operate the feature on the platform.
235
236 For the details of using OpenStack BGPVPN API, please refer to the documentation
237 at http://docs.openstack.org/developer/networking-bgpvpn/.
238
239 Example
240 -------
241 In the example we will show a BGPVPN associated to 2 neutron networks. The BGPVPN
242 will have the import and export routes in the way that it imports its own Route. The outcome will be that vms sitting on these two networks will be able to have a full L3
243 connectivity.
244
245 Some defines:
246 ::
247
248  net_1="Network1"
249  net_2="Network2"
250  subnet_net1="10.10.10.0/24"
251  subnet_net2="10.10.11.0/24"
252
253 Create neutron networks and save network IDs:
254 ::
255
256  neutron net-create --provider:network_type=local $net_1
257  export net_1_id=`echo "$rv" | grep " id " |awk '{print $4}'`
258  neutron net-create --provider:network_type=local $net_2
259  export net_2_id=`echo "$rv" | grep " id " |awk '{print $4}'`
260
261 Create neutron subnets:
262 ::
263
264  neutron subnet-create $net_1 --disable-dhcp $subnet_net1
265  neutron subnet-create $net_2 --disable-dhcp $subnet_net2
266
267 Create BGPVPN:
268 ::
269
270  neutron bgpvpn-create --route-distinguishers 100:100 --route-targets 100:2530 --name L3_VPN
271
272 Start VMs on both networks:
273 ::
274
275  nova boot --flavor 1 --image <some-image> --nic net-id=$net_1_id vm1
276  nova boot --flavor 1 --image <some-image> --nic net-id=$net_2_id vm2
277
278 The VMs should not be able to see each other.
279
280 Associate to Neutron networks:
281 ::
282
283  neutron bgpvpn-net-assoc-create L3_VPN --network $net_1_id
284  neutron bgpvpn-net-assoc-create L3_VPN --network $net_2_id
285
286 Now the VMs should be able to ping each other
287
288 Troubleshooting
289 ===============
290 Check neutron logs on the controller:
291 ::
292
293  tail -f /var/log/neutron/server.log |grep -E "ERROR|TRACE"
294
295 Check Opendaylight logs:
296 ::
297
298  tail -f /opt/opendaylight/data/logs/karaf.log
299
300 Restart Opendaylight:
301 ::
302
303  service opendaylight restart