Create a user called 'novadbadmin' with password 'novasecret', create the database 'nova' and give 'novadbadmin' all privileges on that database.

sudo su - postgres
psql
CREATE user novadbadmin;
ALTER user novadbadmin with password 'novasecret';
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON database nova TO  novadbadmin;
\q
exit

Configure Postgresql to accept connections from users from any machine on 10.10.10.0/24 and 192.168.3.0/24 by adding the following line to /etc/postgresql/9.1/main/pg_hba.conf.

host    all             all             10.10.10.0/24         md5
host    all             all             192.168.3.0/24          md5

Restart PostgreSQL.

/etc/init.d/postgresql restart

loading table of contents...