Cinder Ceph config

 1 cinder::controller::settings: 
 2         DEFAULT: 
 3                 rpc_backend: "rabbit" 
 4                 my_ip: "%{::ipaddress_eth0}" 
 5                 verbose: "True" 
 6                 debug: "False" 
 7                 auth_strategy: "keystone" 
 8                 enabled_backends: "ceph_sas,ceph_sata" 
 9                 glance_host: "%{hiera('glance::virtualIP')}" 
10                 volume_driver: "cinder.volume.drivers.rbd.RBDDriver" 
11                 rbd_pool: "volumes" 
12                 rbd_ceph_conf: "/etc/ceph/ceph.conf" 
13                 rbd_flatten_volume_from_snapshot: "false" 
14                 rbd_max_clone_depth: "5" 
15                 rbd_store_chunk_size: "4" 
16                 rados_connect_timeout: "-1" 
17                 glance_api_version: "2" 
18                 default_volume_type: "sas" 
19         ceph_sas: 
20                 rbd_pool: "volumes" 
21                 volume_driver: "cinder.volume.drivers.rbd.RBDDriver" 
22                 rbd_ceph_conf: "/etc/ceph/ceph.conf" 
23                 rbd_flatten_volume_from_snapshot: "false" 
24                 rbd_max_clone_depth: "5" 
25                 rbd_store_chunk_size: "4" 
26                 rados_connect_timeout: "-1" 
27                 glance_api_version: "2" 
28                 rbd_user: "cinder" 
29                 rbd_secret_uuid: "%{hiera('otherPasswords::cephUUID')}" 
30                 volume_backend_name: "volumes" 
31         ceph_sata: 
32                 rbd_pool: "volumes_sata" 
33                 volume_backend_name: "volumes_sata" 
34                 volume_driver: "cinder.volume.drivers.rbd.RBDDriver" 
35                 rbd_ceph_conf: "/etc/ceph/ceph.conf" 
36                 rbd_flatten_volume_from_snapshot: "false" 
37                 rbd_max_clone_depth: "5" 
38                 rbd_store_chunk_size: "4" 
39                 rados_connect_timeout: "-1" 
40                 glance_api_version: "2" 
41                 rbd_user: "cinder" 
42                 rbd_secret_uuid: "%{hiera('otherPasswords::cephUUID')}" 
43
44         database: 
45                 connection: "mysql://cinder:%{hiera('databasePasswords::cinder')}@%{hiera('mysql::virtualIP')}/cinder" 
46
47         keystone_authtoken: 
48                 auth_uri: "http://%{hiera('keystone::virtualIP')}:5000" 
49                 auth_url: "http://%{hiera('keystone::virtualIP')}:35357" 
50                 auth_plugin: "password" 
51                 project_domain_id: "default" 
52                 user_domain_id: "default" 
53                 project_name: "service" 
54                 username: "cinder" 
55                 password: "%{hiera('servicePasswords::cinder')}" 
56
57         oslo_messaging_rabbit: 
58                 rabbit_host:    "lib-ks01" 
59                 rabbit_userid:  "openstack" 
60                 rabbit_password: "%{hiera('servicePasswords::rabbit')}" 

Create Ceph users

1 [root@lib-cephmon1 ~]# ceph auth get-or-create client.glance mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=images'
2 [client.glance] 
3         key = AQCNHLxW3mtbIRAAvZp7yzw2kYaidD2s8inIgw== 

Take the output of that command and dump it into /etc/ceph/ceph.client.cinder.keyring

1vim /etc/ceph/ceph.client.cinder.keyring 

Paste:

1 [client.glance] 
2         key = AQCNHLxW3mtbIRAAvZp7yzw2kYaidD2s8inIgw== 

Set permission on keyring file:

1 chown cinder:cinder /etc/ceph/ceph.client.cinder.keyring

Then create the volume types in the DB to match the config cinder type-create regular:

1cinder type-key regular set volume_backend_name=volumes
2
3cinder type-create sata
4cinder type-key sata set volume_backend_name=volumes_sata
5
6cinder type-list

Create the volumes in ceph (Need to be run on a server with admin rights to ceph cluster, Cinder user doesnt have this level of access)

ceph osd pool create volumes_sata 200