Commit 876abaed authored by Jan Siersch's avatar Jan Siersch
Browse files

fix for chown before user is added

also made sql statements re-executable (with database drops)
parent ca8dba39
DROP DATABASE IF EXISTS cinder;
CREATE DATABASE cinder;
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY '$CINDER_DBPASS';
GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY '$CINDER_DBPASS';
DROP DATABASE IF EXISTS glance;
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY '$GLANCE_DBPASS';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY '$GLANCE_DBPASS';
DROP DATABASE IF EXISTS heat;
CREATE DATABASE heat;
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'localhost' IDENTIFIED BY '$HEAT_DBPASS';
GRANT ALL PRIVILEGES ON heat.* TO 'heat'@'%' IDENTIFIED BY '$HEAT_DBPASS';
DROP DATABASE IF EXISTS keystone;
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY '$KEYSTONE_DBPASS';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY '$KEYSTONE_DBPASS';
DROP DATABASE IF EXISTS neutron;
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY '$NEUTRON_DBPASS';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY '$NEUTRON_DBPASS';
DROP DATABASE IF EXISTS nova;
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY '$NOVA_DBPASS';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY '$NOVA_DBPASS';
DROP DATABASE IF EXISTS trove;
CREATE DATABASE trove;
GRANT ALL PRIVILEGES ON trove.* TO trove@'localhost' IDENTIFIED BY '$TROVE_DBPASS';
GRANT ALL PRIVILEGES ON trove.* TO trove@'%' IDENTIFIED BY '$TROVE_DBPASS';
......@@ -160,11 +160,6 @@ if [[ $installConfig == true ]]; then
for i in $(find "../config/storagenode" -type f); do
placeConfigFile "$i" "${i:21}"
done
chmod "755" $(find "/etc/cinder" -type d)
chmod "640" $(find "/etc/cinder" -type f)
chown -R "cinder:cinder" "/etc/cinder"
fi
# 7. Add a networking service
......@@ -179,6 +174,12 @@ if [[ $installCinder == true ]]; then
# This node contains the disk that serves volumes.
echo "### installing block storage ###"
# Add a filter entry to the devices section in the /etc/lvm/lvm.conf file to keep LVM from scanning devices used by virtual machines:
#setConfigValue "filter" '[ "a/sda1/", "a/sdb/", "r/.*/" ]' "/etc/lvm/lvm.conf"
# After you configure the operating system, install the appropriate packages for the Block Storage service:
yum install -y openstack-cinder scsi-target-utils
mkdir -p "/var/lib/cinder"
chmod "750" "/var/lib/cinder"
chown "cinder:cinder" "/var/lib/cinder"
......@@ -191,11 +192,9 @@ if [[ $installCinder == true ]]; then
chmod "750" "/var/lock/cinder"
chown "cinder:cinder" "/var/lock/cinder"
# Add a filter entry to the devices section in the /etc/lvm/lvm.conf file to keep LVM from scanning devices used by virtual machines:
#setConfigValue "filter" '[ "a/sda1/", "a/sdb/", "r/.*/" ]' "/etc/lvm/lvm.conf"
# After you configure the operating system, install the appropriate packages for the Block Storage service:
yum install -y openstack-cinder scsi-target-utils
chmod "755" $(find "/etc/cinder" -type d)
chmod "640" $(find "/etc/cinder" -type f)
chown -R "cinder:cinder" "/etc/cinder"
# Configure the iSCSI target service to discover Block Storage volumes.
# Add the following line to the beginning of the "/etc/tgt/targets.conf" file, if it is not already present:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment