663448483d2373e829c11f48ca07a22f9362e56a
[integration/packaging.git] / docs / packaging-releases.rst
1 Packaging OpenDaylight Releases
2 ===============================
3
4 These docs are for Integration/Packaging committers to reference while they
5 package OpenDaylight releases and service releases. Users should not, and would
6 not be able to due to missing permissions, follow this guide. This process is
7 not needed for Continuous Delivery pipeline packages, just formal releases.
8
9 Building on CentOS Community Build System
10 -----------------------------------------
11
12 OpenDaylight builds and hosts formal releases and service releases on the
13 CentOS Community Build System (CBS). Building on the CBS requires human
14 intervention, as the required credentials can't be stored on our build
15 systems. Continuous Delivery builds are hosted on Nexus to remove this need
16 for a human.
17
18 Find the release tarball. Make sure it's the one that has been promoted to the
19 opendaylight.releases Nexus repository, not the same build as a Release
20 Candidate before promotion. The packaging logic will only give release version
21 numbers for builds of artifacts from this release repository.
22
23 https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/karaf/0.8.1/karaf-0.8.1.tar.gz
24
25 Use the packaging-build-rpm job, for the right stream, to package the tarball.
26
27 TODO: Document getting permission to run jobs on RelEng Jenkins.
28
29 https://jenkins.opendaylight.org/releng/job/packaging-build-rpm-oxygen/
30
31 If it builds and passes tests, download the resulting source RPM from Nexus.
32
33 https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-x86_64-devel/
34
35 Build the SRPM on the CentOS CBS, using the build target for this release.
36
37 TODO: Document adding build targets to CBS, only needed for new major releases
38 TODO: Document getting CBS permissions
39
40     cbs build nfv7-opendaylight-8-el7 opendaylight-8.1.0-1.el7.src.rpm
41
42 After the SRPM uploads and the noarch RPM builds, tag it to the appropriate
43 build tags for this release. If this is the first time tag has been used,
44 you'll also need to add the package to the tag.
45
46 Releases should typically be tagged to three related tags.
47
48 * Testing tag for this major version
49
50     cbs tag-build nfv7-opendaylight-8-testing opendaylight-8.1.0-1.el7
51
52 * Release tag for this major.minor version
53
54     cbs add-pkg nfv7-opendaylight-81-release opendaylight --owner=dfarrell07
55     cbs tag-build nfv7-opendaylight-81-release opendaylight-8.1.0-1.el7
56
57 * Release tag for this major version
58
59     cbs tag-build nfv7-opendaylight-8-release opendaylight-8.1.0-1.el7
60
61 It may be advisable to fully do the testing tag first, and only once everything
62 is verified working do the release tags.
63
64 Wait for the repository to regenerate and show the new package.
65
66 http://cbs.centos.org/repos/nfv7-opendaylight-8-testing/x86_64/os/Packages/
67
68 Once the RPM is available on the CBS, test it with the test-rpm-master job.
69
70 https://jenkins.opendaylight.org/releng/job/packaging-test-rpm-master/
71
72 If everything passes, link the main downloads documentation to the RPM in the
73 major.minor release repository. This is the permanent home for this version,
74 will not be overridden by later versions.
75
76 http://docs.opendaylight.org/en/latest/downloads.html
77
78 Updating Docs
79 -------------
80
81 Update the readthedocs downloads page to point at the new RPM.
82
83 https://git.opendaylight.org/gerrit/gitweb?p=docs.git;a=blob;f=docs/downloads.rst
84
85 Adding Example Configuration Files
86 ----------------------------------
87
88 Add example configuration files for any new RPM repositories.
89
90 https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=tree;f=packages/rpm/example_repo_configs
91
92 As a change that depends on the repository configuration file change, add a
93 Packer variables file for the ODL version and CBS repository URL.
94
95 https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=tree;f=packer/vars
96
97 TODO: Document building/pushing VMs/containers after INTPAK-12 automation
98
99 Updating Tests for Release Events
100 ---------------------------------
101
102 Various release-related events require changes in packaging test coverage.
103
104 Tests need to be updated when:
105
106 * New releases or service releases are cut
107 * Old releases or service releases go End-of-Life (EOL)
108 * New branches are added
109 * Branches go EOL
110 * Old temporary autorelease, snapshot or multipatch builds expire (every 30-60
111   days)
112
113 Updating Unit Tests
114 +++++++++++++++++++
115
116 There are unit tests in Int/Pack that verify the Python build automation
117 scripts.
118
119 https://git.opendaylight.org/gerrit/gitweb?p=integration/packaging.git;a=blob;f=packages/test_lib.py
120
121 Update the unit tests by grepping around and copying examples.
122
123 Updating Functional Tests
124 +++++++++++++++++++++++++
125
126 There are functional tests in RelEng/Builder that build and test packages to
127 verify build jobs.
128
129 https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=tree;f=jjb/packaging
130
131 Update the functional tests by grepping around and copying examples. Make sure
132 to update both the test cases and the default parameters.
133
134 Updating Puppet
135 ---------------
136
137 The puppet-opendaylight Rakefile, which drives our functional Beaker tests,
138 needs to be updated when a new ODL major release comes out. It pulls the latest
139 from the <release>-devel Nexus repo (for a diffrent value for <release> on each
140 puppet-opendaylight branch), so it does not need to be updated for new SRs.
141
142 The default param in manafests/params.pp and rspec-puppet unit/acceptance tests
143 throughout the repo also need to be updated only for major versions, not SRs.
144
145 Updating Ansible
146 ----------------
147
148 The default vars in vars/main.yml need to be updated for each major release and
149 SR. Grep around to find the places to update.
150
151 New example playbooks in the ansible-opendaylight/examples directory need to be
152 added for each new major release.
153
154     rpm_<new devel branch major version>_devel.yml
155
156     rpm_<just-released major version>_release.yml
157
158 Update the playbook used in test-ansible-rpm script for each new major version
159 devel CD repo.
160
161 https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=blob;f=jjb/packaging/test-ansible-rpm.sh