I'm opening a new thread and try to make the deploy of a simple test. Let's see if I understand the basics...
First of all, the DATABASES options are divided in 3 files:
- local_settings.py: the setting for local development. By default, sqlite is used. I wonder what's the best approach if I know that I want to deploy on PostgreSQL on the server. Should I work on PostgreSQL locally as well?
- live_settings.py: this also is pretty clear, it contains the server settings (I found out that it can be left untouched, as long as settings.py is complete)
- settings.py: IIUC, any settings here will be overridden by the two settings above, so I can ignore the DATABASE section. Is it correct?
Now, I assume that Fabric will handle the migration from sqlite to postgresql.
So all I have to do to deploy is defining the FABRIC={} variables in settings.py
I've learned that I'd better split 'fab all' in three steps. I'm trying to understand which options/settings are required for each step (it would be nice to organize them this way, sequentially, in default settings.py):
1. fab install
This is the easier part. It just installs the required packages on the server.
Options to be defined on FABRIC section of settings.py are: SSH_USER, SSH_KEYPATH, HOSTS, LOCALE, SECRET_KEY, NEVERCACHE_KEY.
2. fab create
Another note to add in the documentation is that a remote git/mercurial server is needed.
In this step I have to fill: VIRTUALENV_HOME, PROJECT_NAME, REQUIREMENTS_PATH, REPO_URL, DB_PASS.
I see that DB_PASS is shadowed so it's safe putting the password in the file (repository is private, of course). Or there's a better method?
3. fab deploy
I had nothing more to configure.
This test just worked smoothly. No error.
Now I should find out why my real project is failing. Maybe I could start it from scratch step by step and see what happens.
Anyway, I'd love to hear comments on above.. I may try writing a patch for the documentation to help other users, even if my understanding of mezzanine is still poor.