Create a user called 'glancedbadmin' with password 'glancesecret', create the database 'glance' and give 'glancedbadmin' all privileges on that database.
sudo su - postgres psql CREATE user glancedbadmin; ALTER user glancedbadmin with password 'glancesecret'; CREATE DATABASE glance; GRANT ALL PRIVILEGES ON database glance TO glancedbadmin; \q exit
Edit the file /etc/glance/glance-registry.conf and edit the line which contains the option "sql_connection =" to this:
sql_connection = postgresql://glancedbadmin:glancesecret@10.10.10.2/glance
Restart glance-registry after making changes to /etc/glance/glance-registry.conf
sudo restart glance-registry
