2012-05-23 22:44:11 +00:00
|
|
|
=========================================
|
|
|
|
Cloning the Ceph Source Code Repository
|
|
|
|
=========================================
|
2012-11-08 06:17:46 +00:00
|
|
|
|
2013-10-22 20:25:13 +00:00
|
|
|
You may clone a Ceph branch of the Ceph source code by going to `github Ceph
|
|
|
|
Repository`_, selecting a branch (``master`` by default), and clicking the
|
|
|
|
**Download ZIP** button.
|
2012-05-23 22:44:11 +00:00
|
|
|
|
2013-10-22 20:25:13 +00:00
|
|
|
.. _github Ceph Repository: https://github.com/ceph/ceph
|
|
|
|
|
|
|
|
|
|
|
|
To clone the entire git repository, install and configure ``git``.
|
|
|
|
|
|
|
|
|
|
|
|
Install Git
|
|
|
|
===========
|
|
|
|
|
2014-07-10 18:30:00 +00:00
|
|
|
To install ``git`` on Debian/Ubuntu, execute::
|
2013-10-22 20:25:13 +00:00
|
|
|
|
|
|
|
sudo apt-get install git
|
|
|
|
|
2014-07-10 18:30:00 +00:00
|
|
|
|
|
|
|
To install ``git`` on CentOS/RHEL, execute::
|
|
|
|
|
|
|
|
sudo yum install git
|
|
|
|
|
|
|
|
|
2013-10-22 20:25:13 +00:00
|
|
|
You must also have a ``github`` account. If you do not have a
|
|
|
|
``github`` account, go to `github.com`_ and register.
|
|
|
|
Follow the directions for setting up git at
|
|
|
|
`Set Up Git`_.
|
|
|
|
|
|
|
|
.. _github.com: http://github.com
|
|
|
|
.. _Set Up Git: http://help.github.com/linux-set-up-git
|
|
|
|
|
|
|
|
|
|
|
|
Add SSH Keys (Optional)
|
|
|
|
=======================
|
|
|
|
|
|
|
|
If you intend to commit code to Ceph or to clone using SSH
|
|
|
|
(``git@github.com:ceph/ceph.git``), you must generate SSH keys for github.
|
|
|
|
|
|
|
|
.. tip:: If you only intend to clone the repository, you may
|
|
|
|
use ``git clone --recursive https://github.com/ceph/ceph.git``
|
|
|
|
without generating SSH keys.
|
|
|
|
|
|
|
|
To generate SSH keys for ``github``, execute::
|
|
|
|
|
|
|
|
ssh-keygen
|
|
|
|
|
|
|
|
Get the key to add to your ``github`` account (the following example
|
|
|
|
assumes you used the default file path)::
|
|
|
|
|
|
|
|
cat .ssh/id_rsa.pub
|
|
|
|
|
|
|
|
Copy the public key.
|
|
|
|
|
|
|
|
Go to your your ``github`` account, click on "Account Settings" (i.e., the
|
|
|
|
'tools' icon); then, click "SSH Keys" on the left side navbar.
|
|
|
|
|
|
|
|
Click "Add SSH key" in the "SSH Keys" list, enter a name for the key, paste the
|
|
|
|
key you generated, and press the "Add key" button.
|
2012-05-23 22:44:11 +00:00
|
|
|
|
2012-11-08 06:17:46 +00:00
|
|
|
|
2012-05-23 22:44:11 +00:00
|
|
|
Clone the Source
|
2012-11-08 06:17:46 +00:00
|
|
|
================
|
|
|
|
|
2012-05-23 22:44:11 +00:00
|
|
|
To clone the Ceph source code repository, execute::
|
|
|
|
|
2012-08-02 15:27:55 +00:00
|
|
|
git clone --recursive https://github.com/ceph/ceph.git
|
2012-05-23 22:44:11 +00:00
|
|
|
|
|
|
|
Once ``git clone`` executes, you should have a full copy of the Ceph
|
|
|
|
repository.
|
|
|
|
|
2012-08-02 15:27:55 +00:00
|
|
|
.. tip:: Make sure you maintain the latest copies of the submodules
|
|
|
|
included in the repository. Running ``git status`` will tell you if
|
2012-11-08 06:17:46 +00:00
|
|
|
the submodules are out of date.
|
|
|
|
|
|
|
|
::
|
2012-05-23 22:44:11 +00:00
|
|
|
|
2012-08-02 15:31:26 +00:00
|
|
|
cd ceph
|
2012-05-23 22:44:11 +00:00
|
|
|
git status
|
|
|
|
|
2012-11-08 06:17:46 +00:00
|
|
|
If your submodules are out of date, run::
|
2012-08-02 15:29:50 +00:00
|
|
|
|
2015-03-06 16:08:55 +00:00
|
|
|
git submodule update --force --init --recursive
|
2012-08-02 15:29:50 +00:00
|
|
|
|
2012-05-23 22:44:11 +00:00
|
|
|
Choose a Branch
|
2012-11-08 06:17:46 +00:00
|
|
|
===============
|
|
|
|
|
2012-05-23 22:44:11 +00:00
|
|
|
Once you clone the source code and submodules, your Ceph repository
|
|
|
|
will be on the ``master`` branch by default, which is the unstable
|
|
|
|
development branch. You may choose other branches too.
|
|
|
|
|
|
|
|
- ``master``: The unstable development branch.
|
|
|
|
- ``stable``: The bugfix branch.
|
|
|
|
- ``next``: The release candidate branch.
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
git checkout master
|