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/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