我要评分
获取效率
正确性
完整性
易理解

Configuring the Ceph Environment

Perform the operations in this section after Installing, Configuring, and Verifying Glance and Installing, Configuring, and Verifying Cinder are complete.

Perform the following operations on the manager node ceph1 in the Ceph cluster:

  1. On ceph1, create storage pools required by different AZs and change the number of placement groups (PGs).
    1
    2
    3
    4
    cd /etc/ceph
    ceph osd pool create volumes-x86 32
    ceph osd pool create volumes-arm 32
    ceph osd pool create images 32
    
  2. View the created storage pools.
    1
    ceph osd pool ls
    

  3. Synchronize the configuration file on ceph1 with those on the controller, x86-compute, and arm-compute nodes.
    1
    2
    cd /etc/ceph
    ceph-deploy --overwrite-conf admin ceph1 controller x86-compute arm-compute
    
  4. On ceph1, create keyrings for the cinder and glance users so that they can access the Ceph storage pools.
    1
    2
    ceph auth get-or-create client.cinder mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=volumes-x86, allow rwx pool=volumes-arm, allow rx pool=images'
    ceph auth get-or-create client.glance mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=images'
    

    # Controller nodes

    1
    2
    ceph auth get-or-create client.glance | ssh controller tee /etc/ceph/ceph.client.glance.keyring
    ssh controller chown glance:glance /etc/ceph/ceph.client.glance.keyring
    

    # Compute nodes

    1
    2
    3
    4
    ceph auth get-or-create client.cinder | ssh x86-compute tee /etc/ceph/ceph.client.cinder.keyring
    ceph auth get-or-create client.cinder | ssh arm-compute tee /etc/ceph/ceph.client.cinder.keyring
    ssh x86-compute chown cinder:cinder /etc/ceph/ceph.client.cinder.keyring
    ssh arm-compute chown cinder:cinder /etc/ceph/ceph.client.cinder.keyring
    
  5. On the compute nodes (x86-compute and arm-compute), add a key to libvirt.
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    UUID=$(uuidgen)
    cat > secret.xml <<EOF
    <secret ephemeral='no' private='no'>
    <uuid>${UUID}</uuid>
    <usage type='ceph'>
    <name>client.cinder secret</name>
    </usage>
    </secret>
    EOF
    
    virsh secret-define --file secret.xml
    virsh secret-set-value --secret ${UUID} --base64 $(cat /etc/ceph/ceph.client.cinder.keyring | grep key | awk -F ' ' '{ print $3 }')
    

    Save the generated UUID, which will be used in Cinder and Nova installation and configurations. In this example, the UUID is b3d5fee6-839c-482e-b244-668bad7128a9.