Wednesday, November 17, 2010

Django deployment problem

Actually, there are several problems:

  1. Upload to the server - usually solved via SCM like git, mercurial, subversion etc – Solved
  2. Copy application files to proper destinations, reboot application - bash/fabric etc. – Solved
  3. Copy user-related media files – usually solved via ignore files, symlinks etc. but there is NO STANDARD or SOLUTION - Unsolved
  4. Migrate database, maybe it's possible to solve it via some migration tool like South but actually I don't know and at this point it's still - Unsolved
  5. Fallback to previous version (=any version?) – unsolved and almost impossible to keep data in actual state trough migrations - Unsolved 

So, what I think about it.


Database Migrations
I guess it's possible to solve via South. Another way is to write my own migrations with specific format - SQL with bash/python etc. I will dedicate some time to learn more about migration.

Copy user-related media files
I saw something about it in latest version of django. But sometimes I have to work with old releases (1.1.1) of django I need to keep it independent from django - I'll create configuration file which will consist from list of directories where User's data will be stored. Then some playing with symlinks and it will be solved.

And, at least
Fallback to previous version
There is no rocket science to change symlinks. But I still can't decide what I can do with database at this point.

No comments:

Post a Comment