Consolidate tarball/sys unit file cache logic
[integration/packaging.git] / docs / rpms.rst
1 RPMs
2 ====
3
4 OpenDaylight has a mature RPM Continuous Delivery pipeline. Every autorelease
5 build is automatically packaged as an RPM, and even if autorelease is broken
6 a daily job builds the latest distribution snapshot build into an RPM.
7
8 RPMs can be passed to test jobs that install them, start OpenDaylight with its
9 systemd service, connect to the Karaf shell and verify basic functionality.
10
11 RPMs are hosted on the CentOS Community Build system repositories. Some repos
12 are updated very frequently with the latest builds, while others are permanent
13 homes of official releases.
14
15 Developers can build custom RPMs with pre-merge patches for testing by first
16 creating a custom distribution with the integration-multipatch-test job and
17 then feeding the resulting artifact to the packaging-build-rpm job.
18
19 Build Jobs
20 ----------
21
22 OpenDaylight Integration/Packaging has added support for many variations of
23 fully automated RPM builds.
24
25 packaging-build-rpm
26 ^^^^^^^^^^^^^^^^^^^
27
28 The `packaging-build-rpm job`_ is the primary way to build an RPM from an
29 OpenDaylight distribution (built by `autorelease <autorelease-builds.html>`_
30 or the `snapshot distribution <distribution-job-builds.html>` job). It accepts
31 a set of `parameters`_ that can be used to configure the build and passes them
32 to the `RPM build logic in Integration/Packaging's repo`_. The resulting
33 artifacts are hosted on Jenkins for up to a week. The job actually produces
34 both a noarch RPM and source RPM. The noarch RPM can be passed to test jobs for
35 validation. The source RPM can be downloaded to a system with the required
36 credentials and then pushed to the CentOS Community Build system to be built
37 into a noarch RPM on their servers and hosted in their repos.
38
39 packaging-build-rpm-snap
40 ^^^^^^^^^^^^^^^^^^^^^^^^
41
42 The `packaging-build-rpm-snap job`_ packages the most recent `snapshot
43 distribution <distribution-job-builds.html>` build from a given branch as an
44 RPM. This could be used by a developer to test code that was just merged, but
45 which has not been included in an `autorelease build
46 <autorelease-builds.html>`_ yet. The job is also triggered daily, to ensure
47 that OpenDaylight's Continuous Delivery pipeline is fed new builds even if
48 autorelease is broken.
49
50 Test Jobs
51 ---------
52
53 packaging-test-rpm
54 ^^^^^^^^^^^^^^^^^^
55
56 The `packaging-test-rpm job`_ accepts a link to an RPM and validates it. It
57 installs the package with the system's package manager, starts OpenDaylight's
58 systemd service, verifies that it's reported as active, connects to the Karaf
59 shell and checks that some key bundles are present.
60
61 Repositories
62 ------------
63
64 CentOS
65 ^^^^^^
66
67 While most RPM builds are triggered automatically in OpenDaylight's Jenkins,
68 some RPMs are promoted to be hosted in OpenDaylight's CentOS repositories.
69 There are a series of repos that are updated at varying frequencies, from
70 testing repos that are updated with pre-release versions very frequently to
71 release repos that are the permanent home of official OpenDaylight releases.
72
73 Testing Repositories
74 ....................
75
76 Repositories with the -testing suffix are updated very frequently with
77 pre-release versions of OpenDaylight from the appropriate branch. New RPMs
78 replace the old ones, so installing from these repos will always provide the
79 most recent versions.
80
81 Testing repos for Boron, Carbon and Nitrogen:
82
83 - `nfv7-opendaylight-5-testing`_
84 - `nfv7-opendaylight-6-testing`_
85 - `nfv7-opendaylight-7-testing`_
86
87 Release Repositories
88 ....................
89
90 Repositories with the -release suffix host official OpenDaylight releases. They
91 are updated infrequently to never, and will host their release artifacts
92 forever. Release repos are subdivided into two groups based version numbers.
93 Repositories with both a major and minor version number (52, 53, 60) are pinned
94 to a specific OpenDaylight release or service release (Boron SR2 5.2.0, Boron
95 SR3 5.3.0, Carbon 6.0.0). Repositories with only a major version (5, 6) will
96 always host the latest service release from that major release. If a new SR
97 comes out, the repo will get the update (Boron SR4 will replace Boron SR3).
98
99 Release repos for the latest Boron and Carbon service releases:
100
101 - `nfv7-opendaylight-5-release`_
102 - `nfv7-opendaylight-6-release`_
103
104 Release repos that will permanently host specific Boron and Carbon releases:
105
106 - `nfv7-opendaylight-50-release`_
107 - `nfv7-opendaylight-51-release`_
108 - `nfv7-opendaylight-52-release`_
109 - `nfv7-opendaylight-53-release`_
110 - `nfv7-opendaylight-60-release`_
111
112 Repository Configuration Files
113 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114
115 While it's possible to install RPMs directly (`dnf install -y <URL>`), it's
116 often easier to use a repository configuration file to install whatever the
117 latest RPM is in a given repo.
118
119 The OpenDaylight Integration/Packaging project provides `example repo config
120 files for each official repository`_.
121
122 Package managers like Yum and DNF will automatically find repo configuration
123 files placed in the /etc/yum.repos.d/ directory. Curl them into place with
124 something like:
125
126     sudo curl -o /etc/yum.repos.d/opendaylight-7-testing.repo \
127       "https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-7-testing.repo"
128
129 Standard install commands will now find the repository as expected.
130
131     sudo dnf install -y opendaylight
132
133 Custom RPMs
134 -----------
135
136 It's possible for developers to build custom RPMs, typically with unmerged
137 patches that need system testing. First, use the `integration-multipatch-test`_
138 job to create a custom distribution that includes the set of unmerged patches.
139 See the `Custom Distributions <distribution-job-builds.html#custom-
140 distributions>`_ section for extensive docs. Once you have a custom
141 distribution artifact, pass it to the `packaging-build-rpm job`_ to package it
142 as an RPM. See the `packaging-build-rpm`_ section for docs.
143
144 .. _packaging-build-rpm job: https://jenkins.opendaylight.org/releng/job/packaging-build-rpm-master/
145 .. _parameters: https://jenkins.opendaylight.org/releng/job/packaging-build-rpm-master/build
146 .. _RPM build logic in Integration/Packaging's repo: https://github.com/opendaylight/integration-packaging/blob/master/rpm/build.py
147 .. _packaging-build-rpm-snap job: https://jenkins.opendaylight.org/releng/job/packaging-build-rpm-snap-master/
148 .. _packaging-test-rpm job: https://jenkins.opendaylight.org/releng/job/packaging-test-rpm-master/
149 .. _nfv7-opendaylight-5-testing: http://cbs.centos.org/repos/nfv7-opendaylight-5-testing/x86_64/os/Packages/
150 .. _nfv7-opendaylight-6-testing: http://cbs.centos.org/repos/nfv7-opendaylight-6-testing/x86_64/os/Packages/
151 .. _nfv7-opendaylight-7-testing: http://cbs.centos.org/repos/nfv7-opendaylight-7-testing/x86_64/os/Packages/
152 .. _nfv7-opendaylight-5-release: http://cbs.centos.org/repos/nfv7-opendaylight-5-release/x86_64/os/Packages/
153 .. _nfv7-opendaylight-6-release: http://cbs.centos.org/repos/nfv7-opendaylight-6-release/x86_64/os/Packages/
154 .. _nfv7-opendaylight-50-release: http://cbs.centos.org/repos/nfv7-opendaylight-50-release/x86_64/os/Packages/
155 .. _nfv7-opendaylight-51-release: http://cbs.centos.org/repos/nfv7-opendaylight-51-release/x86_64/os/Packages/
156 .. _nfv7-opendaylight-52-release: http://cbs.centos.org/repos/nfv7-opendaylight-52-release/x86_64/os/Packages/
157 .. _nfv7-opendaylight-53-release: http://cbs.centos.org/repos/nfv7-opendaylight-53-release/x86_64/os/Packages/
158 .. _nfv7-opendaylight-60-release: http://cbs.centos.org/repos/nfv7-opendaylight-60-release/x86_64/os/Packages/
159 .. _example repo config files for each official repository: https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=tree;f=packages/rpm/example_repo_configs;hb=refs/heads/master
160 .. _integration-multipatch-test: https://jenkins.opendaylight.org/releng/search/?q=integration-multipatch-test