{"id":19152833,"url":"https://github.com/datacentred/puppet-ceph","last_synced_at":"2025-04-19T16:33:13.624Z","repository":{"id":27437074,"uuid":"30915090","full_name":"datacentred/puppet-ceph","owner":"datacentred","description":"Ceph cluster deployment for puppet","archived":false,"fork":false,"pushed_at":"2017-08-15T10:01:05.000Z","size":121,"stargazers_count":2,"open_issues_count":5,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-02T00:42:59.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datacentred.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-17T11:58:24.000Z","updated_at":"2023-04-28T08:57:24.000Z","dependencies_parsed_at":"2022-09-02T05:16:52.296Z","dependency_job_id":null,"html_url":"https://github.com/datacentred/puppet-ceph","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacentred%2Fpuppet-ceph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacentred%2Fpuppet-ceph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacentred%2Fpuppet-ceph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datacentred%2Fpuppet-ceph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datacentred","download_url":"https://codeload.github.com/datacentred/puppet-ceph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223801989,"owners_count":17205216,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T08:19:33.478Z","updated_at":"2024-11-09T08:19:34.043Z","avatar_url":"https://github.com/datacentred.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ceph\n\n[![Build Status](https://travis-ci.org/spjmurray/puppet-ceph.png?branch=master)](https://travis-ci.org/spjmurray/puppet-ceph)\n[![Coverage Status](https://coveralls.io/repos/github/spjmurray/puppet-ceph/badge.svg?branch=master)](https://coveralls.io/github/spjmurray/puppet-ceph?branch=master)\n\n#### Table Of Contents\n\n1. [Overview](#overview)\n2. [Module Description](#module-description)\n3. [Compatibility Matrix](#compatibility-matrix)\n4. [Setup - The basics of getting started with ceph](#setup)\n    * [Setup Requirements](#setup-requirements)\n5. [Usage](#usage)\n    * [Basic Usage](#basic-usage)\n    * [Advanced Usage](#advanced-usage)\n6. [Limitations](#limitations)\n\n## Overview\n\nDeploys Ceph components\n\n## Module Description\n\nVery lightweight implementation of Ceph deployment.  This module depends quite\nheavily on knowledge of how the various ceph commands work and the requisite\nconfiguration values. See the usage example below.\n\nThe osd custom type operates on SCSI addresses e.g. '1:0:0:0/6:0:0:0'.  This\naims to solve the problem when a disk is removed from the cluster and replaced.\nThe device node name is liable to change from /dev/sdb to /dev/sde thus hard\ncoding device names is bad.  However if we model deployment on hardware location\nthen we can derive the device name, probe the drive partiton type and provision\nbased on whether ceph-disk has been run.\n\nThe OSD provider can also operate on enclosures with SES firmware running on\na SAS expander.  In some cases SCSI addresses aren't predicatable and susceptible\nto the same enumeration problem as /dev device names.  In these cases the devices\ncan be provisioned with 'Slot 01' which directly correlates to a slot name\nfound in sysfs under /sys/class/enclosure.  On newer expanders the labels may be\nformatted as DISK00 which is also supported.  The two addressing modes can be used\ninterchangably.\n\nThe OSD provider also accepts an arbitrary hash of parameters to be passed to\nceph-disk.  The keys are the long options supported by ceph-disk stripped of the\nleading double hyphens.  Values are either strings or nil/undef e.g. for options\nwithout arguments like --bluestore.  These may be specified for all OSDs with\nthe special name `defaults`.\n\n## Compatibility Matrix\n\n| Version | Operating System                       | Ceph | Puppet |\n| ------- | -------------------------------------- | -----| ------ |\n| 1.0.x   | Ubuntu 14.04                           | 0.94 | 3      |\n| 1.1.x   | Ubuntu 14.04                           | 0.94 | 3      |\n| 1.2.x   | Ubuntu 14.04                           | 0.94 | 3      |\n| 1.3.x   | Ubuntu 14.04, Centos 7                 | 0.94 | 3      |\n| 1.4.x   | Ubuntu 14.04, Centos 7                 | 9    | 3, 4   |\n| 1.5.x   | Ubuntu 14.04, Ubuntu 16.04\\*, Centos 7 | 10   | 3, 4   |\n| 2.0.x   | Ubuntu 14.04, Ubuntu 16.04\\*, Centos 7 | 10   | 3, 4   |\n| 3.x.x   | Ubuntu 14.04, Ubuntu 16.04, Centos 7   | 10   | 4      |\n\n\\* Ubuntu 16.04 only tested with Puppet 4\n\n## Usage\n\n### Basic Usage\n\nTo create a simple all in one server for test and development work:\n\n```puppet\ninclude ::ceph\n```\n\nHiera data should look like the following:\n\n```yaml\n---\n# Deployment options\nceph::mon: true\nceph::osd: true\n\n# Install options\nceph::manage_repo: true\nceph::repo_version: 'giant'\n\n# ceph.conf\nceph::conf:\n  global:\n    fsid: '62ed9bd6-adf4-11e4-8fb5-3c970ebb2b86'\n    mon_initial_members: \"%{hostname}\"\n    mon_host: \"%{ipaddress_eth0}\"\n    public_network: \"%{network_eth0}/24\"\n    cluster_network: \"%{network_eth1}/24\"\n    auth_supported: 'cephx'\n    filestore_xattr_use_omap: 'true'\n    osd_crush_chooseleaf_type: '0'\n  osd:\n    osd_journal_size: '1000'\n\n# Create these keyrings on the monitors\nceph::keys:\n  /etc/ceph/ceph.client.admin.keyring:\n    user: 'client.admin'\n    key: 'AQBAyNlUmO09CxAA2u2p6s38wKkBXaLWFeD7bA=='\n    caps_mon: 'allow *'\n    caps_osd: 'allow *'\n    caps_mds: 'allow'\n  /var/lib/ceph/bootstrap-osd/ceph.keyring:\n    user: 'client.bootstrap-osd'\n    key: 'AQDLGtpUdYopJxAAnUZHBu0zuI0IEVKTrzmaGg=='\n    caps_mon: 'allow profile bootstrap-osd'\n  /var/lib/ceph/bootstrap-mds/ceph.keyring:\n    user: 'client.bootstrap-mds'\n    key: 'AQDLGtpUlWDNMRAAVyjXjppZXkEmULAl93MbHQ=='\n    caps_mon: 'allow profile bootstrap-mds'\n\n# Create the OSDs\nceph::disks:\n  defaults:\n    params:\n      fs-type: 'xfs'\n  3:0:0:0:\n    journal: '6:0:0:0'\n  4:0:0:0:\n    journal: '6:0:0:0'\n  5:0:0:0:\n    journal: '6:0:0:0'\n```\n\n### Advanced Usage\n\nIt is recommended to enable deep merging so that global configuration can be\ndefined in common.yaml and role/host specific configuration merged with the\nglobal section.  A typical production deployment may look similar to the\nfollowing:\n\n```yaml\n---\n### /var/lib/hiera/module/ceph.yaml\n\n# Merge configuration based on role\nceph::conf_merge: true\n\n# Global configuration for all nodes\nceph::conf:\n  global:\n    fsid: '62ed9bd6-adf4-11e4-8fb5-3c970ebb2b86'\n    mon initial members: 'mon0,mon1,mon2'\n    mon host: '10.0.0.2,10.0.0.3,10.0.0.4'\n    auth supported: 'cephx'\n    public network: '10.0.0.0/16'\n    cluster network: '10.0.0.0/16'\n\n# Merge keys based on role\nceph::keys_merge: true\n```\n\n```yaml\n---\n### /var/lib/hiera/role/ceph-mon.yaml\n\n# Install a monitor\nceph::mon: true\n\n# Monitor specific configuration\nceph::conf:\n  mon:\n    mon compact on start: 'true'\n    mon compact on trim: 'true'\n\n# All the static keys on the system\nceph::keys:\n  /etc/ceph/ceph.client.admin.keyring:\n    user: 'client.admin'\n    key: \"%{hiera('ceph_key_client_admin')}\"\n    caps_mon: 'allow *'\n    caps_osd: 'allow *'\n    caps_mds: 'allow'\n  /var/lib/ceph/bootstrap-osd/ceph.keyring:\n    user: 'client.bootstrap-osd'\n    key: \"%{hiera('ceph_key_bootstrap_osd')}\"\n    caps_mon: 'allow profile bootstrap-osd'\n  /var/lib/ceph/bootstrap-mds/ceph.keyring:\n    user: 'client.bootstrap-mds'\n    key: \"%{hiera('ceph_key_bootstrap_mds')}\"\n    caps_mon: 'allow profile bootstrap-mds'\n  /var/lib/ceph/bootstrap-rgw/ceph.keyring:\n    user: 'client.bootstrap-rgw'\n    key: \"%{hiera('ceph_key_bootstrap_rgw')}\"\n    caps_mon: 'allow profile bootstrap-rgw'\n  /etc/ceph/ceph.client.glance.keyring:\n    user: 'client.glance'\n    key: \"%{hiera('ceph_key_client_glance')}\"\n    caps_mon: 'allow r'\n    caps_osd: 'allow class-read object_prefix rbd_children, allow rwx pool=glance'\n  /etc/ceph/ceph.client.cinder.keyring:\n    user: 'client.cinder'\n    key: \"%{hiera('ceph_key_client_cinder')}\"\n    caps_mon: 'allow r'\n    caps_osd: 'allow class-read object_prefix rbd_children, allow rx pool=glance, allow rwx pool=cinder'\n```\n\n```yaml\n---\n### /var/lib/hiera/role/ceph-osd.yaml\n\n# Create OSDs\nceph::osd: true\n\n# OSD specific configuration\nceph::conf:\n  osd:\n    filestore xattr use omap: 'true'\n    osd journal size: '10000'\n    osd mount options xfs: 'noatime,inode64,logbsize=256k,logbufs=8'\n    osd crush location hook: '/usr/local/bin/location_hook.py'\n    osd recovery max active: '1'\n    osd max backfills: '1'\n    osd recovery threads: '1'\n    osd recovery op priority: '1'\n\n# OSD specific static keys\nceph::keys:\n  /etc/ceph/ceph.client.admin.keyring:\n    user: 'client.admin'\n    key: \"%{hiera('ceph_key_client_admin')}\"\n  /var/lib/ceph/bootstrap-osd/ceph.keyring:\n    user: 'client.bootstrap-osd'\n    key: \"%{hiera('ceph_key_bootstrap_osd')}\"\n```\n\n```yaml\n---\n### /var/lib/hiera/productname/X10DRC-LN4+.yaml\n\n# Product specific OSD definitions\nceph::disks:\n  Slot 01:\n    journal: 'Slot 01'\n  Slot 02:\n    journal: 'Slot 02'\n  Slot 03:\n    journal: 'Slot 03'\n  Slot 04:\n    journal: 'Slot 04'\n  Slot 05:\n    journal: 'Slot 05'\n  Slot 06:\n    journal: 'Slot 06'\n  Slot 07:\n    journal: 'Slot 07'\n  Slot 08:\n    journal: 'Slot 08'\n  Slot 09:\n    journal: 'Slot 09'\n  Slot 10:\n    journal: 'Slot 10'\n  Slot 11:\n    journal: 'Slot 11'\n  Slot 12:\n    journal: 'Slot 12'\n```\n\n```yaml\n---\n### /var/lib/hiera/role/ceph-rgw.yaml\n\n# Create a Rados gateway\nceph::rgw: true\nceph::rgw_id: \"rgw.%{hostname}\"\n\n# Rados gateway specific configuration\nceph::conf:\n  client.rgw.%{hostname}:\n    rgw enable usage log: 'true'\n    rgw thread pool size: '4096'\n    rgw dns name: 'storage.example.com'\n    rgw keystone url: 'https://keystone.example.com:35357'\n    rgw keystone admin token: 'dab8928d-1787-4d73-b3e9-1184a4aeffcb'\n    rgw keystone accepted roles: '_member_,admin'\n    rgw relaxed s3 bucket names: 'true'\n\n# Rados gateway specific static keys\nceph::keys:\n  /etc/ceph/ceph.client.admin.keyring:\n    user: 'client.admin'\n    key: \"%{hiera('ceph_key_client_admin')}\"\n  /var/lib/ceph/bootstrap-rgw/ceph.keyring:\n    user: 'client.bootstrap-rgw'\n    key: \"%{hiera('ceph_key_bootstrap_rgw')}\"\n```\n\n```yaml\n---\n### /var/lib/hiera/role/openstack-controller.yaml\n\n# OpenStack controller specific static keys\nceph::keys:\n  /etc/ceph/ceph.client.cinder.keyring:\n    user: 'client.cinder'\n    key: \"%{hiera('ceph_key_client_cinder')}\"\n  /etc/ceph/ceph.client.glance.keyring:\n    user: 'client.glance'\n    key: \"%{hiera('ceph_key_client_glance')}\"\n```\n\n```yaml\n---\n### /var/lib/hiera/role/openstack-compute.yaml\n\n# OpenStack compute specific configuration\nceph::conf:\n  client:\n    rbd cache: 'true'\n    rbd cache size: '268435456'\n    rbd cache max dirty: '201326592'\n    rbd cache dirty target: '134217728'\n    rbd cache max dirty age: '2'\n    rbd cache writethrough until flush: 'true'\n\n# OpenStack compute specific static keys\nceph::keys:\n  /etc/ceph/ceph.client.cinder.keyring:\n    user: 'client.cinder'\n    key: \"%{hiera('ceph_key_client_cinder')}\"\n```\n\n## Limitations\n\n1. Keys are implicitly added on the monitor, ergo all keys need to be defined\n   on the monitor node\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatacentred%2Fpuppet-ceph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatacentred%2Fpuppet-ceph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatacentred%2Fpuppet-ceph/lists"}