Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / doc / dev / release-process.rst
1 ======================
2   Ceph Release Process
3 ======================
4
5 1. Build environment
6 ====================
7
8 There are multiple build environments, debian based packages are built via pbuilder for multiple distributions.  The build hosts are listed in the ``deb_hosts`` file, and the list of distributions are in ``deb_dist``.  All distributions are build on each of the build hosts.  Currently there is 1 64 bit and 1 32 bit build host.
9
10 The RPM based packages are built natively, so one distribution per build host.  The list of hosts is found in ``rpm_hosts``.
11
12 Prior to building, it's necessary to update the pbuilder seed tarballs::
13
14     ./update_all_pbuilders.sh
15
16 2. Setup keyring for signing packages
17 =====================================
18
19 ::
20
21     export GNUPGHOME=<path to keyring dir>
22
23     # verify it's accessible
24     gpg --list-keys
25
26 The release key should be present::
27
28   pub   4096R/17ED316D 2012-05-20
29   uid   Ceph Release Key <sage@newdream.net>
30
31
32 3. Set up build area
33 ====================
34
35 Clone the ceph and ceph-build source trees::
36
37     git clone http://github.com/ceph/ceph.git
38     git clone http://github.com/ceph/ceph-build.git
39
40 In the ceph source directory, checkout next branch (for point releases use the {codename} branch)::
41
42     git checkout next
43
44 Checkout the submodules::
45
46     git submodule update --force --init --recursive
47
48 4.  Update Build version numbers
49 ================================
50
51 Substitute the ceph release number where indicated below by the string ``0.xx``.
52
53 Edit configure.ac and update the version number. Example diff::
54
55         -AC_INIT([ceph], [0.54], [ceph-devel@vger.kernel.org])
56         +AC_INIT([ceph], [0.55], [ceph-devel@vger.kernel.org])
57  
58 Update the version number in the debian change log::
59
60         DEBEMAIL user@host dch -v 0.xx-1
61
62 Commit the changes::
63
64         git commit -a
65
66 Tag the release::
67
68         ../ceph-build/tag-release v0.xx
69
70
71 5. Create Makefiles
72 ===================
73
74 The actual configure options used to build packages are in the
75 ``ceph.spec.in`` and ``debian/rules`` files.  At this point we just
76 need to create a Makefile.::
77
78         ./do_autogen.sh
79
80
81 6. Run the release scripts
82 ==========================
83
84 This creates tarballs and copies them, with other needed files to
85 the build hosts listed in deb_hosts and rpm_hosts, runs a local build
86 script, then rsyncs the results back to the specified release directory.::
87
88         ../ceph-build/do_release.sh /tmp/release
89
90
91 7. Create RPM Repo
92 ==================
93
94 Copy the rpms to the destination repo::
95
96        mkdir /tmp/rpm-repo
97        ../ceph-build/push_to_rpm_repo.sh /tmp/release /tmp/rpm-repo 0.xx
98
99 Next add any additional rpms to the repo that are needed such as leveldb and
100 and ceph-deploy.  See RPM Backports section
101
102 Finally, sign the rpms and build the repo indexes::
103
104   ../ceph-build/sign_and_index_rpm_repo.sh /tmp/release /tmp/rpm-repo 0.xx
105
106
107 8. Create Debian repo
108 =====================
109
110 The key-id used below is the id of the ceph release key from step 2::
111
112         mkdir /tmp/debian-repo
113         ../ceph-build/gen_reprepro_conf.sh /tmp/debian-repo key-id
114         ../ceph-build/push_to_deb_repo.sh /tmp/release /tmp/debian-repo 0.xx main
115
116
117 Next add any addition debian packages that are needed such as leveldb and
118 ceph-deploy.  See the Debian Backports section below.
119
120 Debian packages are signed when added to the repo, so no further action is
121 needed.
122
123
124 9.  Push repos to ceph.org
125 ==========================
126
127 For a development release::
128
129         rcp ceph-0.xx.tar.bz2 ceph-0.xx.tar.gz \
130              ceph_site@ceph.com:ceph.com/downloads/.
131         rsync -av /tmp/rpm-repo/0.xx/ ceph_site@ceph.com:ceph.com/rpm-testing
132         rsync -av /tmp/debian-repo/ ceph_site@ceph.com:ceph.com/debian-testing
133
134 For a stable release, replace {CODENAME} with the release codename (e.g., ``argonaut`` or ``bobtail``)::
135
136         rcp ceph-0.xx.tar.bz2 \
137             ceph_site@ceph.com:ceph.com/downloads/ceph-0.xx.tar.bz2
138         rcp ceph-0.xx.tar.gz  \
139             ceph_site@ceph.com:ceph.com/downloads/ceph-0.xx.tar.gz
140         rsync -av /tmp/rpm-repo/0.xx/ ceph_site@ceph.com:ceph.com/rpm-{CODENAME}
141         rsync -auv /tmp/debian-repo/ ceph_site@ceph.com:ceph.com/debian-{CODENAME}
142
143 10. Update Git
144 ==============
145
146 Point release
147 -------------
148
149 For point releases just push the version number update to the
150 branch and the new tag::
151
152     git push origin {codename}
153     git push origin v0.xx
154
155 Development and Stable releases
156 -------------------------------
157
158 For a development release, update tags for ``ceph.git``::
159
160     git push origin v0.xx
161     git push origin HEAD:last
162     git checkout master
163     git merge next
164     git push origin master
165     git push origin HEAD:next
166
167 Similarly, for a development release, for both ``teuthology.git`` and ``ceph-qa-suite.git``::
168
169     git checkout master
170     git reset --hard origin/master
171     git branch -f last origin/next
172     git push -f origin last
173     git push -f origin master:next