ceph/qa/qa_scripts/openstack/execs/libvirt-secret.sh
Warren Usui b09d85d7ab OpenStack setup scripts.
A set of scripts used to bring up an OpenStack instance on one site,
connect a ceph cluster, add pools to store OpenStack glance images,
cinder volumes, nova vms, and cinder backups on rbd, and bring up a nova
compute node.
2016-05-16 14:33:39 -07:00

19 lines
410 B
Bash
Executable File

#!/bin/bash -f
#
# Generate a libvirt secret on the Openstack node.
#
openstack_node=${1}
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
sudo virsh secret-define --file secret.xml
sudo virsh secret-set-value --secret ${uuid} --base64 $(cat client.cinder.key)
echo ${uuid}