Update Fluorine SR3 release repos links
[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 job produces
33 both a noarch RPM and source RPM. The noarch RPM can be passed to test jobs for
34 validation. The source RPM can be downloaded to a system with the required
35 credentials and then pushed to the CentOS Community Build system to be built
36 into a noarch RPM on their servers and hosted in their repos.
37
38 The RPM and SRPM artifacts of the job are handled differently depending on the
39 Jenkins silo the job is executing in.
40
41 When running in production (releng silo), artifacts are hosted on Nexus. There
42 are RPM repos for each active branch (`oxygen-devel`_, `fluorine-devel`_,
43 `neon-devel`_). New builds are automatically added to the appropriate devel for
44 their branch.
45
46 When running in the sandbox, artifacts are thrown away by default. To keep an
47 artifact for further testing, either:
48
49 * Set the DEPLOY_TO_REPO parameter to opendaylight-epel-7-x86_64-devel. This is
50   a scratch repo that sandbox packaging jobs have permission to push to.
51   Packages will land in the `scratch repo on Nexus`_.
52 * Add a path regex that matches it to the Archive Artifacts param of the job
53   (`ARCHIVE_ARTIFACTS=/home/jenkins/rpmbuild/RPMS/ noarch/opendaylight*.rpm`).
54   The files matched will be stored in OpenDaylight's log archive along with the
55   other job logs.
56
57 packaging-build-rpm-snap
58 ^^^^^^^^^^^^^^^^^^^^^^^^
59
60 The `packaging-build-rpm-snap job`_ packages the most recent `snapshot
61 distribution <distribution-job-builds.html>` build from a given branch as an
62 RPM. This could be used by a developer to test code that was just merged, but
63 which has not been included in an `autorelease build
64 <autorelease-builds.html>`_ yet. The job is also triggered daily, to ensure
65 that OpenDaylight's Continuous Delivery pipeline is fed new builds even if
66 autorelease is broken.
67
68 Test Jobs
69 ---------
70
71 packaging-test-rpm
72 ^^^^^^^^^^^^^^^^^^
73
74 The `packaging-test-rpm job`_ accepts a link to an RPM and validates it. It
75 installs the package with the system's package manager, starts OpenDaylight's
76 systemd service, verifies that it's reported as active, connects to the Karaf
77 shell and checks that some key bundles are present.
78
79 .. _intpak-rpm-repos:
80
81 Repositories
82 ------------
83
84 OpenDaylight Nexus
85 ^^^^^^^^^^^^^^^^^^
86
87 Packages resulting from build jobs running on OpenDaylight's infrastructure are
88 automatically hosted on OpenDaylight's Nexus repositories.
89
90 Continious Delivery Repositories
91 ................................
92
93 OpenDaylight provides fully-automated Continuous Delivery pipelines for RPMs.
94
95 Every RPM built in the production RelEng Jenkins silo is pushed to the devel
96 repo appropriate for its branch. Builds are triggered for every successful
97 autorelase job, as well as daily using the latest available snapshot build.
98
99
100 Continuous Delivery repos for Oxygen, Fluorine and Neon:
101
102 - `opendaylight-oxygen-epel-7-x86_64-devel`_
103 - `opendaylight-fluorine-epel-7-x86_64-devel`_
104 - `opendaylight-neon-epel-7-x86_64-devel`_
105
106 CentOS Community Build System
107 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108
109 While most RPM builds are triggered automatically in OpenDaylight's Jenkins,
110 some RPMs are promoted to be hosted in OpenDaylight's CentOS repositories.
111 There are a series of repos that are updated at varying frequencies, from
112 testing repos that are updated with pre-release versions very frequently to
113 release repos that are the permanent home of official OpenDaylight releases.
114
115 Release Repositories
116 ....................
117
118 Repositories with the -release suffix host official OpenDaylight releases. They
119 are updated infrequently to never, and will host their release artifacts
120 forever. Release repos are subdivided into two groups based version numbers.
121 Repositories with both a major and minor version number (80, 83) are pinned to
122 a specific OpenDaylight release or service release (Oxygen 8.0.0, Oxygen SR3
123 8.3.0). Repositories with only a major version (8, 9) will always host the
124 latest service release from that major release. If a new SR comes out, the repo
125 will get the update (Oxygen SR4 will replace Oxygen SR3).
126
127 Release repo for the latest Oxygen, Fluorine and Neon service releases:
128
129 - `nfv7-opendaylight-8-release`_
130 - `nfv7-opendaylight-9-release`_
131 - `nfv7-opendaylight-10-release`_
132
133 Release repos that will permanently host specific Oxygen, Fluorine and Neon
134 releases:
135
136 - `nfv7-opendaylight-80-release`_
137 - `nfv7-opendaylight-81-release`_
138 - `nfv7-opendaylight-82-release`_
139 - `nfv7-opendaylight-83-release`_
140 - `nfv7-opendaylight-84-release`_
141 - `nfv7-opendaylight-90-release`_
142 - `nfv7-opendaylight-91-release`_
143 - `nfv7-opendaylight-92-release`_
144 - `nfv7-opendaylight-93-release`_
145 - `nfv7-opendaylight-100-release`_
146 - `nfv7-opendaylight-101-release`_
147
148 Repository Configuration Files
149 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150
151 While it's possible to install RPMs directly (`dnf install -y <URL>`), it's
152 often easier to use a repository configuration file to install whatever the
153 latest RPM is in a given repo.
154
155 The OpenDaylight Integration/Packaging project provides `example repo config
156 files for each official repository`_.
157
158 Package managers like Yum and DNF will automatically find repo configuration
159 files placed in the /etc/yum.repos.d/ directory. Curl them into place with
160 something like:
161
162     sudo curl -o /etc/yum.repos.d/opendaylight-10-devel.repo \
163       "https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob_plain;f=packages/rpm/example_repo_configs/opendaylight-10-devel.repo"
164
165 Standard install commands will now find the repository as expected.
166
167     sudo dnf install -y opendaylight
168
169 The latest RPM in the repo will be installed.
170
171 Custom RPMs
172 -----------
173
174 It's possible for developers to build custom RPMs, typically with unmerged
175 patches that need system testing.
176
177 Most developers will want to run these jobs in the ODL Jenkins sandbox
178 instance, as only a few community members have permission to manually trigger
179 jobs on the releng Jenkins instance. See the `Jenkins sandbox`_ docs for
180 details about how to get permissions to trigger sandbox jobs, required
181 configuration and normal usage.
182
183 To build an custom distribution with unmerged code, first use the
184 `integration-multipatch-test`_ job to create distribution that includes the set
185 of unmerged patches.  See the `Custom Distributions
186 <distribution-job-builds.html#custom-distributions>`_ section for extensive
187 docs.
188
189 Once you have the distribution you want to package as an RPM, pass it to the
190 `packaging-build-rpm job`_ to do the build. Use the See the `packaging-build-rpm`_
191 section for docs.
192
193 .. _packaging-build-rpm job: https://jenkins.opendaylight.org/releng/job/packaging-build-rpm-master/
194 .. _parameters: https://jenkins.opendaylight.org/releng/job/packaging-build-rpm-master/build
195 .. _RPM build logic in Integration/Packaging's repo: https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=tree;f=packages/rpm
196 .. _packaging-build-rpm-snap job: https://jenkins.opendaylight.org/releng/job/packaging-build-rpm-snap-master/
197 .. _packaging-test-rpm job: https://jenkins.opendaylight.org/releng/job/packaging-test-rpm-master/
198 .. _opendaylight-oxygen-epel-7-x86_64-devel: https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-x86_64-devel/org/opendaylight/integration-packaging/opendaylight/
199 .. _opendaylight-fluorine-epel-7-x86_64-devel: https://nexus.opendaylight.org/content/repositories/opendaylight-fluorine-epel-7-x86_64-devel/org/opendaylight/integration-packaging/opendaylight/
200 .. _opendaylight-neon-epel-7-x86_64-devel: https://nexus.opendaylight.org/content/repositories/opendaylight-neon-epel-7-x86_64-devel/org/opendaylight/integration-packaging/opendaylight/
201 .. _oxygen-devel: https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-x86_64-devel/org/opendaylight/integration-packaging/opendaylight/
202 .. _fluorine-devel: https://nexus.opendaylight.org/content/repositories/opendaylight-fluorine-epel-7-x86_64-devel/org/opendaylight/integration-packaging/opendaylight/
203 .. _neon-devel: https://nexus.opendaylight.org/content/repositories/opendaylight-fluorine-epel-7-x86_64-devel/org/opendaylight/integration-packaging/opendaylight/
204 .. _nfv7-opendaylight-80-release: http://cbs.centos.org/repos/nfv7-opendaylight-80-release/x86_64/os/Packages/
205 .. _nfv7-opendaylight-81-release: http://cbs.centos.org/repos/nfv7-opendaylight-81-release/x86_64/os/Packages/
206 .. _nfv7-opendaylight-82-release: http://cbs.centos.org/repos/nfv7-opendaylight-82-release/x86_64/os/Packages/
207 .. _nfv7-opendaylight-83-release: http://cbs.centos.org/repos/nfv7-opendaylight-83-release/x86_64/os/Packages/
208 .. _nfv7-opendaylight-84-release: http://cbs.centos.org/repos/nfv7-opendaylight-84-release/x86_64/os/Packages/
209 .. _nfv7-opendaylight-90-release: http://cbs.centos.org/repos/nfv7-opendaylight-90-release/x86_64/os/Packages/
210 .. _nfv7-opendaylight-91-release: http://cbs.centos.org/repos/nfv7-opendaylight-91-release/x86_64/os/Packages/
211 .. _nfv7-opendaylight-92-release: http://cbs.centos.org/repos/nfv7-opendaylight-92-release/x86_64/os/Packages/
212 .. _nfv7-opendaylight-93-release: http://cbs.centos.org/repos/nfv7-opendaylight-93-release/x86_64/os/Packages/
213 .. _nfv7-opendaylight-100-release: http://cbs.centos.org/repos/nfv7-opendaylight-100-release/x86_64/os/Packages/
214 .. _nfv7-opendaylight-101-release: http://cbs.centos.org/repos/nfv7-opendaylight-101-release/x86_64/os/Packages/
215 .. _nfv7-opendaylight-8-release: http://cbs.centos.org/repos/nfv7-opendaylight-8-release/x86_64/os/Packages/
216 .. _nfv7-opendaylight-9-release: http://cbs.centos.org/repos/nfv7-opendaylight-9-release/x86_64/os/Packages/
217 .. _nfv7-opendaylight-10-release: http://cbs.centos.org/repos/nfv7-opendaylight-10-release/x86_64/os/Packages/
218 .. _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
219 .. _integration-multipatch-test: https://jenkins.opendaylight.org/releng/search/?q=integration-multipatch-test
220 .. _Jenkins sandbox: https://docs.opendaylight.org/en/stable-carbon/submodules/releng/builder/docs/jenkins.html#jenkins-sandbox
221 .. _scratch repo on Nexus: https://docs.opendaylight.org/en/stable-carbon/submodules/releng/builder/docs/jenkins.html#jenkins-sandbox