blob: 07268524a0197097489fa8e0f420715ce0646893 [file] [log] [blame]
John DeNisco06dcd452018-07-26 12:45:10 -04001.. _centos:
2
3.. toctree::
4
jdenisco569a2782018-11-09 15:20:26 -05005Setup the FD.io Repository - Centos 7
John DeNisco06dcd452018-07-26 12:45:10 -04006=====================================
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
jdenisco569a2782018-11-09 15:20:26 -050012the OS; run the following commands to update the OS and get some packages.
John DeNisco06dcd452018-07-26 12:45:10 -040013
14.. code-block:: console
15
16 $ sudo yum update
jdenisco569a2782018-11-09 15:20:26 -050017 $ sudo yum install pygpgme yum-utils
John DeNisco06dcd452018-07-26 12:45:10 -040018
19
jdenisco569a2782018-11-09 15:20:26 -050020Package Cloud Repository
21^^^^^^^^^^^^^^^^^^^^^^^^
John DeNisco06dcd452018-07-26 12:45:10 -040022
jdenisco569a2782018-11-09 15:20:26 -050023Build artifacts are also posted to a packagecloud.io Repository. This includes
24official point releases. To use any of these build artifacts, create a file
25*'/etc/yum.repos.d/fdio-release.repo'* with the content that points to the
26version needed. Below are some common examples of the content needed:
John DeNisco06dcd452018-07-26 12:45:10 -040027
28
29VPP Latest Release
30""""""""""""""""""
31
32To allow *'yum'* access to the official VPP releases, create the file
John DeNiscoce96dda2018-08-14 16:04:09 -040033*'/etc/yum.repos.d/fdio-release.repo'* with the following content.
John DeNisco06dcd452018-07-26 12:45:10 -040034
35.. code-block:: console
36
37 $ cat /etc/yum.repos.d/fdio-release.repo
jdenisco569a2782018-11-09 15:20:26 -050038 [fdio_release]
39 name=fdio_release
40 baseurl=https://packagecloud.io/fdio/release/el/7/$basearch
41 repo_gpgcheck=1
John DeNisco06dcd452018-07-26 12:45:10 -040042 gpgcheck=0
jdenisco569a2782018-11-09 15:20:26 -050043 enabled=1
44 gpgkey=https://packagecloud.io/fdio/release/gpgkey
45 sslverify=1
46 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
47 metadata_expire=300
48
49 [fdio_release-source]
50 name=fdio_release-source
51 baseurl=https://packagecloud.io/fdio/release/el/7/SRPMS
52 repo_gpgcheck=1
53 gpgcheck=0
54 enabled=1
55 gpgkey=https://packagecloud.io/fdio/release/gpgkey
56 sslverify=1
57 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
58 metadata_expire=300
59
60Update your local yum cache.
61
62.. code-block:: console
63
jdenisco24010fb2018-11-13 12:40:12 -050064 $ sudo yum clean all
jdenisco569a2782018-11-09 15:20:26 -050065 $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_release'
John DeNisco06dcd452018-07-26 12:45:10 -040066
67The *'yum install vpp'* command will install the most recent release. To
68install older releases, run the following command to get the list of releases
John DeNiscoce96dda2018-08-14 16:04:09 -040069provided.
John DeNisco06dcd452018-07-26 12:45:10 -040070
71.. code-block:: console
72
73 $ sudo yum --showduplicates list vpp* | expand
74
John DeNisco06dcd452018-07-26 12:45:10 -040075VPP Stable Branch
John DeNiscoce96dda2018-08-14 16:04:09 -040076"""""""""""""""""""
John DeNisco06dcd452018-07-26 12:45:10 -040077
78To allow *yum* access to the build artifacts for a VPP stable branch, create
John DeNiscoce96dda2018-08-14 16:04:09 -040079the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content.
John DeNisco06dcd452018-07-26 12:45:10 -040080
81.. code-block:: console
82
83 $ cat /etc/yum.repos.d/fdio-release.repo
jdenisco569a2782018-11-09 15:20:26 -050084 [fdio_1810]
85 name=fdio_1810
86 baseurl=https://packagecloud.io/fdio/1810/el/7/$basearch
87 repo_gpgcheck=1
John DeNisco06dcd452018-07-26 12:45:10 -040088 gpgcheck=0
jdenisco569a2782018-11-09 15:20:26 -050089 enabled=1
90 gpgkey=https://packagecloud.io/fdio/1810/gpgkey
91 sslverify=1
92 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
93 metadata_expire=300
John DeNisco06dcd452018-07-26 12:45:10 -040094
jdenisco569a2782018-11-09 15:20:26 -050095 [fdio_1810-source]
96 name=fdio_1810-source
97 baseurl=https://packagecloud.io/fdio/1810/el/7/SRPMS
98 repo_gpgcheck=1
99 gpgcheck=0
100 enabled=1
101 gpgkey=https://packagecloud.io/fdio/1810/gpgkey
102 sslverify=1
103 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
104 metadata_expire=300
105
106For other stable branches, replace the *'1810'* from the above content with the
John DeNisco06dcd452018-07-26 12:45:10 -0400107desired release. Examples: 1606, 1609, 1701, 1704, 1707, 1710, 1804, 1807
108
jdenisco569a2782018-11-09 15:20:26 -0500109Update your local yum cache.
110
111.. code-block:: console
112
jdenisco24010fb2018-11-13 12:40:12 -0500113 $ sudo yum clean all
jdenisco569a2782018-11-09 15:20:26 -0500114 $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_1810'
115
John DeNisco06dcd452018-07-26 12:45:10 -0400116The *'yum install vpp'* command will install the most recent build on the
117branch, not the latest offical release. Run the following command to get the
118list of images produce by the branch:
119
120.. code-block:: console
121
122 $ sudo yum --showduplicates list vpp* | expand
123
John DeNisco06dcd452018-07-26 12:45:10 -0400124
125VPP Master Branch
John DeNiscoce96dda2018-08-14 16:04:09 -0400126"""""""""""""""""""
John DeNisco06dcd452018-07-26 12:45:10 -0400127
128To allow *yum* access to the nightly builds from the VPP master branch, create
John DeNiscoce96dda2018-08-14 16:04:09 -0400129the file *'/etc/yum.repos.d/fdio-release.repo'* with the following content.
John DeNisco06dcd452018-07-26 12:45:10 -0400130
131.. code-block:: console
132
133 $ cat /etc/yum.repos.d/fdio-release.repo
jdenisco569a2782018-11-09 15:20:26 -0500134 [fdio_master]
135 name=fdio_master
136 baseurl=https://packagecloud.io/fdio/master/el/7/$basearch
137 repo_gpgcheck=1
John DeNisco06dcd452018-07-26 12:45:10 -0400138 gpgcheck=0
jdenisco569a2782018-11-09 15:20:26 -0500139 enabled=1
140 gpgkey=https://packagecloud.io/fdio/master/gpgkey
141 sslverify=1
142 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
143 metadata_expire=300
144
145 [fdio_master-source]
146 name=fdio_master-source
147 baseurl=https://packagecloud.io/fdio/master/el/7/SRPMS
148 repo_gpgcheck=1
149 gpgcheck=0
150 enabled=1
151 gpgkey=https://packagecloud.io/fdio/master/gpgkey
152 sslverify=1
153 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
154 metadata_expire=300
155
156Update your local yum cache.
157
158.. code-block:: console
159
jdenisco24010fb2018-11-13 12:40:12 -0500160 $ sudo yum clean all
jdenisco569a2782018-11-09 15:20:26 -0500161 $ sudo yum -q makecache -y --disablerepo='*' --enablerepo='fdio_master'
John DeNisco06dcd452018-07-26 12:45:10 -0400162
163The *'yum install vpp'* command will install the most recent build on the
164branch. Run the following command to get the list of images produce by the
John DeNiscoce96dda2018-08-14 16:04:09 -0400165branch.
John DeNisco06dcd452018-07-26 12:45:10 -0400166
167.. code-block:: console
168
jdenisco24010fb2018-11-13 12:40:12 -0500169 $ sudo yum clean all
John DeNisco06dcd452018-07-26 12:45:10 -0400170 $ sudo yum --showduplicates list vpp* | expand
171
John DeNisco06dcd452018-07-26 12:45:10 -0400172Install VPP RPMs
173================
174
John DeNiscoce96dda2018-08-14 16:04:09 -0400175To install the VPP packet engine, run the following command:
John DeNisco06dcd452018-07-26 12:45:10 -0400176
177.. code-block:: console
178
179 $ sudo yum install vpp
180
John DeNiscoce96dda2018-08-14 16:04:09 -0400181The *vpp* RPM depends on the *vpp-lib* and *vpp-selinux-policy*
John DeNisco06dcd452018-07-26 12:45:10 -0400182RPMs, so they will be installed as well.
183
184.. note::
185
John DeNiscoce96dda2018-08-14 16:04:09 -0400186 The *vpp-selinux-policy* will not enable SELinux on the system. It
John DeNisco06dcd452018-07-26 12:45:10 -0400187 will install a Custom VPP SELinux policy that will be used if SELinux is
188 enabled at any time.
189
190There are additional packages that are optional. These packages can be
191combined with the command above and installed all at once, or installed as
192needed:
193
194.. code-block:: console
195
196 $ sudo yum install vpp-plugins vpp-devel vpp-api-python vpp-api-lua vpp-api-java
197
198Starting VPP
199============
200
201Once VPP is installed on the system, to run VPP as a systemd service on CentOS,
John DeNiscoce96dda2018-08-14 16:04:09 -0400202run the following command:
John DeNisco06dcd452018-07-26 12:45:10 -0400203
204.. code-block:: console
205
206 $ sudo systemctl start vpp
207
John DeNiscoce96dda2018-08-14 16:04:09 -0400208Then to enable VPP to start on system reboot, run the following command:
John DeNisco06dcd452018-07-26 12:45:10 -0400209
210.. code-block:: console
211
212 $ sudo systemctl enable vpp
213
John DeNisco06dcd452018-07-26 12:45:10 -0400214Outside of running VPP as a systemd service, VPP can be started manually or
215made to run within GDB for debugging. See :ref:`running` for more details and
216ways to tailor VPP to a specific system.
217
218
219Uninstall the VPP RPMs
220======================
221
John DeNiscoce96dda2018-08-14 16:04:09 -0400222To uninstall a VPP RPM, run the following command:
223
John DeNisco06dcd452018-07-26 12:45:10 -0400224.. code-block:: console
225
226 $ sudo yum autoremove vpp*