• Stars
    star
    101
  • Rank 338,166 (Top 7 %)
  • Language
    Ruby
  • License
    Apache License 2.0
  • Created over 13 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Chef cookbooks for Ceph

Chef cookbook Build Status Gitter chat

DESCRIPTION

Installs and configures Ceph, a distributed network storage and filesystem designed to provide excellent performance, reliability, and scalability.

The current version is focused towards deploying Monitors and OSD on Ubuntu.

For documentation on how to use this cookbook, refer to the USAGE section.

For help, use Gitter chat, mailing-list or issues

REQUIREMENTS

Chef

>= 11.6.0

Platform

Tested as working:

  • Debian Wheezy (7)
  • Ubuntu Precise (12.04)
  • Ubuntu Trusty (14.04)

Cookbooks

The ceph cookbook requires the following cookbooks from Chef:

https://supermarket.chef.io/

TEMPLATES

USAGE

Ceph cluster design is beyond the scope of this README, please turn to the public wiki, mailing lists, visit our IRC channel, or contact Inktank:

http://ceph.com/docs/master http://ceph.com/resources/mailing-list-irc/ http://www.inktank.com/

This cookbook can be used to implement a chosen cluster design. Most of the configuration is retrieved from node attributes, which can be set by an environment or by a wrapper cookbook. A basic cluster configuration will need most of the following attributes:

  • node['ceph']['config']['fsid'] - the cluster UUID
  • node['ceph']['config]'['global']['public network'] - a CIDR specification of the public network
  • node['ceph']['config]'['global']['cluster network'] - a CIDR specification of a separate cluster replication network
  • node['ceph']['config]'['global']['rgw dns name'] - the main domain of the radosgw daemon

Most notably, the configuration does NOT need to set the mon_initial_members, because the cookbook does a node search to find other mons in the same environment.

The other set of attributes that this recipe needs is node['ceph']['osd_devices'], which is an array of OSD definitions, similar to the following:

  • {'device' => '/dev/sdb'} - Use a full disk for the OSD, with a small partition for the journal
  • {'type' => 'directory', 'device' => '/src/node/sdb1/ceph'} - Use a directory, and have a small file for the journal
  • {'device' => '/dev/sde', 'dmcrypt' => true} - Store the data encrypted by passing --dmcrypt to ceph-disk-prepare
  • {'device' => '/dev/sdc', 'journal' => '/dev/sdd2'} - use a full disk for the OSD with a custom partition for the journal

Using a Policy Wrapper Cookbook

To automate setting several of these node attributes, it is recommended to use a policy wrapper cookbook. This allows the ability to use Chef Server cookbook versions along with environment version restrictions to roll out configuration changes in an ordered fashion.

It also can help with automating some settings. For example, a wrapper cookbook could peek at the list of harddrives that ohai has found and populate node['ceph']['osd_devices'] accordingly, instead of manually typing them all in:

node.override['ceph']['osd_devices'] = node['block_device'].each.reject{ |name, data| name !~ /^sd[b-z]/}.sort.map { |name, data| {'journal' => "/dev/#{name}"} }

For best results, the wrapper cookbook's recipe should be placed before the Ceph cookbook in the node's runlist. This will ensure that any attributes are in place before the Ceph cookbook runs and consumes those attributes.

Ceph Monitor

Ceph monitor nodes should use the ceph-mon role.

Includes:

  • ceph::default

Ceph Metadata Server

Ceph metadata server nodes should use the ceph-mds role.

Includes:

  • ceph::default

Ceph OSD

Ceph OSD nodes should use the ceph-osd role

Includes:

  • ceph::default

Ceph Rados Gateway

Ceph Rados Gateway nodes should use the ceph-radosgw role

ATTRIBUTES

General

  • node['ceph']['search_environment'] - a custom Chef environment to search when looking for mon nodes. The cookbook defaults to searching the current environment

  • node['ceph']['branch'] - selects whether to install the stable, testing, or dev version of Ceph

  • node['ceph']['version'] - install a version of Ceph that is different than the cookbook default. If this is changed in a wrapper cookbook, some repository urls may also need to be replaced, and they are found in attributes/repo.rb. If the branch attribute is set to dev, this selects the gitbuilder branch to install

  • node['ceph']['extras_repo'] - whether to install the ceph extras repo. The tgt recipe requires this

  • node['ceph']['config']['fsid'] - the cluster UUID

  • node['ceph']['config']['global']['public network'] - a CIDR specification of the public network

  • node['ceph']['config']['global']['cluster network'] - a CIDR specification of a separate cluster replication network

  • node['ceph']['config']['config-sections'] - add to this hash to add extra config sections to the ceph.conf

  • node['ceph']['user_pools'] - an array of pool definitions, with attributes name, pg_num and create_options (optional), that are automatically created when a monitor is deployed

Ceph MON

  • node['ceph']['config']['mon'] - a hash of settings to save in ceph.conf in the [mon] section, such as 'mon osd nearfull ratio' => '0.70'

Ceph OSD

  • node['ceph']['osd_devices'] - an array of OSD definitions for the current node
  • node['ceph']['config']['osd'] - a hash of settings to save in ceph.conf in the [osd] section, such as 'osd max backfills' => 2
  • node['ceph']['config']['osd']['osd crush location'] - this attribute can be set on a per-node basis to maintain Crush map locations

Ceph MDS

  • node['ceph']['config']['mds'] - a hash of settings to save in ceph.conf in the [mds] section, such as 'mds cache size' => '100000'
  • node['ceph']['cephfs_mount'] - where the cephfs recipe should mount CephFS
  • node['ceph']['cephfs_use_fuse'] - whether the cephfs recipe should use the fuse cephfs client. It will default to heuristics based on the kernel version

Ceph Rados Gateway

  • node['ceph']['radosgw']['api_fqdn'] - what vhost to configure in the web server
  • node['ceph']['radosgw']['admin_email'] - the admin email address to configure in the web server
  • node['ceph']['radosgw']['rgw_addr'] - the web server's bind address, such as *:80
  • node['ceph']['radosgw']['rgw_port'] - if set, connects to the radosgw fastcgi over this port instead of a unix socket
  • node['ceph']['radosgw']['webserver_companion'] - defaults to 'apache2', but it can be set to 'civetweb', or to false in order to leave it unconfigured
  • node['ceph']['radosgw']['path'] - where to save the s3gw.fcgi file
  • node['ceph']['config']['global']['rgw dns name'] - the main domain of the radosgw daemon, to calculate the bucket name from a subdomain

Resources/Providers

ceph_client

The ceph_client LWRP provides an easy way to construct a Ceph client key. These keys are needed by anything that needs to talk to the Ceph cluster, including RadosGW, CephFS, and RBD access.

Actions

  • :add - creates a client key with the given parameters

Parameters

  • :name - name attribute. The name of the client key to create. This is used to provide a default for the other parameters
  • :caps - A hash of capabilities that should be granted to the client key. Defaults to { 'mon' => 'allow r', 'osd' => 'allow r' }
  • :as_keyring - Whether the key should be saved in a keyring format or a simple secret key. Defaults to true, meaning it is saved as a keyring
  • :keyname - The key name to register in Ceph. Defaults to client.#{name}.#{hostname}
  • :filename - Where to save the key. Defaults to /etc/ceph/ceph.client.#{name}.#{hostname}.keyring if as_keyring and /etc/ceph/ceph.client.#{name}.#{hostname}.secret if not as_keyring
  • :owner - Which owner should own the saved key file. Defaults to root
  • :group - Which group should own the saved key file. Defaults to root
  • :mode - What file mode should be applied. Defaults to '00640'

ceph_cephfs

The ceph_cephfs LWRP provides an easy way to mount CephFS. It will automatically create a Ceph client key for the machine and mount CephFS to the specified location. If the kernel client is used, instead of the fuse client, a pre-existing subdirectory of CephFS can be mounted instead of the root.

Actions

  • :mount - mounts CephFS
  • :umount - unmounts CephFS
  • :remount - remounts CephFS
  • :enable - adds an fstab entry to mount CephFS
  • :disable - removes an fstab entry to mount CephFS

Parameters

  • :directory - name attribute. Where to mount CephFS in the local filesystem
  • :use_fuse - whether to use ceph-fuse or the kernel client to mount the filesystem. ceph-fuse is updated more often, but the kernel client allows for subdirectory mounting. Defaults to true
  • :cephfs_subdir - which CephFS subdirectory to mount. Defaults to '/'. An exception will be thrown if this option is set to anything other than '/' if use_fuse is also true

ceph_pool

The ceph_pool LWRP provides an easy way to create and delete Ceph pools.

It assumes that connectivity to the cluster is setup and that admin credentials are available from default locations, e.g. /etc/ceph/ceph.client.admin.keyring.

Actions

  • :add - creates a pool with the given number of placement groups
  • :delete - deletes an existing pool

Parameters

  • :name - the name of the pool to create or delete
  • :pg_num - number of placement groups, when creating a new pool
  • :create_options - arguments for pool creation (optional)
  • :force - force the deletion of an exiting pool along with any data that is stored in it

DEVELOPING

Style Guide

This cookbook requires a style guide for all contributions. Travis will automatically verify that every Pull Request follows the style guide.

  1. Install ChefDK
  2. Activate ChefDK's copy of ruby: eval "$(chef shell-init bash)"
  3. bundle install
  4. bundle exec rake style

Testing

This cookbook uses Test Kitchen to verify functionality. A Pull Request can't be merged if it causes any of the test configurations to fail.

  1. Install ChefDK
  2. Activate ChefDK's copy of ruby: eval "$(chef shell-init bash)"
  3. bundle install
  4. bundle exec kitchen test aio-debian-74
  5. bundle exec kitchen test aio-ubuntu-1204
  6. bundle exec kitchen test aio-ubuntu-1404

LICENSE AND AUTHORS

  • Author: Kyle Bader [email protected]

  • Copyright 2013, DreamHost Web Hosting and Inktank Storage Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

ceph

Ceph is a distributed object, block, and file storage platform
C++
13,799
star
2

ceph-ansible

Ansible playbooks to deploy Ceph, the distributed filesystem.
Python
1,685
star
3

ceph-container

Docker files and images to run Ceph in containers
Shell
1,316
star
4

ceph-csi

CSI driver for Ceph
Go
1,236
star
5

go-ceph

Go bindings for Ceph πŸ™ πŸ™ πŸ™
Go
610
star
6

ceph-deploy

Deploy Ceph with minimal infrastructure, using just SSH access
Python
421
star
7

calamari

Web-based monitoring and management for Ceph
Python
349
star
8

cbt

The Ceph Benchmarking Tool
Python
266
star
9

s3-tests

Compatibility tests for S3 clones
Python
261
star
10

cn

Ceph Nano - One step S3 in container with Ceph.
Go
235
star
11

ceph-client

Ceph kernel client (kernel modules)
C
187
star
12

teuthology

Ceph test suite
Python
153
star
13

cephadm-ansible

ansible playbooks to be used with cephadm
Python
112
star
14

calamari-clients

Ceph Manager API Client Code
JavaScript
102
star
15

ceph-rust

Rust-lang interface to Ceph.
Rust
92
star
16

dmclock

Code that implements the dmclock distributed quality of service algorithm. See "mClock: Handling Throughput Variability for Hypervisor IO Scheduling" by Gulati, Merchant, and Varman.
C++
88
star
17

ceph-nagios-plugins

Nagios plugins for Ceph
Python
82
star
18

ceph-nvmeof

Service to provide Ceph storage over NVMe-oF/TCP protocol
Python
76
star
19

cephmetrics

ceph metric collectors with collectd integration
Python
64
star
20

gf-complete

this repository is a read only mirror, the upstream is
C
62
star
21

ceph-iscsi

Ceph iSCSI tools
Python
61
star
22

cephfs-hadoop

cephfs-hadoop
Java
57
star
23

romana

JavaScript
51
star
24

ceph-build

Helper scripts for building the official Ceph packages
Shell
44
star
25

qemu-kvm

Ceph RBD support for Qemu/KVM
C
40
star
26

phprados

PHP bindings for the RADOS client library
C
37
star
27

ceph-cosi

COSI driver for Ceph Object Store aka RGW
Go
34
star
28

jerasure

this repository is a read only mirror, the upstream is
C
33
star
29

ceph-tools

Misc ceph tools
Python
33
star
30

ceph-qa-suite

[DEPRECATED; see ceph.git/qa] Suite of Ceph QA tests to run with Teuthology
Python
33
star
31

libs3

Fork of http://git.ischo.com/libs3.git
C
32
star
32

ceph-salt

Deploy Ceph clusters using cephadm
Python
31
star
33

ceph-chef

Chef cookbooks for managing a Ceph cluster
Ruby
29
star
34

downburst

Fast Ubuntu Cloud Image creation on libvirt
Python
27
star
35

ceph-iscsi-cli

NOTICE: moved to https://github.com/ceph/ceph-iscsi
Python
25
star
36

ceph-medic

find common issues in ceph clusters
Python
22
star
37

pulpito

A dashboard for Ceph tests
JavaScript
22
star
38

ceph-iscsi-config

NOTICE: moved to https://github.com/ceph/ceph-iscsi
Python
22
star
39

radosgw-agent

radosgw sync agent
Python
22
star
40

ceph-cm-ansible

Ansible configurations for Ceph.com infrastructure
Shell
21
star
41

python-crush

C++
20
star
42

ceph-mixins

A set of Grafana dashboards and Prometheus alerts for Ceph.
Jsonnet
20
star
43

ceph-ci

ceph.git clone as source for CI
C++
20
star
44

dpdk

DPDK
C
19
star
45

puppet-ceph

Mirror of stackforge/puppet-ceph
Ruby
17
star
46

ceph.io

This repo contains static site content for www.ceph.io
HTML
16
star
47

libcrush

C
16
star
48

ceph-installer

A service to provision Ceph clusters
Python
15
star
49

paddles

RESTful API to store (and report) on Ceph tests
Python
14
star
50

persistent-volume-migrator

A collection of tools to migrate an ancient Kubernetes Ceph storage driver (in-tree, Flex) to Ceph-CSI
Go
14
star
51

propernoun

Update PowerDNS from DHCP leases and libvirt virtual machines
Python
13
star
52

rgw-pubsub-api

RGW PubSub API Clients
Go
13
star
53

ceph-csi-operator

Kubernetes operator for managing the CephCSI plugins
Go
13
star
54

obsync

rsync-like utility for syncing bucket data between object storage APIs like S3, Swift
Python
12
star
55

ceph-iscsi-tools

Useful tools for a ceph/iscsi gateway environment
Python
11
star
56

autobuild-ceph

Setup for running gitbuilder for the Ceph project
Shell
11
star
57

ceph-openstack-tools

Tools to develop Ceph/OpenStack integration
Shell
11
star
58

simplegpt

Simple Python library to parse GPT (GUID Partition Table) header and entries, useful as a learning tool
Python
11
star
59

ceph-ruby

Easy management of Ceph Distributed Storage System (rbd, images, rados objects) using ruby.
Ruby
11
star
60

python-jenkins

fork of python-jenkins for https://review.openstack.org/460363
Python
11
star
61

mod_fastcgi

Bugfixes and improves to mod_fastcgi, for use with RADOS Gateway
C
10
star
62

samba

Clone of the main samba repo: git://git.samba.org/samba.git
C
10
star
63

csi-charts

csi-charts
9
star
64

chacra

A binary/file REST API to aid in multi-distro|arch|release management
Python
9
star
65

ceph-erasure-code-corpus

Objects erasure encoded by Ceph
Shell
9
star
66

ceph-client-standalone

Standalone Ceph kernel client -- you probably want https://github.com/NewDreamNetwork/ceph-client instead
C
9
star
67

barclamp-ceph

Crowbar Barclamp for installing Ceph clusters
Ruby
8
star
68

blkin

C++
8
star
69

shaman

source of truth for the state of repositories on Chacra nodes
Python
8
star
70

apache2

A version of Apache HTTP Server with fixes for use with RADOS Gateway
C
7
star
71

ceph-qa-chef

Chef cookbooks used in Ceph QA jobs. (This is deprecated; please see ceph-cm-ansible instead.)
Ruby
7
star
72

ceph-kmod-rpm

kabi-tracking kmod RPMs for libceph, CephFS, and RDB for RHEL 7
7
star
73

mod-proxy-fcgi

mod_proxy_fcgi for apache 2.2
C
6
star
74

ceph-devstack

DevStack files
Shell
6
star
75

spawn

C++
6
star
76

leveldb

Fork of the LevelDB project
C++
5
star
77

keys

SSH and other keys used by the project, mostly in the Sepia lab
Shell
5
star
78

gmock

C++
5
star
79

cn-core

Bootstrap Ceph AIO - source of cn project
Go
5
star
80

qemu-iotests

Shell
5
star
81

ceph-autotests

HISTORICAL value only: Autotest helper for Ceph QA (obsolete)
Python
4
star
82

mita

Jenkins Slave orchestration service
Python
4
star
83

asphyxiate

Grab source code documentation via Doxygen into a Sphinx document
Python
4
star
84

collectd-4.10.1

A version of collectd that supports monitoring Ceph clusters (on top of the Debian 4.10.1-1+squeeze2 package)
C
4
star
85

ceph-nagios-plugin

A Nagios plugin that checks the health of a ceph cluster.
Perl
4
star
86

cookbook-vercoi

Chef Solo recipes used to bring up KVM hypervisors in the Sepia lab
Ruby
4
star
87

prado

Prado is a webservice that provides a single script to run Ansible playbooks
Python
4
star
88

handle_core

A userspace core file handler for Linux
C
4
star
89

ceph-object-corpus

corpus of encoded ceph structures
Shell
4
star
90

ceph-telemetry

Python
4
star
91

jenkins-slave-chef

Chef to setup jenkins slaves (pbuilder/regular).
Ruby
3
star
92

merfi

Finds and signs files with different signing tools (gpg, rpm-sign)
Python
3
star
93

ceph-kdump-copy

ceph kdump handler
Shell
3
star
94

run-crowbar-on-sepia

Quick & dirty script to run Crowbar on Sepia
Python
3
star
95

ceph-notes

3
star
96

libkmip

C
3
star
97

cephmetrics-osp

Shell
2
star
98

ceph-brag

Ceph performance testing results repository.
Python
2
star
99

munging_http_proxy

Munging HTTP proxy, for developing and debugging
Python
2
star
100

cookbook-vm-general

Python
2
star