Database
If you are ready to deploy a Django site, start by creating a database…
Create
Note
Make sure the Salt pillar is configured correctly for the site. You need to include the database password and a folder containing the database settings.
For details, see Site - Configuration
For MySQL:
ssh the.server.ip.address
sudo -i
mysql
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
For details, see:
To create a database for a site:
cd fabric
fab create-db domain:www.hatherleigh.info
# if your would like to use a Postgres table space name
fab domain:www.hatherleigh.info create-db:cbs
To create a workflow database for a site:
fab domain:www.hatherleigh.info create-db-workflow
You are now ready to Deploy your site…
Drop/Delete
To drop a database, you will need to append the current date and time e.g:
fab domain:www.hatherleigh.info drop_db:02/02/2015-16:54
To drop a database role:
fab domain:www.hatherleigh.info drop_db_role
Note
This command should fail if the role is in use.