blob: dae24f6b4c840cf4c6d72fb8b58e1a732030bcd3 [file] [log] [blame]
John DeNisco06dcd452018-07-26 12:45:10 -04001.. _centos:
2
3.. toctree::
4
5Setup the fd.io Repository - Centos 7
6=====================================
7
8Update the OS
9-------------
10
John DeNiscoce96dda2018-08-14 16:04:09 -040011Before starting the repository setup, it is a good idea to first update and upgrade
12the OS; run the following command to update the OS:
John DeNisco06dcd452018-07-26 12:45:10 -040013
14.. code-block:: console
15
16 $ sudo yum update
17
18
19Point to the Repository
20-----------------------
21
John DeNiscoce96dda2018-08-14 16:04:09 -040022For CentOS based systems, there are two respositories to pull VPP binaries from:
John DeNisco06dcd452018-07-26 12:45:10 -040023
24* CentOS NFV SIG Repository
25* Nexus Repository
26
27
28CentOS NFV SIG Repository
29^^^^^^^^^^^^^^^^^^^^^^^^^
30
John DeNiscoce96dda2018-08-14 16:04:09 -040031VPP is not in the official CentOS 7 distro; however, CentOS has Special
John DeNisco06dcd452018-07-26 12:45:10 -040032Interest Groups (SIG), which are smaller groups within the CentOS community that
33focus on a small set of issues. The CentOS NFV (Network Function Virtualization)
34SIG was created to provide a CentOS-based stack that will serve as a platform
John DeNisco06dcd452018-07-26 12:45:10 -040035
36To install released packages from the CentOS NFV SIG Repository on an updated
John DeNiscoce96dda2018-08-14 16:04:09 -040037Centos 7 system, first, install the CentOS NFV SIG FIDO repo file by running the
38following command:
John DeNisco06dcd452018-07-26 12:45:10 -040039
40.. code-block:: console
41
42 $ sudo yum install centos-release-fdio
43
44then **'Install VPP RPMs'**, as described below.
45
46This will install the latest VPP version from the repository. To install an
47older version, once the CentOS NFV SIG FDIO repo file has been installed, list
48the stored versions:
49
50.. code-block:: console
51
52 $ sudo yum --showduplicates list vpp* | expand
53 Loaded plugins: fastestmirror
54 Loading mirror speeds from cached hostfile
55 * base: repos-va.psychz.net
56 * epel: download-ib01.fedoraproject.org
57 * extras: mirror.siena.edu
58 * updates: repo1.ash.innoscale.net
59 Available Packages
60 vpp.x86_64 17.10-1 centos-fdio
61 vpp.x86_64 18.01.1-1 centos-fdio
62 vpp.x86_64 18.01.2-1 centos-fdio
63 vpp.x86_64 18.04-1 centos-fdio
64 vpp-api-java.x86_64 17.10-1 centos-fdio
65 vpp-api-java.x86_64 18.01.1-1 centos-fdio
66 vpp-api-java.x86_64 18.01.2-1 centos-fdio
67 vpp-api-java.x86_64 18.04-1 centos-fdio
68 vpp-api-lua.x86_64 17.10-1 centos-fdio
69 vpp-api-lua.x86_64 18.01.1-1 centos-fdio
70 vpp-api-lua.x86_64 18.01.2-1 centos-fdio
71 vpp-api-lua.x86_64 18.04-1 centos-fdio
72 vpp-api-python.x86_64 17.10-1 centos-fdio
73 vpp-api-python.x86_64 18.01.1-1 centos-fdio
74 vpp-api-python.x86_64 18.01.2-1 centos-fdio
75 vpp-api-python.x86_64 18.04-1 centos-fdio
76 vpp-devel.x86_64 17.10-1 centos-fdio
77 vpp-devel.x86_64 18.01.1-1 centos-fdio
78 vpp-devel.x86_64 18.01.2-1 centos-fdio
79 vpp-devel.x86_64 18.04-1 centos-fdio
80 vpp-lib.x86_64 17.10-1 centos-fdio
81 vpp-lib.x86_64 18.01.1-1 centos-fdio
82 vpp-lib.x86_64 18.01.2-1 centos-fdio
83 vpp-lib.x86_64 18.04-1 centos-fdio
84 vpp-plugins.x86_64 17.10-1 centos-fdio
85 vpp-plugins.x86_64 18.01.1-1 centos-fdio
86 vpp-plugins.x86_64 18.01.2-1 centos-fdio
87 vpp-plugins.x86_64 18.04-1 centos-fdio
88 vpp-selinux-policy.x86_64 18.04-1 centos-fdio
89
90Then install a particular version:
91
92.. code-block:: console
93
94 $ sudo yum install vpp-17.10-1.x86_64
95
96
97Nexus Repository
98^^^^^^^^^^^^^^^^
99
100Build artifacts are also posted to a FD.io Nexus Repository. This includes
101official point releases, as well as nightly builds. To use any of these build
102artifacts, create a file *'/etc/yum.repos.d/fdio-release.repo'* with the
103content that points to the version needed. Below are some common examples of
104the content needed:
105
106
107VPP Latest Release
108""""""""""""""""""
109
110To allow *'yum'* access to the official VPP releases, create the file
John DeNiscoce96dda2018-08-14 16:04:09 -0400111*'/etc/yum.repos.d/fdio-release.repo'* with the following content.
John DeNisco06dcd452018-07-26 12:45:10 -0400112
113.. code-block:: console
114
115 $ cat /etc/yum.repos.d/fdio-release.repo
116 [fdio-release]
117 name=fd.io release branch latest merge
118 baseurl=https://nexus.fd.io/content/repositories/fd.io.centos7/
119 enabled=1
120 gpgcheck=0
121
122The *'yum install vpp'* command will install the most recent release. To
123install older releases, run the following command to get the list of releases
John DeNiscoce96dda2018-08-14 16:04:09 -0400124provided.
John DeNisco06dcd452018-07-26 12:45:10 -0400125
126.. code-block:: console
127
128 $ sudo yum --showduplicates list vpp* | expand
129
130Then choose the release to install. See **'CentOS NFV SIG Repository'** for
131sample *'yum --showduplicates list'* output and an example of installing a
132particular version of the RPMs.
133
134VPP Stable Branch
John DeNiscoce96dda2018-08-14 16:04:09 -0400135"""""""""""""""""""
John DeNisco06dcd452018-07-26 12:45:10 -0400136
137To allow *yum* access to the build artifacts for a VPP stable branch, create
John DeNiscoce96dda2018-08-14 16:04:09 -0400138the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content.
John DeNisco06dcd452018-07-26 12:45:10 -0400139
140.. code-block:: console
141
142 $ cat /etc/yum.repos.d/fdio-release.repo
143 [fdio-stable-1804]
144 name=fd.io stable/1804 branch latest merge
145 baseurl=https://nexus.fd.io/content/repositories/fd.io.stable.1804.centos7/
146 enabled=1
147 gpgcheck=0
148
149For other stable branches, replace the *'1804'* from the above content with the
150desired release. Examples: 1606, 1609, 1701, 1704, 1707, 1710, 1804, 1807
151
152The *'yum install vpp'* command will install the most recent build on the
153branch, not the latest offical release. Run the following command to get the
154list of images produce by the branch:
155
156.. code-block:: console
157
158 $ sudo yum --showduplicates list vpp* | expand
159
160Then choose the image to install. See **'CentOS NFV SIG Repository'** for
161sample *'yum --showduplicates list'* output and an example of installing a
162particular version of the RPMs.
163
164
165VPP Master Branch
John DeNiscoce96dda2018-08-14 16:04:09 -0400166"""""""""""""""""""
John DeNisco06dcd452018-07-26 12:45:10 -0400167
168To allow *yum* access to the nightly builds from the VPP master branch, create
John DeNiscoce96dda2018-08-14 16:04:09 -0400169the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content.
John DeNisco06dcd452018-07-26 12:45:10 -0400170
171.. code-block:: console
172
173 $ cat /etc/yum.repos.d/fdio-release.repo
174 [fdio-master]
175 name=fd.io master branch latest merge
176 baseurl=https://nexus.fd.io/content/repositories/fd.io.master.centos7/
177 enabled=1
178 gpgcheck=0
179
180The *'yum install vpp'* command will install the most recent build on the
181branch. Run the following command to get the list of images produce by the
John DeNiscoce96dda2018-08-14 16:04:09 -0400182branch.
John DeNisco06dcd452018-07-26 12:45:10 -0400183
184.. code-block:: console
185
186 $ sudo yum --showduplicates list vpp* | expand
187
188Then choose the image to install. See **'CentOS NFV SIG Repository'** for
189sample *'yum --showduplicates list'* output and an example of installing a
190particular version of the RPMs.
191
192
193Install VPP RPMs
194================
195
John DeNiscoce96dda2018-08-14 16:04:09 -0400196To install the VPP packet engine, run the following command:
John DeNisco06dcd452018-07-26 12:45:10 -0400197
198.. code-block:: console
199
200 $ sudo yum install vpp
201
John DeNiscoce96dda2018-08-14 16:04:09 -0400202The *vpp* RPM depends on the *vpp-lib* and *vpp-selinux-policy*
John DeNisco06dcd452018-07-26 12:45:10 -0400203RPMs, so they will be installed as well.
204
205.. note::
206
John DeNiscoce96dda2018-08-14 16:04:09 -0400207 The *vpp-selinux-policy* will not enable SELinux on the system. It
John DeNisco06dcd452018-07-26 12:45:10 -0400208 will install a Custom VPP SELinux policy that will be used if SELinux is
209 enabled at any time.
210
211There are additional packages that are optional. These packages can be
212combined with the command above and installed all at once, or installed as
213needed:
214
215.. code-block:: console
216
217 $ sudo yum install vpp-plugins vpp-devel vpp-api-python vpp-api-lua vpp-api-java
218
219Starting VPP
220============
221
222Once VPP is installed on the system, to run VPP as a systemd service on CentOS,
John DeNiscoce96dda2018-08-14 16:04:09 -0400223run the following command:
John DeNisco06dcd452018-07-26 12:45:10 -0400224
225.. code-block:: console
226
227 $ sudo systemctl start vpp
228
John DeNiscoce96dda2018-08-14 16:04:09 -0400229Then to enable VPP to start on system reboot, run the following command:
John DeNisco06dcd452018-07-26 12:45:10 -0400230
231.. code-block:: console
232
233 $ sudo systemctl enable vpp
234
John DeNisco06dcd452018-07-26 12:45:10 -0400235Outside of running VPP as a systemd service, VPP can be started manually or
236made to run within GDB for debugging. See :ref:`running` for more details and
237ways to tailor VPP to a specific system.
238
239
240Uninstall the VPP RPMs
241======================
242
John DeNiscoce96dda2018-08-14 16:04:09 -0400243To uninstall a VPP RPM, run the following command:
244
John DeNisco06dcd452018-07-26 12:45:10 -0400245.. code-block:: console
246
247 $ sudo yum autoremove vpp*