Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / doc / rados / deployment / ceph-deploy-new.rst
1 ==================
2  Create a Cluster
3 ==================
4
5 The first step in using Ceph with ``ceph-deploy`` is to create a new Ceph
6 cluster. A new Ceph cluster has:
7
8 - A Ceph configuration file, and
9 - A monitor keyring.
10
11 The Ceph configuration file consists of at least:
12
13 - Its own filesystem ID (``fsid``)
14 - The initial monitor(s) hostname(s), and
15 - The initial monitor(s) and IP address(es).
16
17 For additional details, see the `Monitor Configuration Reference`_.
18
19 The ``ceph-deploy`` tool also creates a monitor keyring and populates it with a
20 ``[mon.]`` key.  For additional details, see the `Cephx Guide`_.
21
22
23 Usage
24 -----
25
26 To create a cluster with ``ceph-deploy``, use the ``new`` command and specify
27 the host(s) that will be initial members of the monitor quorum. ::
28
29         ceph-deploy new {host [host], ...}
30
31 For example::
32
33         ceph-deploy new mon1.foo.com
34         ceph-deploy new mon{1,2,3}
35
36 The ``ceph-deploy`` utility will use DNS to resolve hostnames to IP
37 addresses.  The monitors will be named using the first component of
38 the name (e.g., ``mon1`` above).  It will add the specified host names
39 to the Ceph configuration file. For additional details, execute::
40
41         ceph-deploy new -h
42
43
44 Naming a Cluster
45 ----------------
46
47 By default, Ceph clusters have a cluster name of ``ceph``. You can specify
48 a cluster name if you want to run multiple clusters on the same hardware. For
49 example, if you want to optimize a cluster for use with block devices, and
50 another for use with the gateway, you can run two different clusters on the same
51 hardware if they have a different ``fsid`` and cluster name. ::
52
53         ceph-deploy --cluster {cluster-name} new {host [host], ...}
54
55 For example::
56
57         ceph-deploy --cluster rbdcluster new ceph-mon1
58         ceph-deploy --cluster rbdcluster new ceph-mon{1,2,3}
59
60 .. note:: If you run multiple clusters, ensure you adjust the default
61    port settings and open ports for your additional cluster(s) so that
62    the networks of the two different clusters don't conflict with each other.
63
64
65 .. _Monitor Configuration Reference: ../../configuration/mon-config-ref
66 .. _Cephx Guide: ../../../dev/mon-bootstrap#secret-keys