blob: 468915a5b2072e7b50296999a4327d3452285e57 [file] [log] [blame]
Francesco Spinelli22e9c032019-02-28 11:51:24 +01001.. _vppinaws:
2
3.. toctree::
4
5VPP in AWS
6___________________
7
8Warning: before starting this guide you should have a minimum knowledge on how `AWS works <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html>`_!
9
10First of all, you should log into your Virtual Machine inside AWS (we suggest to create an instance with Ubuntu 16.04 on a m5 type) and download some useful packages to make VPP installation as smooth as possible:
11
12.. code-block:: console
13
14 $ sudo apt-get update
15 $ sudo apt-get upgrade
16 $ sudo apt-get install build-essential
17 $ sudo apt-get install python-pip
18 $ sudo apt-get install libnuma-dev
19 $ sudo apt-get install make
20 $ sudo apt install libelf-dev
21
22
23
24Afterwards, types the following commands to install VPP:
25
26.. code-block:: console
27
28 $ curl -s https://packagecloud.io/install/repositories/fdio/1807/script.deb.sh | sudo bash
29
30
31
32
33In this case we downloaded VPP version 18.07 but actually you can use any VPP version available. Then, you can install VPP with all of its plugins:
34
35
36.. code-block:: console
37
38 $ sudo apt-get update
39 $ sudo apt-get install vpp
40 $ sudo apt-get install vpp-plugins vpp-dbg vpp-dev vpp-api-java vpp-api-python vpp-api-lua
41
42
43
44Now, you need to bind the NICs (Network Card Interface) to VPP. Firstly you have the retrieve the PCI addresses of the NICs you want to bind:
45
46.. code-block:: console
47
48 $ sudo lshw -class network -businfo
49
50
51
52
53The PCI addresses have a format similar to this: 0000:00:0X.0. Once you retrieve them, you should copy them inside the startup file of VPP:
54
55.. code-block:: console
56
57 $ sudo nano /etc/vpp/startup.conf
58
59
60
61Here, inside the dpdk block, copy the PCI addresses of the NIC you want to bind to VPP.
62
63
64.. code-block:: console
65
66 dev 0000:00:0X.0
67
68
69
70
71Now you should install DPDK package. This will allow to bind the NICs to VPP through a script available inside the DPDK package:
72
73.. code-block:: console
74
75 $ wget https://fast.dpdk.org/rel/dpdk-18.08.tar.xz
76 $ tar -xvf dpdk-18.08.tar.xz
77 $ cd ~/dpdk-18.08/usertools/
78
79
80
81and open the script:
82
83.. code-block:: console
84
85 $ ./dpdk-setup.sh
86
87
88
89When the script is running, you should be able to execute several options. For the moment, just install T=x86_64-native-linuxapp-gcc and then close the script. Now go inside:
90
91.. code-block:: console
92
93 $ cd ~/dpdk-18.08/x86_64-native-linuxapp-gcc/
94
95
96
97and type:
98
99.. code-block:: console
100
101 $ sudo modprobe uio
102 $ sudo insmod kmod/igb_uio.ko
103
104
105In this way, the PCIs addresses should appear inside the setup file of DPDK and therefore you can bind them:
106
107.. code-block:: console
108
109 $ ./dpdk-setup.sh
110
111
112
113Inside the script, bind the NICs using the option 24.
114
115Finally restart VPP and the NICs should appear inside VPP CLI:
116
117.. code-block:: console
118
119 $ sudo service vpp stop
120 $ sudo service vpp start
121 $ sudo vppctl show int
122
123
124
125
126Notice that if you stop the VM, you need to bind again the NICs.
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147