openstack_dockers/cinder_storage/bootstrap.sh
Egon Rijpkema 1920804c3c Instead of a mapped name...
we're using the actual device name now.
2018-12-14 16:15:30 +01:00

28 lines
710 B
Bash
Executable File

#!/bin/bash
# Create admin-openrc.sh from secrets that are in the environment during bootstrap.
cat << EOF > /root/admin-openrc.sh
#!/bin/bash
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=${OS_PASSWORD}
export OS_AUTH_URL=http://${KEYSTONE_HOST}:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=admin
export OS_IMAGE_API_VERSION=2
EOF
source /root/admin-openrc.sh
# Write the config files
/etc/write_conf.sh
# create a LVM physical volume and volume group.
# This device should be available tpo the container
pvcreate $CINDER_STORAGE_VOLUME
vgcreate cinder-volumes $CINDER_STORAGE_VOLUME