5
We use Chef cookbooks to deploy Ceph. See `Managing Cookbooks with Knife`_ for details
6
on using ``knife``. For Chef installation instructions, see
7
`Installing Chef <../../install/chef>`_.
11
Add the ``cookbook_path`` to your ``~/.ceph/knife.rb`` configuration file. For example::
13
cookbook_path '/home/userId/.chef/ceph-cookbooks'
15
Install Ceph Cookbooks
16
----------------------
17
To get the cookbooks for Ceph, clone them from git.::
20
git clone https://github.com/ceph/ceph-cookbooks.git
21
knife cookbook upload parted btrfs ceph
23
Install Apache Cookbooks
24
------------------------
25
RADOS Gateway uses Apache 2. So you must install the Apache 2 cookbooks.
26
To retrieve the Apache 2 cookbooks, execute the following::
28
cd ~/.chef/ceph-cookbooks
29
knife cookbook site download apache2
31
The `apache2-{version}.tar.gz`` archive will appear in your ``~/.ceph`` directory.
32
In the following example, replace ``{version}`` with the version of the Apache 2
33
cookbook archive knife retrieved. Then, expand the archive and upload it to the
36
tar xvf apache2-{version}.tar.gz
37
knife cookbook upload apache2
41
To configure Chef, you must specify an environment and a series of roles. You
42
may use the Web UI or ``knife`` to perform these tasks.
44
The following instructions demonstrate how to perform these tasks with ``knife``.
47
Create a role file for the Ceph monitor. ::
49
cat >ceph-mon.rb <<EOF
51
description "Ceph monitor server"
57
Create a role file for the OSDs. ::
59
cat >ceph-osd.rb <<EOF
61
description "Ceph object store"
63
'recipe[ceph::bootstrap_osd]'
67
Add the roles to Chef using ``knife``. ::
69
knife role from file ceph-mon.rb ceph-osd.rb
71
You may also perform the same tasks with the command line and a ``vim`` editor.
72
Set an ``EDITOR`` environment variable. ::
78
knife create role {rolename}
80
The ``vim`` editor opens with a JSON object, and you may edit the settings and
83
Finally configure the nodes. ::
85
knife node edit {nodename}
90
.. _Managing Cookbooks with Knife: http://wiki.opscode.com/display/chef/Managing+Cookbooks+With+Knife