This post is on how to setup OSA ( Openstack Ansible) with CEPH, where both projects are independent of one another.
- Setup CEPH using ceph-ansible.
- Create the necessary pools and logins . For example, here I am using the same CEPH storage for 2 different OpenStack Setups.
ceph osd pool create osa-volumes
ceph osd pool create osa-images
ceph osd pool create osa-vms
ceph osd pool create osa-backups
ceph osd pool create kolla-volumes
ceph osd pool create kolla-images
ceph osd pool create kolla-vms
ceph osd pool create kolla-backups
ceph auth get-or-create client.ocinder mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=osa-volumes, allow rwx pool=osa-backups, allow rwx pool=osa-vms, allow rx pool=osa-images'
ceph auth get-or-create client.oglance mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=osa-images'
ceph auth get-or-create client.kcinder mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=kolla-volumes, allow rwx pool=kolla-backups, allow rwx pool=kolla-vms, allow rx pool=kolla-images'
ceph auth get-or-create client.kglance mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=kolla-images'
In your /etc/openstack_deploy/user_variables.yml
generate_fsid: false
fsid: $fsid ## output of 'ceph fsid' command from ceph-mon
# make sure your osa-deploy can SSH to the mons IP
ceph_mons:
- x.y.z.1
- x.y.z.2
- x.y.z.3
openstack_config: false
cinder_ceph_client: ocinder
glance_ceph_client: oglance
glance_default_store: rbd
glance_rbd_store_pool: osa-images
#nova_libvirt_images_rbd_pool: osa-vms
cinder_service_backup_ceph_user: ocinder
cinder_service_backup_ceph_pool: osa-backups
cinder_backends:
RBD:
volume_driver: cinder.volume.drivers.rbd.RBDDriver
rbd_pool: osa-volumes
rbd_ceph_conf: /etc/ceph/ceph.conf
rbd_store_chunk_size: 8
volume_backend_name: rbddriver
rbd_user: "{{ cinder_ceph_client }}"
rbd_secret_uuid: "{{ cinder_ceph_client_uuid }}"
report_discard_supported: true