summaryrefslogtreecommitdiffstats
path: root/docs/usecases/vppcloud/vppinaws.rst
blob: 8d5662d2bd8df3b23a91998c28d4f9f73bd1569d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
.. _vppinaws:

.. toctree::

VPP in AWS
==========

Warning: before starting this guide you should have a minimum knowledge on how `AWS works <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html>`_!

First 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:

.. code-block:: console

    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ sudo apt-get install build-essential
    $ sudo apt-get install python-pip
    $ sudo apt-get install libnuma-dev
    $ sudo apt-get install make
    $ sudo apt install libelf-dev



Afterwards, types the following commands to install VPP:

.. code-block:: console

 $ curl -s https://packagecloud.io/install/repositories/fdio/1807/script.deb.sh | sudo bash




In 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:


.. code-block:: console

    $ sudo apt-get update
    $ sudo apt-get install vpp
    $ sudo apt-get install vpp-plugins vpp-dbg vpp-dev vpp-api-java vpp-api-python vpp-api-lua



Now, 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:

.. code-block:: console

 $ sudo lshw -class network -businfo




The 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:

.. code-block:: console

 $ sudo nano /etc/vpp/startup.conf



Here, inside the dpdk block, copy the PCI addresses of the NIC you want to bind to VPP.


.. code-block:: console

  dev 0000:00:0X.0




Now you should install DPDK package. This will allow to bind the NICs to VPP through a script available inside the DPDK package:

.. code-block:: console

 $  wget https://fast.dpdk.org/rel/dpdk-18.08.tar.xz
 $  tar -xvf dpdk-18.08.tar.xz
 $  cd ~/dpdk-18.08/usertools/



and open the script:

.. code-block:: console

 $ ./dpdk-setup.sh



When 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:

.. code-block:: console

 $ cd ~/dpdk-18.08/x86_64-native-linuxapp-gcc/



and type:

.. code-block:: console

 $ sudo modprobe uio
 $ sudo insmod kmod/igb_uio.ko


In this way, the PCIs  addresses should appear inside the setup file of DPDK and therefore you  can bind them:

.. code-block:: console

 $ ./dpdk-setup.sh



Inside the script, bind the NICs using the option 24.

Finally restart VPP and the NICs should appear inside VPP CLI:

.. code-block:: console

 $ sudo service vpp stop
 $ sudo service vpp start
 $ sudo vppctl show int




Notice that if you stop the VM, you need to bind again the NICs.