Added ceph mon and osd funcionality (#5)
* add TARGET
Try to define what we are goint to achieve.
* ceph monitors
* added new mon and osd funcionalities
* Documentation fixes
* Added testing metadata
* New ceph_osd_disk salt grain for crushmap generation
* Fixed the map.jinja and common module
* Fixed map for OSD role
* Completed the pool enforcement
* Pass context to the crushmap template from mine information
* RadosGW updates
* Fixed Rados gateway
* push origin master
* Service metadata fixes
* Fixed wrong metadata dir
* changed radosgw keyring path, changed watch for radosgw service
* set osd pool parameters
* added opts for osd mount, few minor fixes for states osd and mon
* added grains for crush parent
diff --git a/README.rst b/README.rst
index a8fa04a..c9a12f7 100644
--- a/README.rst
+++ b/README.rst
@@ -1,98 +1,141 @@
-========
-CEPH RBD
-========
-Ceph’s RADOS provides you with extraordinary data storage scalability—thousands of client hosts or KVMs accessing petabytes to exabytes of data. Each one of your applications can use the object, block or file system interfaces to the same RADOS cluster simultaneously, which means your Ceph storage system serves as a flexible foundation for all of your data storage needs.
+============
+Ceph formula
+============
-Install and configure the Ceph MON and ODS services
+Ceph provides extraordinary data storage scalability. Thousands of client
+hosts or KVMs accessing petabytes to exabytes of data. Each one of your
+applications can use the object, block or file system interfaces to the same
+RADOS cluster simultaneously, which means your Ceph storage system serves as a
+flexible foundation for all of your data storage needs.
+Use salt-formula-linux for initial disk partitioning.
Sample pillars
==============
-Ceph OSDs: A Ceph OSD Daemon (Ceph OSD) stores data, handles data replication, recovery, backfilling, rebalancing, and provides some monitoring information to Ceph Monitors by checking other Ceph OSD Daemons for a heartbeat. A Ceph Storage Cluster requires at least two Ceph OSD Daemons to achieve an active + clean state when the cluster makes two copies of your data (Ceph makes 2 copies by default, but you can adjust it).
+Common metadata for all nodes/roles
.. code-block:: yaml
ceph:
- osd:
+ common:
+ version: kraken
config:
global:
- fsid: 00000000-0000-0000-0000-000000000000
- mon initial members: ceph1,ceph2,ceph3
- mon host: 10.103.255.252:6789,10.103.255.253:6789,10.103.255.254:6789
- osd_fs_mkfs_arguments_xfs:
- osd_fs_mount_options_xfs: rw,noatime
- network public: 10.0.0.0/24
- network cluster: 10.0.0.0/24
- osd_fs_type: xfs
- osd:
- osd journal size: 7500
- filestore xattr use omap: true
- mon:
- mon debug dump transactions: false
+ param1: value1
+ param2: value1
+ param3: value1
+ pool_section:
+ param1: value2
+ param2: value2
+ param3: value2
+ fsid: a619c5fc-c4ed-4f22-9ed2-66cf2feca23d
+ members:
+ - name: cmn01
+ host: 10.0.0.1
+ - name: cmn02
+ host: 10.0.0.2
+ - name: cmn03
+ host: 10.0.0.3
keyring:
- cinder:
- key: 00000000000000000000000000000000000000==
- glance:
- key: 00000000000000000000000000000000000000==
+ admin:
+ key: AQBHPYhZv5mYDBAAvisaSzCTQkC5gywGUp/voA==
+ caps:
+ mds: "allow *"
+ mgr: "allow *"
+ mon: "allow *"
+ osd: "allow *"
-Monitors: A Ceph Monitor maintains maps of the cluster state, including the monitor map, the OSD map, the Placement Group (PG) map, and the CRUSH map. Ceph maintains a history (called an “epoch”) of each state change in the Ceph Monitors, Ceph OSD Daemons, and PGs.
+Optional definition for cluster and public networks. Cluster network is used
+for replication. Public network for front-end communication.
.. code-block:: yaml
ceph:
+ common:
+ version: kraken
+ fsid: a619c5fc-c4ed-4f22-9ed2-66cf2feca23d
+ ....
+ public_network: 10.0.0.0/24, 10.1.0.0/24
+ cluster_network: 10.10.0.0/24, 10.11.0.0/24
+
+
+Ceph mon (control) roles
+------------------------
+
+Monitors: A Ceph Monitor maintains maps of the cluster state, including the
+monitor map, the OSD map, the Placement Group (PG) map, and the CRUSH map.
+Ceph maintains a history (called an “epoch”) of each state change in the Ceph
+Monitors, Ceph OSD Daemons, and PGs.
+
+.. code-block:: yaml
+
+ ceph:
+ common:
+ config:
+ mon:
+ key: value
mon:
- config:
- global:
- fsid: 00000000-0000-0000-0000-000000000000
- mon initial members: ceph1,ceph2,ceph3
- mon host: 10.103.255.252:6789,10.103.255.253:6789,10.103.255.254:6789
- osd_fs_mkfs_arguments_xfs:
- osd_fs_mount_options_xfs: rw,noatime
- network public: 10.0.0.0/24
- network cluster: 10.0.0.0/24
- osd_fs_type: xfs
- osd:
- osd journal size: 7500
- filestore xattr use omap: true
- mon:
- mon debug dump transactions: false
+ enabled: true
keyring:
- cinder:
- key: 00000000000000000000000000000000000000==
- glance:
- key: 00000000000000000000000000000000000000==
+ mon:
+ key: AQAnQIhZ6in5KxAAdf467upoRMWFcVg5pbh1yg==
+ caps:
+ mon: "allow *"
+ admin:
+ key: AQBHPYhZv5mYDBAAvisaSzCTQkC5gywGUp/voA==
+ caps:
+ mds: "allow *"
+ mgr: "allow *"
+ mon: "allow *"
+ osd: "allow *"
-Client pillar - usually located at cinder-volume or glance-registry.
+
+Ceph OSD (storage) roles
+------------------------
.. code-block:: yaml
ceph:
- client:
+ common:
config:
- global:
- fsid: 00000000-0000-0000-0000-000000000000
- mon initial members: ceph1,ceph2,ceph3
- mon host: 10.103.255.252:6789,10.103.255.253:6789,10.103.255.254:6789
- osd_fs_mkfs_arguments_xfs:
- osd_fs_mount_options_xfs: rw,noatime
- network public: 10.0.0.0/24
- network cluster: 10.0.0.0/24
- osd_fs_type: xfs
osd:
- osd journal size: 7500
- filestore xattr use omap: true
- mon:
- mon debug dump transactions: false
- keyring:
- cinder:
- key: 00000000000000000000000000000000000000==
- glance:
- key: 00000000000000000000000000000000000000==
+ key: value
+ osd:
+ enabled: true
+ host_id: 10
+ copy_admin_key: true
+ journal_type: raw
+ dmcrypt: disable
+ osd_scenario: raw_journal_devices
+ fs_type: xfs
+ disk:
+ '00':
+ rule: hdd
+ dev: /dev/vdb2
+ journal: /dev/vdb1
+ class: besthdd
+ weight: 1.5
+ '01':
+ rule: hdd
+ dev: /dev/vdc2
+ journal: /dev/vdc1
+ class: besthdd
+ weight: 1.5
+ '02':
+ rule: hdd
+ dev: /dev/vdd2
+ journal: /dev/vdd1
+ class: besthdd
+ weight: 1.5
-Monitoring Ceph cluster - collect cluster metrics
+
+Ceph client roles
+-----------------
+
+Simple ceph client service
.. code-block:: yaml
@@ -105,12 +148,126 @@
keyring:
monitoring:
key: 00000000000000000000000000000000000000==
+
+At OpenStack control settings are usually located at cinder-volume or glance-
+registry services.
+
+.. code-block:: yaml
+
+ ceph:
+ client:
+ config:
+ global:
+ fsid: 00000000-0000-0000-0000-000000000000
+ mon initial members: ceph1,ceph2,ceph3
+ mon host: 10.103.255.252:6789,10.103.255.253:6789,10.103.255.254:6789
+ osd_fs_mkfs_arguments_xfs:
+ osd_fs_mount_options_xfs: rw,noatime
+ network public: 10.0.0.0/24
+ network cluster: 10.0.0.0/24
+ osd_fs_type: xfs
+ osd:
+ osd journal size: 7500
+ filestore xattr use omap: true
+ mon:
+ mon debug dump transactions: false
+ keyring:
+ cinder:
+ key: 00000000000000000000000000000000000000==
+ glance:
+ key: 00000000000000000000000000000000000000==
+
+
+Ceph gateway
+------------
+
+Rados gateway with keystone v2 auth backend
+
+.. code-block:: yaml
+
+ ceph:
+ radosgw:
+ enabled: true
+ hostname: gw.ceph.lab
+ bind:
+ address: 10.10.10.1
+ port: 8080
+ identity:
+ engine: keystone
+ api_version: 2
+ host: 10.10.10.100
+ port: 5000
+ user: admin
+ password: password
+ tenant: admin
+
+Rados gateway with keystone v3 auth backend
+
+.. code-block:: yaml
+
+ ceph:
+ radosgw:
+ enabled: true
+ hostname: gw.ceph.lab
+ bind:
+ address: 10.10.10.1
+ port: 8080
+ identity:
+ engine: keystone
+ api_version: 3
+ host: 10.10.10.100
+ port: 5000
+ user: admin
+ password: password
+ project: admin
+ domain: default
+
+
+Ceph setup role
+---------------
+
+Replicated ceph storage pool
+
+.. code-block:: yaml
+
+ ceph:
+ setup:
+ pool:
+ replicated_pool:
+ pg_num: 256
+ pgp_num: 256
+ type: replicated
+ crush_ruleset_name: 0
+
+Erasure ceph storage pool
+
+.. code-block:: yaml
+
+ ceph:
+ setup:
+ pool:
+ erasure_pool:
+ pg_num: 256
+ pgp_num: 256
+ type: erasure
+ crush_ruleset_name: 0
+ erasure_code_profile:
+
+
+Ceph monitoring
+---------------
+
+Collect general cluster metrics
+
+.. code-block:: yaml
+
+ ceph:
monitoring:
cluster_stats:
enabled: true
ceph_user: monitoring
-Monitoring Ceph services - collect metrics from monitor and OSD services
+Collect metrics from monitor and OSD services
.. code-block:: yaml
@@ -120,14 +277,15 @@
enabled: true
-Read more
-=========
+More information
+================
* https://github.com/cloud-ee/ceph-salt-formula
* http://ceph.com/ceph-storage/
* http://ceph.com/docs/master/start/intro/
-Documentation and Bugs
+
+Documentation and bugs
======================
To learn how to install and update salt-formulas, consult the documentation
diff --git a/TARGET.rst b/TARGET.rst
new file mode 100644
index 0000000..eb5b5ee
--- /dev/null
+++ b/TARGET.rst
@@ -0,0 +1,27 @@
+Proposal
+=========
+
+Ceph salt formula should be able to provide these tasks:
+
+* initial deploy of Ceph cluster
+* remove broken OSD
+* add new OSD
+* add new node with OSDs
+
+
+
+Test procedure
+---------------
+
+. Bootstrap nodes
+. Deploy 3 MON nodes
+. Deploy 3 OSD nodes
+. Deploy 1 MDS
+. Deploy client
+. Run tests:
+
+* Ceph is healty
+* There are 3 MONs and 3 OSD nodes
+
+* Create RBD, map it, mount it, write testing file, get output, unmount, unmap, remove
+* Create CephFS, mount it, write file, unmount it
diff --git a/_modules/ceph_ng.py b/_modules/ceph_ng.py
new file mode 100644
index 0000000..824ae43
--- /dev/null
+++ b/_modules/ceph_ng.py
@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+'''
+Module to provide ceph control with salt.
+:depends: - ceph_cfg Python module
+.. versionadded:: 2017.7.0
+'''
+# Import Python Libs
+from __future__ import absolute_import
+import logging
+
+
+log = logging.getLogger(__name__)
+
+__virtualname__ = 'ceph_ng'
+
+
+def __virtual__():
+ return __virtualname__
diff --git a/ceph/client.sls b/ceph/client.sls
index bd027a6..f2700ba 100644
--- a/ceph/client.sls
+++ b/ceph/client.sls
@@ -2,39 +2,40 @@
{%- if client.enabled %}
{% if not client.container_mode %}
+
ceph_client_packages:
pkg.installed:
- names: {{ client.pkgs }}
+
{%- endif %}
{{ client.prefix_dir }}/etc/ceph:
file.directory:
- - user: root
- - group: root
- - mode: 755
- - makedirs: True
+ - user: root
+ - group: root
+ - mode: 755
+ - makedirs: True
{%- for keyring_name, keyring in client.keyring.iteritems() %}
{{ client.prefix_dir }}/etc/ceph/ceph.client.{{ keyring_name }}.keyring:
file.managed:
- - user: root
- - group: root
- - mode: 644
- - replace: False
- # bug, if file is empty no section is added by options_present
- - contents: |
- [client.{{ keyring_name }}]
- - require:
- - file: {{ client.prefix_dir }}/etc/ceph
-
+ - user: root
+ - group: root
+ - mode: 644
+ - replace: False
+ # bug, if file is empty no section is added by options_present
+ - contents: |
+ [client.{{ keyring_name }}]
+ - require:
+ - file: {{ client.prefix_dir }}/etc/ceph
ini.options_present:
- sections:
client.{{ keyring_name }}: {{ keyring|yaml }}
-{% if not client.container_mode %}
+ {% if not client.container_mode %}
- require:
- pkg: ceph_client_packages
-{%- endif %}
+ {%- endif %}
{%- endfor %}
@@ -44,27 +45,26 @@
client.{{ keyring_name }}:
keyring: /etc/ceph/ceph.client.{{ keyring_name }}.keyring
{%- endload %}
-{%- set _dummy = config.update(config_fragment) %}
+{%- do config.update(config_fragment) %}
{%- endfor %}
{{ client.prefix_dir }}/etc/ceph/ceph.conf:
file.managed:
- - user: root
- - group: root
- - mode: 644
- - replace: False
- # bug, if file is empty no section is added by options_present
- - contents: |
- [global]
- - require:
- - file: {{ client.prefix_dir }}/etc/ceph
-
+ - user: root
+ - group: root
+ - mode: 644
+ - replace: False
+ # bug, if file is empty no section is added by options_present
+ - contents: |
+ [global]
+ - require:
+ - file: {{ client.prefix_dir }}/etc/ceph
ini.options_present:
- sections: {{ config|yaml }}
- require:
-{% if not client.container_mode %}
+ {% if not client.container_mode %}
- pkg: ceph_client_packages
-{%- endif %}
+ {%- endif %}
- file: {{ client.prefix_dir }}/etc/ceph
-{%- endif %}
+{%- endif %}
\ No newline at end of file
diff --git a/ceph/common.sls b/ceph/common.sls
new file mode 100644
index 0000000..872a047
--- /dev/null
+++ b/ceph/common.sls
@@ -0,0 +1,42 @@
+{%- from "ceph/map.jinja" import common with context %}
+
+base_packages:
+ pkg.installed:
+ - names: {{ common.pkgs }}
+
+{% for keyring_name, keyring in common.get('keyring', {}).iteritems() %}
+
+/etc/ceph/ceph.client.{{ keyring_name }}.keyring:
+ file.managed:
+ - source: salt://ceph/files/keyring
+ - template: jinja
+ - defaults:
+ name: {{ keyring_name }}
+ keyring: {{ keyring }}
+
+{% endfor %}
+
+#{%- if not salt['user.info']('ceph') %}
+#
+#ceph_user:
+# user.present:
+# - name: ceph
+# - home: /var/lib/ceph
+# - uid: 304
+# - gid: 304
+# - shell: /bin/false
+# - system: True
+# - require_in:
+# {%- if pillar.ceph.get('osd', {}).get('enabled', False) %}
+# - pkg: ceph_osd_packages
+# {%- endif %}
+#
+#ceph_group:
+# group.present:
+# - name: ceph
+# - gid: 304
+# - system: True
+# - require_in:
+# - user: ceph_user
+#
+#{%- endif %}
diff --git a/ceph/files/crushmap b/ceph/files/crushmap
new file mode 100644
index 0000000..c89d5e3
--- /dev/null
+++ b/ceph/files/crushmap
@@ -0,0 +1,1232 @@
+
+
+
+
+
+
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <link rel="dns-prefetch" href="https://assets-cdn.github.com">
+ <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
+ <link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
+ <link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
+ <link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
+ <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
+ <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
+
+
+
+ <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/frameworks-77c3b874f32e71b14cded5a120f42f5c7288fa52e0a37f2d5919fbd8bcfca63c.css" media="all" rel="stylesheet" />
+ <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/github-68923e58eaacf64b4af271e01e5c657997f95533fd4a7e5be4b2ed7e23158a03.css" media="all" rel="stylesheet" />
+
+
+ <link crossorigin="anonymous" href="https://assets-cdn.github.com/assets/site-65aadd1762fe5f6e44708ac1c774a84be59a802f7109155de047e4f3c9f1202a.css" media="all" rel="stylesheet" />
+
+
+ <meta name="viewport" content="width=device-width">
+
+ <title>salt-formula-ceph/ceph/files/crushmap at crush · LotharKAtt/salt-formula-ceph · GitHub</title>
+ <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">
+ <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
+ <meta property="fb:app_id" content="1401488693436528">
+
+
+ <meta content="https://avatars2.githubusercontent.com/u/9153021?v=4&s=400" property="og:image" /><meta content="GitHub" property="og:site_name" /><meta content="object" property="og:type" /><meta content="LotharKAtt/salt-formula-ceph" property="og:title" /><meta content="https://github.com/LotharKAtt/salt-formula-ceph" property="og:url" /><meta content="Contribute to salt-formula-ceph development by creating an account on GitHub." property="og:description" />
+
+ <link rel="assets" href="https://assets-cdn.github.com/">
+
+ <meta name="pjax-timeout" content="1000">
+
+ <meta name="request-id" content="BBD6:29CE:396E9D5:5CE3D85:59944B4A" data-pjax-transient>
+
+
+ <meta name="selected-link" value="repo_source" data-pjax-transient>
+
+ <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
+<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
+ <meta name="google-analytics" content="UA-3769691-2">
+
+<meta content="collector.githubapp.com" name="octolytics-host" /><meta content="github" name="octolytics-app-id" /><meta content="https://collector.githubapp.com/github-external/browser_event" name="octolytics-event-url" /><meta content="BBD6:29CE:396E9D5:5CE3D85:59944B4A" name="octolytics-dimension-request_id" /><meta content="iad" name="octolytics-dimension-region_edge" /><meta content="iad" name="octolytics-dimension-region_render" />
+<meta content="/<user-name>/<repo-name>/blob/blame" data-pjax-transient="true" name="analytics-location" />
+
+
+
+
+ <meta class="js-ga-set" name="dimension1" content="Logged Out">
+
+
+
+
+ <meta name="hostname" content="github.com">
+ <meta name="user-login" content="">
+
+ <meta name="expected-hostname" content="github.com">
+ <meta name="js-proxy-site-detection-payload" content="YjUwYTQ0MTA1YmQ3MTVjMjJkN2U2MDQ4OWU1YzYzNzNjMjc5ZGJjNDk0YTY5ZDJiYzg4MWY4MzBlZDAwMzQzYXx7InJlbW90ZV9hZGRyZXNzIjoiMTc2Ljc0LjIxOC4xMDYiLCJyZXF1ZXN0X2lkIjoiQkJENjoyOUNFOjM5NkU5RDU6NUNFM0Q4NTo1OTk0NEI0QSIsInRpbWVzdGFtcCI6MTUwMjg5MDgyNiwiaG9zdCI6ImdpdGh1Yi5jb20ifQ==">
+
+
+ <meta name="html-safe-nonce" content="2dcb8c4d974d3056f4d6dea5dca711fea124a59e">
+
+ <meta http-equiv="x-pjax-version" content="fce7f68c60f33171e8b95251e3a9a015">
+
+
+ <link href="https://github.com/LotharKAtt/salt-formula-ceph/commits/crush.atom" rel="alternate" title="Recent Commits to salt-formula-ceph:crush" type="application/atom+xml">
+
+ <meta name="description" content="Contribute to salt-formula-ceph development by creating an account on GitHub.">
+ <meta name="go-import" content="github.com/LotharKAtt/salt-formula-ceph git https://github.com/LotharKAtt/salt-formula-ceph.git">
+
+ <meta content="9153021" name="octolytics-dimension-user_id" /><meta content="LotharKAtt" name="octolytics-dimension-user_login" /><meta content="94552459" name="octolytics-dimension-repository_id" /><meta content="LotharKAtt/salt-formula-ceph" name="octolytics-dimension-repository_nwo" /><meta content="true" name="octolytics-dimension-repository_public" /><meta content="true" name="octolytics-dimension-repository_is_fork" /><meta content="48380280" name="octolytics-dimension-repository_parent_id" /><meta content="salt-formulas/salt-formula-ceph" name="octolytics-dimension-repository_parent_nwo" /><meta content="48380280" name="octolytics-dimension-repository_network_root_id" /><meta content="salt-formulas/salt-formula-ceph" name="octolytics-dimension-repository_network_root_nwo" /><meta content="false" name="octolytics-dimension-repository_explore_github_marketplace_ci_cta_shown" />
+
+
+
+
+ <meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
+
+ <meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
+
+ <link rel="mask-icon" href="https://assets-cdn.github.com/pinned-octocat.svg" color="#000000">
+ <link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
+
+<meta name="theme-color" content="#1e2327">
+
+
+
+ </head>
+
+ <body class="logged-out env-production full-width">
+
+
+ <div class="position-relative js-header-wrapper ">
+ <a href="#start-of-content" tabindex="1" class="px-2 py-4 show-on-focus js-skip-to-content">Skip to content</a>
+ <div id="js-pjax-loader-bar" class="pjax-loader-bar"><div class="progress"></div></div>
+
+
+
+
+
+
+
+ <div class="header header-logged-out position-relative f4 py-3" role="banner">
+ <div class="container-lg px-3 clearfix">
+ <div class="d-flex flex-justify-between">
+ <div class="d-flex">
+ <a class="header-logo-invertocat my-0" href="https://github.com/" aria-label="Homepage" data-ga-click="(Logged out) Header, go to homepage, icon:logo-wordmark">
+ <svg aria-hidden="true" class="octicon octicon-mark-github" height="32" version="1.1" viewBox="0 0 16 16" width="32"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
+ </a>
+
+ <div class="header-sitemenu clearfix">
+ <nav>
+ <ul class="d-flex list-style-none">
+ <li class="ml-2">
+ <a href="/features" class="js-selected-navigation-item header-navlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:features" data-selected-links="/features /features">
+ Features
+</a> </li>
+ <li class="ml-4">
+ <a href="/business" class="js-selected-navigation-item header-navlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:business" data-selected-links="/business /business/security /business/customers /business">
+ Business
+</a> </li>
+
+ <li class="ml-4">
+ <a href="/explore" class="js-selected-navigation-item header-navlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:explore" data-selected-links="/explore /trending /trending/developers /integrations /integrations/feature/code /integrations/feature/collaborate /integrations/feature/ship /showcases /explore">
+ Explore
+</a> </li>
+
+ <li class="ml-4">
+ <a href="/marketplace" class="js-selected-navigation-item header-navlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:marketplace" data-selected-links=" /marketplace">
+ Marketplace
+</a> </li>
+ <li class="ml-4">
+ <a href="/pricing" class="js-selected-navigation-item header-navlink px-0 py-2 m-0" data-ga-click="Header, click, Nav menu - item:pricing" data-selected-links="/pricing /pricing/developer /pricing/team /pricing/business-hosted /pricing/business-enterprise /pricing">
+ Pricing
+</a> </li>
+ </ul>
+ </nav>
+ </div>
+ </div>
+
+ <div class="d-flex">
+ <div class="mt-1 mr-3">
+ <div class="header-search scoped-search site-scoped-search js-site-search" role="search">
+ <!-- '"` --><!-- </textarea></xmp> --></option></form><form accept-charset="UTF-8" action="/LotharKAtt/salt-formula-ceph/search" class="js-site-search-form" data-scoped-search-url="/LotharKAtt/salt-formula-ceph/search" data-unscoped-search-url="/search" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /></div>
+ <label class="form-control header-search-wrapper js-chromeless-input-container">
+ <a href="/LotharKAtt/salt-formula-ceph/blame/crush/ceph/files/crushmap" class="header-search-scope no-underline">This repository</a>
+ <input type="text"
+ class="form-control header-search-input js-site-search-focus js-site-search-field is-clearable"
+ data-hotkey="s"
+ name="q"
+ value=""
+ placeholder="Search"
+ aria-label="Search this repository"
+ data-unscoped-placeholder="Search GitHub"
+ data-scoped-placeholder="Search"
+ autocapitalize="off">
+ <input type="hidden" class="js-site-search-type-field" name="type" >
+ </label>
+</form></div>
+
+ </div>
+
+ <span class="d-inline-block">
+ <div class="header-navlink px-0 py-2 m-0">
+ <a class="text-bold text-white no-underline" href="/login?return_to=%2FLotharKAtt%2Fsalt-formula-ceph%2Fblame%2Fcrush%2Fceph%2Ffiles%2Fcrushmap" data-ga-click="(Logged out) Header, clicked Sign in, text:sign-in">Sign in</a>
+ <span class="text-gray">or</span>
+ <a class="text-bold text-white no-underline" href="/join?source=header-repo" data-ga-click="(Logged out) Header, clicked Sign up, text:sign-up">Sign up</a>
+ </div>
+ </span>
+ </div>
+ </div>
+ </div>
+</div>
+
+
+ </div>
+
+ <div id="start-of-content" class="show-on-focus"></div>
+
+ <div id="js-flash-container">
+</div>
+
+
+
+ <div role="main">
+ <div itemscope itemtype="http://schema.org/SoftwareSourceCode">
+ <div id="js-repo-pjax-container" data-pjax-container>
+
+
+
+
+
+ <div class="pagehead repohead instapaper_ignore readability-menu experiment-repo-nav">
+ <div class="container repohead-details-container">
+
+ <ul class="pagehead-actions">
+ <li>
+ <a href="/login?return_to=%2FLotharKAtt%2Fsalt-formula-ceph"
+ class="btn btn-sm btn-with-count tooltipped tooltipped-n"
+ aria-label="You must be signed in to watch a repository" rel="nofollow">
+ <svg aria-hidden="true" class="octicon octicon-eye" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.06 2C3 2 0 8 0 8s3 6 8.06 6C13 14 16 8 16 8s-3-6-7.94-6zM8 12c-2.2 0-4-1.78-4-4 0-2.2 1.8-4 4-4 2.22 0 4 1.8 4 4 0 2.22-1.78 4-4 4zm2-4c0 1.11-.89 2-2 2-1.11 0-2-.89-2-2 0-1.11.89-2 2-2 1.11 0 2 .89 2 2z"/></svg>
+ Watch
+ </a>
+ <a class="social-count" href="/LotharKAtt/salt-formula-ceph/watchers"
+ aria-label="5 users are watching this repository">
+ 5
+ </a>
+
+ </li>
+
+ <li>
+ <a href="/login?return_to=%2FLotharKAtt%2Fsalt-formula-ceph"
+ class="btn btn-sm btn-with-count tooltipped tooltipped-n"
+ aria-label="You must be signed in to star a repository" rel="nofollow">
+ <svg aria-hidden="true" class="octicon octicon-star" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74z"/></svg>
+ Star
+ </a>
+
+ <a class="social-count js-social-count" href="/LotharKAtt/salt-formula-ceph/stargazers"
+ aria-label="1 user starred this repository">
+ 1
+ </a>
+
+ </li>
+
+ <li>
+ <a href="/login?return_to=%2FLotharKAtt%2Fsalt-formula-ceph"
+ class="btn btn-sm btn-with-count tooltipped tooltipped-n"
+ aria-label="You must be signed in to fork a repository" rel="nofollow">
+ <svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
+ Fork
+ </a>
+
+ <a href="/LotharKAtt/salt-formula-ceph/network" class="social-count"
+ aria-label="8 users forked this repository">
+ 8
+ </a>
+ </li>
+</ul>
+
+ <h1 class="public ">
+ <svg aria-hidden="true" class="octicon octicon-repo-forked" height="16" version="1.1" viewBox="0 0 10 16" width="10"><path fill-rule="evenodd" d="M8 1a1.993 1.993 0 0 0-1 3.72V6L5 8 3 6V4.72A1.993 1.993 0 0 0 2 1a1.993 1.993 0 0 0-1 3.72V6.5l3 3v1.78A1.993 1.993 0 0 0 5 15a1.993 1.993 0 0 0 1-3.72V9.5l3-3V4.72A1.993 1.993 0 0 0 8 1zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3 10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zm3-10c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
+ <span class="author" itemprop="author"><a href="/LotharKAtt" class="url fn" rel="author">LotharKAtt</a></span><!--
+--><span class="path-divider">/</span><!--
+--><strong itemprop="name"><a href="/LotharKAtt/salt-formula-ceph" data-pjax="#js-repo-pjax-container">salt-formula-ceph</a></strong>
+
+ <span class="fork-flag">
+ <span class="text">forked from <a href="/salt-formulas/salt-formula-ceph">salt-formulas/salt-formula-ceph</a></span>
+ </span>
+</h1>
+
+ </div>
+ <div class="container">
+
+<nav class="reponav js-repo-nav js-sidenav-container-pjax"
+ itemscope
+ itemtype="http://schema.org/BreadcrumbList"
+ role="navigation"
+ data-pjax="#js-repo-pjax-container">
+
+ <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
+ <a href="/LotharKAtt/salt-formula-ceph/tree/crush" class="js-selected-navigation-item selected reponav-item" data-hotkey="g c" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches /LotharKAtt/salt-formula-ceph/tree/crush" itemprop="url">
+ <svg aria-hidden="true" class="octicon octicon-code" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M9.5 3L8 4.5 11.5 8 8 11.5 9.5 13 14 8 9.5 3zm-5 0L0 8l4.5 5L6 11.5 2.5 8 6 4.5 4.5 3z"/></svg>
+ <span itemprop="name">Code</span>
+ <meta itemprop="position" content="1">
+</a> </span>
+
+
+ <span itemscope itemtype="http://schema.org/ListItem" itemprop="itemListElement">
+ <a href="/LotharKAtt/salt-formula-ceph/pulls" class="js-selected-navigation-item reponav-item" data-hotkey="g p" data-selected-links="repo_pulls /LotharKAtt/salt-formula-ceph/pulls" itemprop="url">
+ <svg aria-hidden="true" class="octicon octicon-git-pull-request" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M11 11.28V5c-.03-.78-.34-1.47-.94-2.06C9.46 2.35 8.78 2.03 8 2H7V0L4 3l3 3V4h1c.27.02.48.11.69.31.21.2.3.42.31.69v6.28A1.993 1.993 0 0 0 10 15a1.993 1.993 0 0 0 1-3.72zm-1 2.92c-.66 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2zM4 3c0-1.11-.89-2-2-2a1.993 1.993 0 0 0-1 3.72v6.56A1.993 1.993 0 0 0 2 15a1.993 1.993 0 0 0 1-3.72V4.72c.59-.34 1-.98 1-1.72zm-.8 10c0 .66-.55 1.2-1.2 1.2-.65 0-1.2-.55-1.2-1.2 0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2zM2 4.2C1.34 4.2.8 3.65.8 3c0-.65.55-1.2 1.2-1.2.65 0 1.2.55 1.2 1.2 0 .65-.55 1.2-1.2 1.2z"/></svg>
+ <span itemprop="name">Pull requests</span>
+ <span class="Counter">1</span>
+ <meta itemprop="position" content="3">
+</a> </span>
+
+ <a href="/LotharKAtt/salt-formula-ceph/projects" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /LotharKAtt/salt-formula-ceph/projects">
+ <svg aria-hidden="true" class="octicon octicon-project" height="16" version="1.1" viewBox="0 0 15 16" width="15"><path fill-rule="evenodd" d="M10 12h3V2h-3v10zm-4-2h3V2H6v8zm-4 4h3V2H2v12zm-1 1h13V1H1v14zM14 0H1a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h13a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1z"/></svg>
+ Projects
+ <span class="Counter" >0</span>
+</a>
+
+
+ <div class="reponav-dropdown js-menu-container">
+ <button type="button" class="btn-link reponav-item reponav-dropdown js-menu-target " data-no-toggle aria-expanded="false" aria-haspopup="true">
+ Insights
+ <svg aria-hidden="true" class="octicon octicon-triangle-down v-align-middle text-gray" height="11" version="1.1" viewBox="0 0 12 16" width="8"><path fill-rule="evenodd" d="M0 5l6 6 6-6z"/></svg>
+ </button>
+ <div class="dropdown-menu-content js-menu-content">
+ <div class="dropdown-menu dropdown-menu-sw">
+ <a class="dropdown-item" href="/LotharKAtt/salt-formula-ceph/pulse" data-skip-pjax>
+ <svg aria-hidden="true" class="octicon octicon-pulse" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M11.5 8L8.8 5.4 6.6 8.5 5.5 1.6 2.38 8H0v2h3.6l.9-1.8.9 5.4L9 8.5l1.6 1.5H14V8z"/></svg>
+ Pulse
+ </a>
+ <a class="dropdown-item" href="/LotharKAtt/salt-formula-ceph/graphs" data-skip-pjax>
+ <svg aria-hidden="true" class="octicon octicon-graph" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M16 14v1H0V0h1v14h15zM5 13H3V8h2v5zm4 0H7V3h2v10zm4 0h-2V6h2v7z"/></svg>
+ Graphs
+ </a>
+ </div>
+ </div>
+ </div>
+</nav>
+
+ </div>
+ </div>
+
+<div class="container new-discussion-timeline experiment-repo-nav">
+ <div class="repository-content">
+
+
+
+ <div class="wants-full-width-container"></div>
+
+ <a href="/LotharKAtt/salt-formula-ceph/blame/0bd4f260193548ee03d0cc11cd79fb2349f47eb8/ceph/files/crushmap" class="d-none js-permalink-shortcut" data-hotkey="y">Permalink</a>
+
+ <div class="breadcrumb css-truncate blame-breadcrumb js-zeroclipboard-container">
+ <span class="css-truncate-target js-zeroclipboard-target"><span class="repo-root js-repo-root"><span class="js-path-segment"><a href="/LotharKAtt/salt-formula-ceph/tree/crush"><span>salt-formula-ceph</span></a></span></span><span class="separator">/</span><span class="js-path-segment"><a href="/LotharKAtt/salt-formula-ceph/tree/crush/ceph"><span>ceph</span></a></span><span class="separator">/</span><span class="js-path-segment"><a href="/LotharKAtt/salt-formula-ceph/tree/crush/ceph/files"><span>files</span></a></span><span class="separator">/</span><strong class="final-path">crushmap</strong></span>
+ <button aria-label="Copy file path to clipboard" class="js-zeroclipboard btn btn-sm zeroclipboard-button tooltipped tooltipped-s" data-copied-hint="Copied!" type="button"><svg aria-hidden="true" class="octicon octicon-clippy" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"/></svg></button>
+ </div>
+
+ <div class="line-age-legend">
+ <span>Newer</span>
+ <ol>
+ <li class="heat" data-heat="1"></li>
+ <li class="heat" data-heat="2"></li>
+ <li class="heat" data-heat="3"></li>
+ <li class="heat" data-heat="4"></li>
+ <li class="heat" data-heat="5"></li>
+ <li class="heat" data-heat="6"></li>
+ <li class="heat" data-heat="7"></li>
+ <li class="heat" data-heat="8"></li>
+ <li class="heat" data-heat="9"></li>
+ <li class="heat" data-heat="10"></li>
+ </ol>
+ <span>Older</span>
+ </div>
+
+ <div class="file">
+ <div class="file-header">
+ <div class="file-actions">
+ <div class="BtnGroup">
+ <a href="/LotharKAtt/salt-formula-ceph/raw/crush/ceph/files/crushmap" class="btn btn-sm BtnGroup-item" id="raw-url">Raw</a>
+ <a href="/LotharKAtt/salt-formula-ceph/blob/crush/ceph/files/crushmap" class="btn btn-sm js-update-url-with-hash BtnGroup-item">Normal view</a>
+ <a href="/LotharKAtt/salt-formula-ceph/commits/crush/ceph/files/crushmap" class="btn btn-sm BtnGroup-item" rel="nofollow">History</a>
+ </div>
+ </div>
+
+
+
+ <div class="file-info">
+ <svg aria-hidden="true" class="octicon octicon-file-text" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path d="M6 5H2V4h4v1zM2 8h7V7H2v1zm0 2h7V9H2v1zm0 2h7v-1H2v1zm10-7.5V14c0 .55-.45 1-1 1H1c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1h7.5L12 4.5zM11 5L8 2H1v12h10V5z"/></svg>
+ <span class="file-mode" title="File Mode">100644</span>
+ <span class="file-info-divider"></span>
+ 148 lines (132 sloc)
+ <span class="file-info-divider"></span>
+ 3.3 KB
+ </div>
+ </div>
+
+ <div class="blob-wrapper">
+ <table class="blame-container highlight data js-file-line-container tab-size" data-tab-size="8">
+ <tbody class="blame-hunk">
+ <tr class="blame-commit">
+ <td class="blame-commit-info" rowspan="38">
+ <span class="blame-commit-date text-gray-light"><time-ago datetime="2017-08-15T07:33:59Z">Aug 15, 2017</time-ago></span>
+ <a href="/smolaon" aria-label="smolaon" class="tooltipped tooltipped-e">
+ <img alt="@smolaon" class="avatar blame-commit-avatar" height="16" src="https://avatars3.githubusercontent.com/u/17276637?v=4&s=32" width="16" />
+</a> <span class="blame-commit-title">
+ <a href="/LotharKAtt/salt-formula-ceph/commit/3621e22b7b7d7fea2175194a5f05c8d25cd5a91c" class="message" data-pjax="true" title="added new mon and osd funcionalities">added new mon and osd funcionalities</a>
+ </span>
+ </td>
+ <td class="blob-reblame" rowspan="38">
+ </td>
+ </tr>
+
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L1">1</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC1">{%- from "ceph/map.jinja" import common, osd with context -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L2">2</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC2"># begin crush map</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L3">3</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC3"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L4">4</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC4">{%- set _crush = common.get('crush', {}) -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L5">5</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC5">{%- set _buckets = [] -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L6">6</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC6"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L7">7</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC7"># tunables</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L8">8</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC8">{%- for k, v in _crush.get('tunables', {}).iteritems() %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L9">9</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC9">tunable {{ k }}: {{ v }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L10">10</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC10">{%- endfor %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L11">11</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC11"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L12">12</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC12"># types</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L13">13</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC13">{%- for i in _crush.type %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L14">14</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC14">type {{ loop.index }} {{ i }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L15">15</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC15">{%- endfor %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L16">16</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC16"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L17">17</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC17"># device</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L18">18</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC18">{%- for disk_id, disk in osd.disk.iteritems() %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L19">19</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC19">device {{ disk_id }} osd.{{ disk_id }}{%- if disk.get('class') %} class {{ disk.class }}{% endif %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L20">20</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC20">{%- if disk.host not in _buckets %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L21">21</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC21">{%- do _buckets.append(disk.host) %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L22">22</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC22">{%- endif %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L23">23</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC23">{%- endfor %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L24">24</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC24"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L25">25</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC25"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L26">26</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC26"># buckets for types</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L27">27</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC27">{%- for i in _crush.type %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L28">28</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC28">{% set _typeid = loop.index %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L29">29</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC29"># buckets for type {{ i }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L30">30</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC30">{%- for resource in _crush.get(i, {}) %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L31">31</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC31">{{ i }} {{ resource.name }} {</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L32">32</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC32"> id -{{ loop.index }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L33">33</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC33"> alg {{ resource.get('alg', 'straw2') }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L34">34</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC34"> hash {{ resource.get('hash', 0) }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L35">35</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC35"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L36">36</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC36"> # list children resources</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L37">37</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC37"> {%- for r in _crush.get(_crush.type[_typeid], []) %}</td>
+ </tr>
+ </tbody>
+ <tbody class="blame-hunk">
+ <tr class="blame-commit">
+ <td class="blame-commit-info" rowspan="2">
+ <span class="blame-commit-date text-gray-light"><time-ago datetime="2017-08-16T13:37:06Z">Aug 16, 2017</time-ago></span>
+ <a href="/tomkukral" aria-label="tomkukral" class="tooltipped tooltipped-e">
+ <img alt="@tomkukral" class="avatar blame-commit-avatar" height="16" src="https://avatars0.githubusercontent.com/u/6077499?v=4&s=32" width="16" />
+</a> <span class="blame-commit-title">
+ <a href="/LotharKAtt/salt-formula-ceph/commit/0bd4f260193548ee03d0cc11cd79fb2349f47eb8" class="message" data-pjax="true" title="fix whitespace">fix whitespace</a>
+ </span>
+ </td>
+ <td class="blob-reblame" rowspan="2">
+ <a href="/LotharKAtt/salt-formula-ceph/blame/12edf300bcdf97a49585fe3f02483f4ce35252d9/ceph/files/crushmap"
+ aria-label="View blame prior to this change" class="reblame-link tooltipped tooltipped-w">
+ <svg aria-hidden="true" class="octicon octicon-versions" height="16" version="1.1" viewBox="0 0 14 16" width="14"><path fill-rule="evenodd" d="M13 3H7c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zm-1 8H8V5h4v6zM4 4h1v1H4v6h1v1H4c-.55 0-1-.45-1-1V5c0-.55.45-1 1-1zM1 5h1v1H1v4h1v1H1c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1z"/></svg>
+ </a>
+ </td>
+ </tr>
+
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L38">38</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC38"> {%- if r.parent == resource.name %}</td>
+ </tr>
+ </tbody>
+ <tbody class="blame-hunk">
+ <tr class="blame-commit">
+ <td class="blame-commit-info" rowspan="110">
+ <span class="blame-commit-date text-gray-light"><time-ago datetime="2017-08-15T07:33:59Z">Aug 15, 2017</time-ago></span>
+ <a href="/smolaon" aria-label="smolaon" class="tooltipped tooltipped-e">
+ <img alt="@smolaon" class="avatar blame-commit-avatar" height="16" src="https://avatars3.githubusercontent.com/u/17276637?v=4&s=32" width="16" />
+</a> <span class="blame-commit-title">
+ <a href="/LotharKAtt/salt-formula-ceph/commit/3621e22b7b7d7fea2175194a5f05c8d25cd5a91c" class="message" data-pjax="true" title="added new mon and osd funcionalities">added new mon and osd funcionalities</a>
+ </span>
+ </td>
+ <td class="blob-reblame" rowspan="110">
+ </td>
+ </tr>
+
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L39">39</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC39"> item {{ r.name }} weight 999</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L40">40</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC40"> {%- endif %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L41">41</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC41"> {%- endfor %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L42">42</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC42">}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L43">43</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC43"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L44">44</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC44">{%- endfor %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L45">45</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC45">{%- endfor %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L46">46</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC46"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L47">47</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC47"># host buckets</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L48">48</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC48">{%- for bucket in _buckets %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L49">49</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC49">host {{ bucket }} {</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L50">50</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC50"> id -{{ loop.index }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L51">51</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC51"> alg straw2</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L52">52</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC52"> hash 0</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L53">53</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC53"> {%- for disk_id, disk in osd.disk.iteritems() %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L54">54</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC54"> {%- if disk.host == bucket %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L55">55</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC55"> item osd.{{ disk_id }} weight 1.817666666666666666666666666</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L56">56</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC56"> {%- endif %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L57">57</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC57"> {%- endfor %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L58">58</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC58"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L59">59</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC59">}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L60">60</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC60">{%- endfor %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L61">61</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC61"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L62">62</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC62"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L63">63</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC63">{#</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L64">64</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC64"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L65">65</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC65"> item osd.{{ osd }} weight 1.817</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L66">66</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC66"> {% endfor -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L67">67</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC67">}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L68">68</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC68">{%- endif -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L69">69</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC69">{% endfor -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L70">70</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC70">{% for failure_domain, nodes in failure_domains.iteritems() %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L71">71</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC71">failure_domain {{ failure_domain }} {</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L72">72</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC72"> alg straw2</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L73">73</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC73"> hash 0</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L74">74</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC74"> {% for osd in failure_domains[failure_domain]['osds'] -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L75">75</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC75"> {% if 'ssd' in failure_domain -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L76">76</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC76"> item {{ osd }}-ssd weight {{ 1.817 * ssd_osds[osd] | count }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L77">77</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC77"> {% else -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L78">78</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC78"> item {{ osd }} weight {{ 1.817 * osds[osd] | count }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L79">79</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC79"> {% endif -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L80">80</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC80"> {% endfor -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L81">81</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC81">}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L82">82</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC82">{% endfor %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L83">83</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC83">root crushroot.performanceblock.satassd.1 {</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L84">84</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC84"> {% if id.append(id.pop() + 1) %}{% endif %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L85">85</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC85"> id -{{ id[0] }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L86">86</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC86"> alg straw</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L87">87</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC87"> hash 0</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L88">88</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC88"> {% for domain, nodes in failure_domains.iteritems() -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L89">89</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC89"> {% if 'ssd' in domain -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L90">90</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC90"> item {{ domain }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L91">91</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC91"> {% endif -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L92">92</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC92"> {% endfor -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L93">93</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC93">}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L94">94</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC94">root crushroot.performanceblock.satahdd.1 {</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L95">95</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC95"> {% if id.append(id.pop() + 1) %}{% endif %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L96">96</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC96"> id -{{ id[0] }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L97">97</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC97"> alg straw</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L98">98</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC98"> hash 0</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L99">99</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC99"> {% for domain, nodes in failure_domains.iteritems() -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L100">100</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC100"> {% if 'sata' in domain and 'sata2' not in domain -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L101">101</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC101"> item {{ domain }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L102">102</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC102"> {% endif -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L103">103</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC103"> {% endfor -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L104">104</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC104">}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L105">105</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC105">root crushroot.object.satahdd.2 {</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L106">106</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC106"> {% if id.append(id.pop() + 1) %}{% endif %}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L107">107</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC107"> id -{{ id[0] }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L108">108</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC108"> alg straw</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L109">109</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC109"> hash 0</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L110">110</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC110"> {% for domain, nodes in failure_domains.iteritems() -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L111">111</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC111"> {% if 'sata2' in domain -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L112">112</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC112"> item {{ domain }}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L113">113</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC113"> {% endif -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L114">114</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC114"> {% endfor -%}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L115">115</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC115">}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L116">116</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC116"># rules</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L117">117</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC117">rule sata {</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L118">118</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC118"> ruleset 0</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L119">119</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC119"> type replicated</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L120">120</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC120"> min_size 1</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L121">121</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC121"> max_size 10</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L122">122</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC122"> step take crushroot.performanceblock.satahdd.1</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L123">123</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC123"> step chooseleaf firstn 0 type failure_domain</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L124">124</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC124"> step emit</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L125">125</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC125">}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L126">126</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC126">rule sata2 {</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L127">127</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC127"> ruleset 1</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L128">128</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC128"> type replicated</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L129">129</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC129"> min_size 1</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L130">130</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC130"> max_size 10</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L131">131</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC131"> step take crushroot.object.satahdd.2</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L132">132</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC132"> step chooseleaf firstn 0 type failure_domain</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L133">133</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC133"> step emit</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L134">134</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC134">}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L135">135</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC135">rule ssd {</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L136">136</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC136"> ruleset 2</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L137">137</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC137"> type replicated</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L138">138</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC138"> min_size 1</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L139">139</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC139"> max_size 10</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L140">140</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC140"> step take crushroot.performanceblock.satassd.1</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L141">141</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC141"> step chooseleaf firstn 0 type failure_domain</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L142">142</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC142"> step emit</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L143">143</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC143">}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L144">144</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC144"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L145">145</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC145"></td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L146">146</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC146">#}</td>
+ </tr>
+ <tr class="blame-line">
+ <td class="line-age heat" data-heat="1"></td>
+ <td class="blob-num blame-blob-num js-line-number" id="L147">147</td>
+ <td class="blob-code blob-code-inner js-file-line" id="LC147"># end crush map</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ </div>
+
+
+ </div>
+ <div class="modal-backdrop js-touch-events"></div>
+</div>
+
+ </div>
+ </div>
+
+ </div>
+
+
+<div class="container-lg site-footer-container">
+ <div class="site-footer " role="contentinfo">
+ <ul class="site-footer-links float-right">
+ <li><a href="https://github.com/contact" data-ga-click="Footer, go to contact, text:contact">Contact GitHub</a></li>
+ <li><a href="https://developer.github.com" data-ga-click="Footer, go to api, text:api">API</a></li>
+ <li><a href="https://training.github.com" data-ga-click="Footer, go to training, text:training">Training</a></li>
+ <li><a href="https://shop.github.com" data-ga-click="Footer, go to shop, text:shop">Shop</a></li>
+ <li><a href="https://github.com/blog" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
+ <li><a href="https://github.com/about" data-ga-click="Footer, go to about, text:about">About</a></li>
+
+ </ul>
+
+ <a href="https://github.com" aria-label="Homepage" class="site-footer-mark" title="GitHub">
+ <svg aria-hidden="true" class="octicon octicon-mark-github" height="24" version="1.1" viewBox="0 0 16 16" width="24"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
+</a>
+ <ul class="site-footer-links">
+ <li>© 2017 <span title="0.13262s from unicorn-4245809993-639bk">GitHub</span>, Inc.</li>
+ <li><a href="https://github.com/site/terms" data-ga-click="Footer, go to terms, text:terms">Terms</a></li>
+ <li><a href="https://github.com/site/privacy" data-ga-click="Footer, go to privacy, text:privacy">Privacy</a></li>
+ <li><a href="https://github.com/security" data-ga-click="Footer, go to security, text:security">Security</a></li>
+ <li><a href="https://status.github.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
+ <li><a href="https://help.github.com" data-ga-click="Footer, go to help, text:help">Help</a></li>
+ </ul>
+ </div>
+</div>
+
+
+
+ <div id="ajax-error-message" class="ajax-error-message flash flash-error">
+ <svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
+ <button type="button" class="flash-close js-flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
+ <svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
+ </button>
+ You can't perform that action at this time.
+ </div>
+
+
+ <script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/compat-91f98c37fc84eac24836eec2567e9912742094369a04c4eba6e3cd1fa18902d9.js"></script>
+ <script crossorigin="anonymous" src="https://assets-cdn.github.com/assets/frameworks-3c52aa5c47be764905dd0729b16d07f243da59bad25dec8c886d4613398a0473.js"></script>
+
+ <script async="async" crossorigin="anonymous" src="https://assets-cdn.github.com/assets/github-d71a98f4626bb020831979c8d8a2763893ada0ff746ae220e9254bc906a1beac.js"></script>
+
+
+
+
+ <div class="js-stale-session-flash stale-session-flash flash flash-warn flash-banner d-none">
+ <svg aria-hidden="true" class="octicon octicon-alert" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/></svg>
+ <span class="signed-in-tab-flash">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
+ <span class="signed-out-tab-flash">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
+ </div>
+ <div class="facebox" id="facebox" style="display:none;">
+ <div class="facebox-popup">
+ <div class="facebox-content" role="dialog" aria-labelledby="facebox-header" aria-describedby="facebox-description">
+ </div>
+ <button type="button" class="facebox-close js-facebox-close" aria-label="Close modal">
+ <svg aria-hidden="true" class="octicon octicon-x" height="16" version="1.1" viewBox="0 0 12 16" width="12"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"/></svg>
+ </button>
+ </div>
+</div>
+
+
+ </body>
+</html>
+
diff --git a/ceph/files/keyring b/ceph/files/keyring
new file mode 100644
index 0000000..e595a2c
--- /dev/null
+++ b/ceph/files/keyring
@@ -0,0 +1,6 @@
+
+[client.{{ name }}]
+ key = {{ keyring.key }}
+ {%- for cap_name, cap in keyring.caps.iteritems() %}
+ caps {{ cap_name }} = "{{ cap }}"
+ {%- endfor %}
diff --git a/ceph/files/kraken/ceph.conf.Debian b/ceph/files/kraken/ceph.conf.Debian
new file mode 100644
index 0000000..7cce8f1
--- /dev/null
+++ b/ceph/files/kraken/ceph.conf.Debian
@@ -0,0 +1,108 @@
+{%- from "ceph/map.jinja" import common, mon, osd, radosgw with context %}
+[global]
+mon initial members = {%- for member in common.members %}{{ member.name }}{% if not loop.last %},{% endif %}{%- endfor %}
+mon host = {%- for member in common.members %}{{ member.host }}:6789{% if not loop.last %},{% endif %}{%- endfor %}
+
+{%- if common.cluster_network is defined %}
+cluster network = {{ common.cluster_network }}
+{%- endif %}
+{%- if common.public_network is defined %}
+public network = {{ common.public_network }}
+{%- endif %}
+
+fsid = {{ common.fsid }}
+
+##Global key: value
+{%- for key_name, key in common.get('config', {}).get('global', {}).iteritems() %}
+
+{{ key_name }} = {{ key }}
+
+{%- endfor %}
+
+
+##Other sections key: value
+{%- for key_name, key in common.get('config', {}).iteritems() %}
+
+{%- if key_name not in ['osd', 'mon', 'global'] %}
+[{{ key_name }}]
+
+{%- for value_name, value in key.iteritems() %}
+
+{{ value_name }} = {{ value }}
+
+{%- endfor %}
+
+{%- endif %}
+
+{%- endfor %}
+
+{%- if pillar.ceph.mon is defined %}
+
+[mon]
+{%- for key, value in common.get('config', {}).get('mon', {}).iteritems() %}
+{{ key }} = {{ value }}
+{%- endfor %}
+mon host = {%- for member in common.members %}{{ member.name }}{% if not loop.last %},{% endif %}{%- endfor %}
+mon addr = {%- for member in common.members %}{{ member.host }}:6789{% if not loop.last %},{% endif %}{%- endfor %}
+
+{%- for member in common.members %}
+[mon.{{ member.name }}]
+mon host = {{ member.name }}
+mon addr = {{ member.host }}:6789
+{%- if not loop.last %}
+
+{%- endif %}
+{%- endfor %}
+
+{%- endif %}
+
+{%- if pillar.ceph.osd is defined %}
+
+[osd]
+
+{%- for key, value in common.get('config', {}).get('osd', {}).iteritems() %}
+{{ key }} = {{ value }}
+{%- endfor %}
+
+{%- for disk_id, disk in osd.disk.iteritems() %}
+{% set id = osd.host_id~disk_id %}
+[osd.{{ id }}]
+host = {{ grains.nodename }}
+osd journal = {{ disk.journal }}
+{%- endfor %}
+
+{%- endif %}
+
+{%- if pillar.ceph.radosgw is defined %}
+
+[client.rgw.{{ grains.host }}]
+host = {{ grains.host }}
+keyring = /etc/ceph/ceph.client.rgw.{{ grains.host }}.keyring
+rgw socket path = /tmp/radosgw-{{ grains.host }}.sock
+log file = /var/log/ceph/ceph-rgw-{{ grains.host }}.log
+rgw data = /var/lib/ceph/radosgw/ceph-rgw.{{ grains.host }}
+rgw frontends = civetweb port={{ radosgw.bind.address }}:{{ radosgw.bind.port }} num_threads={{ radosgw.threads }}
+rgw dns name = {{ radosgw.get('hostname', grains.host) }}
+
+{%- if radosgw.identity.engine == 'keystone' %}
+{%- set ident = radosgw.identity %}
+
+rgw keystone api version = {{ ident.get('api_version', 3) }}
+rgw keystone url = {{ ident.host }}:{{ ident.get('port', '5000') }}
+rgw keystone accepted roles = _member_, Member, admin, swiftoperator
+rgw keystone revocation interval = 1000000
+rgw keystone implicit tenants = false
+rgw s3 auth use keystone = true
+rgw keystone admin user = {{ ident.get('user', 'admin') }}
+rgw keystone admin password = {{ ident.password }}
+rgw keystone verify ssl = False
+{%- if ident.get('api_version', 3) == 2 %}
+rgw keystone admin tenant = {{ ident.get('tenant', 'admin') }}
+{%- else %}
+rgw keystone admin project = {{ ident.get('project', 'admin') }}
+rgw keystone admin domain = {{ ident.get('domain', 'admin') }}
+{% endif %}
+
+{%- endif %}
+
+{%- endif %}
diff --git a/ceph/files/mon_keyring b/ceph/files/mon_keyring
new file mode 100644
index 0000000..e0161dd
--- /dev/null
+++ b/ceph/files/mon_keyring
@@ -0,0 +1,7 @@
+{%- from "ceph/map.jinja" import mon with context %}
+
+[mon.]
+ key = {{ mon.keyring.mon.key }}
+ {%- for cap_name, cap in mon.keyring.mon.caps.iteritems() %}
+ caps {{ cap_name }} = "{{ cap }}"
+ {%- endfor %}
diff --git a/ceph/files/nginx.conf b/ceph/files/nginx.conf
index af38fd8..2773e20 100644
--- a/ceph/files/nginx.conf
+++ b/ceph/files/nginx.conf
@@ -23,7 +23,7 @@
include fastcgi_params;
- fastcgi_pass unix:/tmp/radosgw.sock;
+ fastcgi_pass unix:/tmp/radosgw-{{ grains.host }}.sock;
}
location /PUT/ {
@@ -35,6 +35,6 @@
include fastcgi_params;
fastcgi_param CONTENT_LENGTH $content_length;
- fastcgi_pass unix:/tmp/radosgw.sock;
+ fastcgi_pass unix:/tmp/radosgw-{{ grains.host }}.sock;
}
}
diff --git a/ceph/init.sls b/ceph/init.sls
index e6e7103..0fa4edd 100644
--- a/ceph/init.sls
+++ b/ceph/init.sls
@@ -5,6 +5,9 @@
{% if pillar.ceph.mon is defined %}
- ceph.mon
{% endif %}
+{% if pillar.ceph.setup is defined %}
+- ceph.setup
+{% endif %}
{% if pillar.ceph.client is defined %}
- ceph.client
{% endif %}
diff --git a/ceph/map.jinja b/ceph/map.jinja
index 061bfbc..3cd9166 100644
--- a/ceph/map.jinja
+++ b/ceph/map.jinja
@@ -1,59 +1,83 @@
-{% set osd = salt['grains.filter_by']({
- 'Debian': {
- 'pkgs': ['ceph', 'ceph-common'],
- 'services': [],
- },
- 'RedHat': {
- 'pkgs': ['ceph'],
- 'services': [],
- },
-}, merge=salt['pillar.get']('ceph:osd')) %}
-{% set mon = salt['grains.filter_by']({
- 'Debian': {
- 'pkgs': ['ceph', 'ceph-common'],
- 'services': [],
- },
- 'RedHat': {
- 'pkgs': ['ceph', 'ceph-common'],
- 'services': [],
- },
-}, merge=salt['pillar.get']('ceph:mon')) %}
+{%- load_yaml as common_defaults %}
+Debian:
+ pkgs:
+ - ceph-common
+ services: []
+{%- endload %}
+{% set common = salt['grains.filter_by'](common_defaults, merge=salt['pillar.get']('ceph:common')) %}
-{% set client = salt['grains.filter_by']({
- 'Debian': {
- 'pkgs': ['ceph-common'],
- 'container_mode': False,
- 'prefix_dir': '',
- },
- 'RedHat': {
- 'pkgs': ['ceph-common'],
- 'container_mode': False,
- 'prefix_dir': '',
- },
-}, merge=salt['pillar.get']('ceph:client')) %}
+{%- load_yaml as mon_defaults %}
+Debian:
+ pkgs:
+ - ceph-mon
+ services:
+ - ceph
+{%- endload %}
+{% set mon = salt['grains.filter_by'](mon_defaults, merge=salt['pillar.get']('ceph:mon')) %}
-{% set monitoring = salt['grains.filter_by']({
- 'default': {
- 'cluster_stats': {},
- 'node_stats': {},
- },
-}, merge=salt['pillar.get']('ceph:monitoring')) %}
+{%- load_yaml as osd_defaults %}
+Debian:
+ pkgs:
+ - ceph-osd
+ - ceph-common
+ services: []
+{%- endload %}
+{% set osd = salt['grains.filter_by'](osd_defaults, merge=salt['pillar.get']('ceph:osd')) %}
-{% set radosgw = salt['grains.filter_by']({
- 'Debian': {
- 'pkgs': ['ceph-common','radosgw','python-rados','librados2'],
- 'services': ['radosgw-all'],
- },
- 'RedHat': {
- 'pkgs': ['ceph-common','radosgw'],
- 'services': ['radosgw-all'],
- },
-}, merge=salt['grains.filter_by']({
- 'xenial': {
- 'services': ['ceph-radosgw@rgw.' + salt['grains.get']('host')],
- },
-}, grain='oscodename', merge=salt['pillar.get']('ceph:radosgw'))) %}
+{%- load_yaml as radosgw_defaults %}
+Debian:
+ pkgs:
+ - radosgw
+ - ceph-common
+ - python-rados
+ - librados2
+ services:
+ {%- if grains.get('init', None) == 'systemd' %}
+ - ceph-radosgw@rgw.{{ grains.host }}
+ {%- else %}
+ - radosgw-all
+ {%- endif %}
+ threads: 50
+ bind:
+ port: 8080
+ identity:
+ engine: none
+RedHat:
+ pkgs:
+ - radosgw
+ - ceph-common
+ services:
+ - radosgw-all
+ threads: 50
+ bind:
+ port: 8080
+ identity:
+ engine: none
+{%- endload %}
+{% set radosgw = salt['grains.filter_by'](radosgw_defaults, merge=salt['pillar.get']('ceph:radosgw')) %}
+
+{%- load_yaml as client_defaults %}
+Debian:
+ pkgs:
+ - ceph-common
+ container_mode: False
+ prefix_dir: ''
+{%- endload %}
+{% set client = salt['grains.filter_by'](client_defaults, merge=salt['pillar.get']('ceph:client')) %}
+
+{%- load_yaml as setup_defaults %}
+Debian:
+ crushmap: {}
+{%- endload %}
+{% set setup = salt['grains.filter_by'](setup_defaults, merge=salt['pillar.get']('ceph:setup')) %}
+
+{%- load_yaml as monitoring_defaults %}
+default:
+ cluster_stats: {}
+ node_stats: {}
+{%- endload %}
+{% set monitoring = salt['grains.filter_by'](monitoring_defaults, merge=salt['pillar.get']('ceph:monitoring')) %}
{#- vim:ft=sls
-#}
diff --git a/ceph/meta/salt.yml b/ceph/meta/salt.yml
new file mode 100644
index 0000000..420de44
--- /dev/null
+++ b/ceph/meta/salt.yml
@@ -0,0 +1,13 @@
+grain:
+ {%- if pillar.get('ceph', {}).get('osd', {}).get('enabled', False) %}
+ {%- from "ceph/map.jinja" import osd with context %}
+ ceph_osd_disk:
+ {%- set ceph_osd_disk = {'ceph_osd_disk': osd.disk} %}
+ {{ ceph_osd_disk|yaml(False)|indent(4) }}
+ ceph_osd_host_id:
+ {%- set ceph_osd_host_id = {'ceph_osd_host_id': osd.host_id} %}
+ {{ ceph_osd_host_id|yaml(False)|indent(4) }}
+ ceph_crush_parent:
+ {%- set ceph_crush_parent = {'ceph_crush_parent': osd.crush_parent} %}
+ {{ ceph_crush_parent|yaml(False)|indent(4) }}
+ {%- endif %}
diff --git a/ceph/meta/sphinx.yml b/ceph/meta/sphinx.yml
index e4e20bd..874f4eb 100644
--- a/ceph/meta/sphinx.yml
+++ b/ceph/meta/sphinx.yml
@@ -1,6 +1,8 @@
doc:
name: Ceph
- description: Ceph’s RADOS provides you with extraordinary data storage scalability—thousands of client hosts or KVMs accessing petabytes to exabytes of data.
+ description: |
+ Ceph provides extraordinary data storage scalability—thousands of client
+ hosts or KVMs accessing petabytes to exabytes of data.
role:
{%- if pillar.ceph.osd is defined %}
osd:
diff --git a/ceph/mon.sls b/ceph/mon.sls
new file mode 100644
index 0000000..759ab6e
--- /dev/null
+++ b/ceph/mon.sls
@@ -0,0 +1,70 @@
+{%- from "ceph/map.jinja" import common, mon with context %}
+
+include:
+- ceph.common
+
+mon_packages:
+ pkg.installed:
+ - names: {{ mon.pkgs }}
+
+/etc/ceph/ceph.conf:
+ file.managed:
+ - source: salt://ceph/files/{{ common.version }}/ceph.conf.{{ grains.os_family }}
+ - template: jinja
+ - require:
+ - pkg: mon_packages
+
+cluster_secret_key:
+ cmd.run:
+ - name: "ceph-authtool --create-keyring /etc/ceph/ceph.mon.{{ grains.nodename }}.keyring --gen-key -n mon. --cap mon 'allow *'"
+ - unless: "test -f /etc/ceph/ceph.mon.{{ grains.nodename }}.keyring"
+
+add_admin_keyring_to_mon_keyring:
+ cmd.run:
+ - name: "ceph-authtool /etc/ceph/ceph.mon.{{ grains.nodename }}.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring"
+ - unless: "test -f /var/lib/ceph/mon/ceph-{{ grains.nodename }}/done"
+
+generate_monmap:
+ cmd.run:
+ - name: "monmaptool --create {%- for member in common.members %} --add {{ member.name }} {{ member.host }} {%- endfor %} --fsid {{ common.fsid }} /tmp/monmap"
+ - unless: "test -f /tmp/monmap"
+
+
+#/var/lib/ceph/mon/ceph-{{ grains.nodename }}:
+# file.directory:
+# - user: ceph
+# - group: ceph
+# - mode: 655
+# - makedirs: True
+
+/etc/ceph/ceph.mon.{{ grains.nodename }}.keyring:
+ file.managed:
+ - user: ceph
+ - group: ceph
+ - replace: false
+
+
+populate_monmap:
+ cmd.run:
+ - name: "sudo -u ceph ceph-mon --mkfs -i {{ grains.nodename }} --monmap /tmp/monmap"
+ - unless: "test -f /var/lib/ceph/mon/ceph-{{ grains.nodename }}/kv_backend"
+
+/var/lib/ceph/mon/ceph-{{ grains.nodename }}/keyring:
+ file.managed:
+ - source: salt://ceph/files/mon_keyring
+ - template: jinja
+
+/var/lib/ceph/mon/ceph-{{ grains.nodename }}/done:
+ file.managed:
+ - user: ceph
+ - group: ceph
+ - content: { }
+
+mon_services:
+ service.running:
+ - enable: true
+ - names: [ceph-mon@{{ grains.nodename }}]
+ - watch:
+ - file: /etc/ceph/ceph.conf
+ - require:
+ - pkg: mon_packages
diff --git a/ceph/monitoring.sls b/ceph/monitoring.sls
deleted file mode 100644
index 6328255..0000000
--- a/ceph/monitoring.sls
+++ /dev/null
@@ -1,8 +0,0 @@
-{#
-
-The ceph.monitoring state is only required for the Telegraf plugins, the
-Prometeus alerts and the Grafana dashboards.
-
-So everything happens in ceph/meta/(grafana|telegraf|prometheus).yml.
-
-#}
diff --git a/ceph/osd.sls b/ceph/osd.sls
new file mode 100644
index 0000000..1dad521
--- /dev/null
+++ b/ceph/osd.sls
@@ -0,0 +1,102 @@
+{%- from "ceph/map.jinja" import osd, common with context %}
+
+include:
+- ceph.common
+
+ceph_osd_packages:
+ pkg.installed:
+ - names: {{ osd.pkgs }}
+
+/etc/ceph/ceph.conf:
+ file.managed:
+ - source: salt://ceph/files/{{ common.version }}/ceph.conf.{{ grains.os_family }}
+ - template: jinja
+ - require:
+ - pkg: ceph_osd_packages
+
+{% for disk_id, disk in osd.disk.iteritems() %}
+
+#Set ceph_host_id per node and interpolate
+{% set id = osd.host_id~disk_id %}
+
+#Not needed - need to test
+#create_osd_{{ id }}:
+# cmd.run:
+# - name: "ceph osd create $(ls -l /dev/disk/by-uuid | grep {{ disk.dev | replace("/dev/", "") }} | awk '{ print $9}') {{ id }} "
+
+#Move this thing into linux
+makefs_{{ id }}:
+ module.run:
+ - name: xfs.mkfs
+ - device: {{ disk.dev }}
+ - unless: "ceph-disk list | grep {{ disk.dev }} | grep {{ osd.fs_type }}"
+
+/var/lib/ceph/osd/ceph-{{ id }}:
+ mount.mounted:
+ - device: {{ disk.dev }}
+ - fstype: {{ osd.fs_type }}
+ - opts: {{ disk.get('opts', 'rw,noatime,inode64,logbufs=8,logbsize=256k') }}
+ - mkmnt: True
+
+permission_/var/lib/ceph/osd/ceph-{{ id }}:
+ file.directory:
+ - name: /var/lib/ceph/osd/ceph-{{ id }}
+ - user: ceph
+ - group: ceph
+ - mode: 755
+ - makedirs: false
+ - require:
+ - mount: /var/lib/ceph/osd/ceph-{{ id }}
+
+{{ disk.journal }}:
+ file.managed:
+ - user: ceph
+ - group: ceph
+ - replace: false
+
+create_disk_{{ id }}:
+ cmd.run:
+ - name: "ceph-osd -i {{ id }} --conf /etc/ceph/ceph.conf --mkfs --mkkey --mkjournal --setuser ceph"
+ - unless: "test -f /var/lib/ceph/osd/ceph-{{ id }}/fsid"
+ - require:
+ - file: /var/lib/ceph/osd/ceph-{{ id }}
+ - mount: /var/lib/ceph/osd/ceph-{{ id }}
+
+add_keyring_{{ id }}:
+ cmd.run:
+ - name: "ceph auth add osd.{{ id }} osd 'allow *' mon 'allow profile osd' -i /var/lib/ceph/osd/ceph-{{ id }}/keyring"
+ - unless: "ceph auth list | grep '^osd.{{ id }}'"
+ - require:
+ - cmd: create_disk_{{ id }}
+
+/var/lib/ceph/osd/ceph-{{ id }}/done:
+ file.managed:
+ - content: {}
+ - require:
+ - cmd: add_keyring_{{ id }}
+
+osd_services_{{ id }}_osd:
+ service.running:
+ - enable: true
+ - names: ['ceph-osd@{{ id }}']
+ - watch:
+ - file: /etc/ceph/ceph.conf
+ - require:
+ - file: /var/lib/ceph/osd/ceph-{{ id }}/done
+
+{% endfor %}
+
+
+osd_services_global:
+ service.running:
+ - enable: true
+ - names: ['ceph-osd.target']
+ - watch:
+ - file: /etc/ceph/ceph.conf
+
+osd_services:
+ service.running:
+ - enable: true
+ - names: ['ceph.target']
+ - watch:
+ - file: /etc/ceph/ceph.conf
diff --git a/ceph/radosgw.sls b/ceph/radosgw.sls
index ced1d16..98a6707 100644
--- a/ceph/radosgw.sls
+++ b/ceph/radosgw.sls
@@ -2,14 +2,14 @@
{%- if radosgw.enabled %}
include:
-- ceph.client
+- ceph.common
ceph_radosgw_packages:
pkg.installed:
- names: {{ radosgw.pkgs }}
/var/lib/ceph/radosgw/ceph-radosgw.gateway/done:
- file.directory:
+ file.touch:
- makedirs: true
- require:
- pkg: ceph_radosgw_packages
@@ -22,6 +22,6 @@
- pkg: ceph_radosgw_packages
- file: /var/lib/ceph/radosgw/ceph-radosgw.gateway/done
- watch:
- - ini: /etc/ceph/ceph.conf
+ - file: /etc/ceph/ceph.conf
-{%- endif %}
\ No newline at end of file
+{%- endif %}
diff --git a/ceph/setup.sls b/ceph/setup.sls
new file mode 100644
index 0000000..2779974
--- /dev/null
+++ b/ceph/setup.sls
@@ -0,0 +1,53 @@
+{%- from "ceph/map.jinja" import common, setup with context %}
+{%- if setup.enabled %}
+
+include:
+- ceph.common
+
+{%- set osd_host = {} %}
+
+{%- for node_name, node_grains in salt['mine.get']('*', 'grains.items').iteritems() %}
+{%- if node_grains.ceph_osd_host_id is defined %}
+{%- do osd_host.update({node_name: {'host_id': node_grains.ceph_osd_host_id, 'osd_disk': node_grains.ceph_osd_disk}}) %}
+{%- endif %}
+{%- endfor %}
+
+/etc/ceph/crushmap:
+ file.managed:
+ - source: salt://ceph/files/crushmap
+ - template: jinja
+ - defaults:
+ osd_host: {{ osd_host }}
+
+{%- for pool_name, pool in setup.pool.iteritems() %}
+
+ceph_pool_create_{{ pool_name }}:
+ cmd.run:
+ - name: ceph osd pool create {{ pool_name }} {{ pool.pg_num }}{% if pool.pgp_num is defined %} {{ pool.pgp_num }}{% endif %} {{ pool.type }}{% if pool.erasure_code_profile is defined %} {{ pool.erasure_code_profile }}{% endif %}{% if pool.crush_ruleset_name is defined %} {{ pool.crush_ruleset_name }}{% endif %}{% if pool.expected_num_objects is defined %} {{ pool.expected_num_objects }}{% endif %}
+ - unless: "ceph osd pool ls | grep ^{{ pool_name }}"
+
+{%- for option_name, option_value in pool.iteritems() %}
+{%- if option_name != 'type' %}
+
+ceph_pool_option_{{ pool_name }}_{{ option_name }}:
+ cmd.run:
+ - name: ceph osd pool set {{ pool_name }} {{ option_name }} {{ option_value }}
+ - unless: "ceph osd pool get {{ pool_name }} {{ option_name }} | grep '{{ option_name }}: {{ option_value }}'"
+
+{%- endif %}
+
+{%- endfor %}
+
+
+{%- endfor %}
+
+{% for keyring_name, keyring in common.get('keyring', {}).iteritems() %}
+
+ceph_keyring_{{ keyring_name }}_import:
+ cmd.run:
+ - name: ceph auth import -i /etc/ceph/ceph.client.{{ keyring_name }}.keyring
+ - unless: ceph auth list | grep {{ keyring_name }}
+
+{%- endfor %}
+
+{%- endif %}
diff --git a/metadata/service/common/cluster.yml b/metadata/service/common/cluster.yml
new file mode 100644
index 0000000..9e729fe
--- /dev/null
+++ b/metadata/service/common/cluster.yml
@@ -0,0 +1,25 @@
+parameters:
+ _param:
+ ceph_mon_node01_hostname: cmn01
+ ceph_mon_node02_hostname: cmn02
+ ceph_mon_node03_hostname: cmn03
+ ceph:
+ common:
+ enabled: true
+ version: ${_param:ceph_version}
+ fsid: ${_param:ceph_cluster_fsid}
+ members:
+ - name: ${_param:ceph_mon_node01_hostname}
+ host: ${_param:ceph_mon_node01_address}
+ - name: ${_param:ceph_mon_node02_hostname}
+ host: ${_param:ceph_mon_node02_address}
+ - name: ${_param:ceph_mon_node03_hostname}
+ host: ${_param:ceph_mon_node03_address}
+ keyring:
+ admin:
+ key: ${_param:ceph_admin_keyring}
+ caps:
+ mds: "allow *"
+ mgr: "allow *"
+ mon: "allow *"
+ osd: "allow *"
diff --git a/metadata/service/common/single.yml b/metadata/service/common/single.yml
new file mode 100644
index 0000000..91a783b
--- /dev/null
+++ b/metadata/service/common/single.yml
@@ -0,0 +1,11 @@
+parameters:
+ _param:
+ ceph_mon_node01_hostname: cmn01
+ ceph:
+ common:
+ enabled: true
+ version: ${_param:ceph_version}
+ fsid: ${_param:ceph_cluster_fsid}
+ members:
+ - name: ${_param:ceph_mon_node01_hostname}
+ host: ${_param:ceph_mon_node01_address}
diff --git a/metadata/service/mon/cluster.yml b/metadata/service/mon/cluster.yml
new file mode 100644
index 0000000..6639484
--- /dev/null
+++ b/metadata/service/mon/cluster.yml
@@ -0,0 +1,21 @@
+applications:
+- ceph
+classes:
+- service.ceph.common.cluster
+- service.ceph.support
+parameters:
+ ceph:
+ mon:
+ enabled: true
+ keyring:
+ mon:
+ key: ${_param:ceph_mon_keyring}
+ caps:
+ mon: "allow *"
+ admin:
+ key: ${_param:ceph_admin_keyring}
+ caps:
+ mds: "allow *"
+ mgr: "allow *"
+ mon: "allow *"
+ osd: "allow *"
\ No newline at end of file
diff --git a/metadata/service/mon/single.yml b/metadata/service/mon/single.yml
new file mode 100644
index 0000000..da43193
--- /dev/null
+++ b/metadata/service/mon/single.yml
@@ -0,0 +1,21 @@
+applications:
+- ceph
+classes:
+- service.ceph.common.single
+- service.ceph.support
+parameters:
+ ceph:
+ mon:
+ enabled: true
+ keyring:
+ mon:
+ key: ${_param:ceph_mon_keyring}
+ caps:
+ mon: "allow *"
+ admin:
+ key: ${_param:ceph_admin_keyring}
+ caps:
+ mds: "allow *"
+ mgr: "allow *"
+ mon: "allow *"
+ osd: "allow *"
\ No newline at end of file
diff --git a/metadata/service/osd/cluster.yml b/metadata/service/osd/cluster.yml
new file mode 100644
index 0000000..7b429f2
--- /dev/null
+++ b/metadata/service/osd/cluster.yml
@@ -0,0 +1,16 @@
+applications:
+- ceph
+classes:
+- service.ceph.common.cluster
+- service.ceph.support
+parameters:
+ ceph:
+ osd:
+ enabled: true
+ host_id: ${_param:ceph_host_id}
+ crush_parent: ${_param:ceph_crush_parent}
+ copy_admin_key: true
+ journal_type: raw
+ dmcrypt: disable
+ osd_scenario: raw_journal_devices
+ fs_type: xfs
\ No newline at end of file
diff --git a/metadata/service/osd/single.yml b/metadata/service/osd/single.yml
new file mode 100644
index 0000000..5aec498
--- /dev/null
+++ b/metadata/service/osd/single.yml
@@ -0,0 +1,15 @@
+applications:
+- ceph
+classes:
+- service.ceph.common.single
+- service.ceph.support
+parameters:
+ ceph:
+ osd:
+ enabled: true
+ host_id: ${_param:ceph_host_id}
+ copy_admin_key: true
+ journal_type: raw
+ dmcrypt: disable
+ osd_scenario: raw_journal_devices
+ fs_type: xfs
\ No newline at end of file
diff --git a/metadata/service/radosgw/keystonev3.yml b/metadata/service/radosgw/keystonev3.yml
new file mode 100644
index 0000000..8308746
--- /dev/null
+++ b/metadata/service/radosgw/keystonev3.yml
@@ -0,0 +1,17 @@
+classes:
+- service.ceph.radosgw.single
+parameters:
+ _param:
+ ceph_radosgw_keystone_host: 127.0.0.1
+ ceph_radosgw_keystone_user: admin
+ ceph:
+ radosgw:
+ identity:
+ engine: keystone
+ api_version: 3
+ host: ${_param:ceph_radosgw_keystone_host}
+ port: 5000
+ user: admin
+ password: ${_param:ceph_radosgw_keystone_password}
+ project: admin
+ domain: default
diff --git a/metadata/service/radosgw/single.yml b/metadata/service/radosgw/single.yml
new file mode 100644
index 0000000..2fffa4c
--- /dev/null
+++ b/metadata/service/radosgw/single.yml
@@ -0,0 +1,13 @@
+applications:
+- ceph
+classes:
+- service.ceph.support
+parameters:
+ _param:
+ ceph_radosgw_hostname: radosgw
+ ceph:
+ radosgw:
+ enabled: true
+ hostname: ${_param:ceph_radosgw_hostname}
+ bind:
+ address: ${_param:single_address}
\ No newline at end of file
diff --git a/metadata/service/setup/single.yml b/metadata/service/setup/single.yml
new file mode 100644
index 0000000..688ee1b
--- /dev/null
+++ b/metadata/service/setup/single.yml
@@ -0,0 +1,4 @@
+parameters:
+ ceph:
+ setup:
+ enabled: true
diff --git a/tests/pillar/ceph_client.sls b/tests/pillar/ceph_client_single.sls
similarity index 100%
rename from tests/pillar/ceph_client.sls
rename to tests/pillar/ceph_client_single.sls
diff --git a/tests/pillar/ceph_mon_single.sls b/tests/pillar/ceph_mon_single.sls
new file mode 100644
index 0000000..a165407
--- /dev/null
+++ b/tests/pillar/ceph_mon_single.sls
@@ -0,0 +1,41 @@
+ceph:
+ common:
+ version: kraken
+ config:
+ global:
+ param1: value1
+ param2: value1
+ param3: value1
+ mon:
+ key: value
+ fsid: a619c5fc-c4ed-4f22-9ed2-66cf2feca23d
+ members:
+ - name: cmn01
+ host: 10.0.0.1
+ - name: cmn02
+ host: 10.0.0.2
+ - name: cmn03
+ host: 10.0.0.3
+ keyring:
+ admin:
+ key: AQBHPYhZv5mYDBAAvisaSzCTQkC5gywGUp/voA==
+ caps:
+ mds: "allow *"
+ mgr: "allow *"
+ mon: "allow *"
+ osd: "allow *"
+ mon:
+ enabled: true
+ version: kraken
+ keyring:
+ mon:
+ key: AQAnQIhZ6in5KxAAdf467upoRMWFcVg5pbh1yg==
+ caps:
+ mon: "allow *"
+ admin:
+ key: AQBHPYhZv5mYDBAAvisaSzCTQkC5gywGUp/voA==
+ caps:
+ mds: "allow *"
+ mgr: "allow *"
+ mon: "allow *"
+ osd: "allow *"
diff --git a/tests/pillar/ceph_osd_single.sls b/tests/pillar/ceph_osd_single.sls
new file mode 100644
index 0000000..16c4036
--- /dev/null
+++ b/tests/pillar/ceph_osd_single.sls
@@ -0,0 +1,55 @@
+ceph:
+ common:
+ enabled: true
+ version: kraken
+ config:
+ global:
+ param1: value1
+ param2: value1
+ param3: value1
+ osd:
+ key: value
+ fsid: a619c5fc-c4ed-4f22-9ed2-66cf2feca23d
+ members:
+ - name: cmn01
+ host: 10.0.0.1
+ - name: cmn02
+ host: 10.0.0.2
+ - name: cmn03
+ host: 10.0.0.3
+ keyring:
+ admin:
+ key: AQBHPYhZv5mYDBAAvisaSzCTQkC5gywGUp/voA==
+ caps:
+ mds: "allow *"
+ mgr: "allow *"
+ mon: "allow *"
+ osd: "allow *"
+ osd:
+ enabled: true
+ version: kraken
+ host_id: 10
+ copy_admin_key: true
+ journal_type: raw
+ dmcrypt: disable
+ osd_scenario: raw_journal_devices
+ fs_type: xfs
+ disk:
+ '00':
+ rule: hdd
+ dev: /dev/vdb2
+ journal: /dev/vdb1
+ class: besthdd
+ weight: 1.5
+ '01':
+ rule: hdd
+ dev: /dev/vdc2
+ journal: /dev/vdc1
+ class: besthdd
+ weight: 1.5
+ '02':
+ rule: hdd
+ dev: /dev/vdd2
+ journal: /dev/vdd1
+ class: besthdd
+ weight: 1.5