delete deprecated file bundles_in_clr and clean whitespace on

ceph deploy
This commit is contained in:
Leona
2016-08-12 07:38:36 -07:00
parent 55053858b2
commit 15ba5c5641
2 changed files with 75 additions and 1077 deletions
File diff suppressed because it is too large Load Diff
+75 -53
View File
@@ -1,25 +1,34 @@
.. _ceph-deploy:
Ceph*
#####
Ceph is a distributed storage system designed to scale well. It can be integrated with
OpenStack* as the storage backend for the OS images and volumes.
Ceph is a distributed storage system designed to scale well. It can be
integrated with OpenStack* as the storage backend for the OS images and
volumes.
Deploying a Ceph storage cluster is simple using Clear Linux* OS for
Intel® Architecture and Ansible*.
Deploying a Ceph storage cluster is simple using Clear Linux* OS for Intel® Architecture
and Ansible*.
Environment
===========
For this example, we'll use a total of five nodes: a **deployment node** which we will use
For this example, we'll use a total of five nodes: a **deployment node**,
to run the playbooks, a **monitor node**, and three **storage nodes**.
Install each component on its own server for best results; however, for testing
purposes you can install the monitor and storage nodes on the same hosts.
Install each component on its own server for best results; however,
for testing purposes you can install the monitor and storage nodes
on the same host.
Prerequisites
=============
Ansible uses ssh to run commands on the remote servers. In order to do that, the servers
must be configured to allow passwordless ssh connections from the root user. Follow these
steps to configure your nodes.
Ansible uses ssh to run commands on the remote servers. In order to
do that, the servers must be configured to allow passwordless ssh
connections from the root user. Follow these steps to configure
your nodes.
#. Generate ssh keys::
@@ -38,25 +47,29 @@ steps to configure your nodes.
# ssh-copy-id root@node
Install the software
====================
Install the ``sysadmin-hostmgmt`` bundle on the development node. This bundle contains
the Ansible software required to run the playbooks, as well as some Ansible roles and
sample playbooks that you can use to build your own::
Install the ``sysadmin-hostmgmt`` bundle on the development node. This
bundle contains the Ansible software required to run the playbooks, as
well as some Ansible roles and sample playbooks that you can use to
build your own::
# swupd bundle-add sysadmin-hostmgmt
Create the playbook
===================
The ``sysadmin-hostmgmt`` bundle includes some sample playbooks that you may use and
customize for your own needs. Start by making a copy of the sample playbook into your
home folder.::
The ``sysadmin-hostmgmt`` bundle includes some sample playbooks that
can be customized for your own needs. Start by making a copy of the
sample playbook into your home folder.::
# cp /usr/share/ansible/examples/ceph ~/
The playbook consist of four files that you should modify to fit your needs::
The playbook consist of four files that you should modify to fit
your needs::
ceph
|-- group_vars/
@@ -65,8 +78,8 @@ The playbook consist of four files that you should modify to fit your needs::
|-- hosts
+-- ceph_deploy.yml
The hosts file contains the IP addresses of your servers grouped under the roles
they will serve::
The hosts file contains the IP addresses of your servers grouped
under the roles they will serve::
[mons]
172.28.128.7
@@ -76,9 +89,10 @@ they will serve::
172.28.128.9
172.28.128.10
This :file:`groups_var/all` file contains variables that will applied to all your nodes.
The mandatory variables are already there; be sure to change the values accordingly to
fit your environment. It should look something like this::
This :file:`groups_var/all` file contains variables that will applied
to all your nodes. The mandatory variables are already there; be sure
to change the values accordingly to fit your environment. It should
look something like this::
---
journal_size: 1024
@@ -89,51 +103,59 @@ fit your environment. It should look something like this::
A full list of available variables can be found under
:file:`/usr/share/ansible/roles/<role>/defaults/main.yml`
This :file:`groups_var/osd` file contains variables that apply only to the hosts under the
``[mons]`` section in your hosts file. You can choose one of the three available scenarios
for this playbook.
This :file:`groups_var/osd` file contains variables that apply only
to the hosts under the ``[mons]`` section in your hosts file. You can
choose one of the three available scenarios for this playbook.
#. **Journal and osd_data on the same device**: This will co-locate both journal and data
on the same disk, creating a partition at the beginning of the device::
#. **Journal and osd_data on the same device**: This will co-locate both
journal and data on the same disk, creating a partition at the
beginning of the device::
journal_collocation: true
devices:
- /dev/sdb
- /dev/sdc
- /dev/sdd
journal_collocation: true
devices:
- /dev/sdb
- /dev/sdc
- /dev/sdd
#. **N journal devices for N OSDs**: In this example, the ``sdb`` partition will be used
for journaling of ``sdc`` and ``sdd sdf`` will be used for journaling of ``sde``::
#. **N journal devices for N OSDs**: In this example, the ``sdb``
partition will be used for journaling of ``sdc``. The ``sdd sdf``
will be used for journaling of ``sde``::
raw_multi_journal: true
devices:
- /dev/sdc
- /dev/sdd
- /dev/sde
raw_journal_devices:
- /dev/sdb
- /dev/sdb
- /dev/sdf
raw_multi_journal: true
devices:
- /dev/sdc
- /dev/sdd
- /dev/sde
raw_journal_devices:
- /dev/sdb
- /dev/sdb
- /dev/sdf
#. **Specify directory instead of disk for OSDs**::
#. **Specify a directory instead of disk for OSDs**::
osd_directory: true
osd_directories:
- /var/lib/ceph/osd/mydir1
- /var/lib/ceph/osd/mydir2
- /var/lib/ceph/osd/mydir3
osd_directory: true
osd_directories:
- /var/lib/ceph/osd/mydir1
- /var/lib/ceph/osd/mydir2
- /var/lib/ceph/osd/mydir3
Run the playbook
================
Once you have your variables and hosts file configured, the deployment can be fired
with the following command::
Once the variables and hosts file is configured,
deployment is as simple as issuing the command::
# ansible-playbook -i hosts ceph_deploy.yml
Verify
======
Now that Ansible has finished with the deployment, you can verify the health of the cluster
with the Ceph utilites like ``ceph status`` and ``ceph osd tree``::
After Ansible has finished deployment, you may
like to verify and watch the health of the cluster
with the Ceph utilites like ``ceph status`` and
``ceph osd tree``::
# ceph status
cluster ee1fae3b-b95b-494c-abd7-f0629d113446