Ask Your Question
4

how do you manage Askbot and upgrades

asked 2011-02-18 13:16:14 -0600

viisik gravatar image

nooby question,

how do you manage Askbot and upgrades, what IDE you use for that

and do you use any version control for it,

how do you do backups, or hosting provider is doing backups

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-02-18 13:50:29 -0600

Evgeny gravatar image

updated 2011-02-18 13:53:16 -0600

A method using git

Directory A hosts the site and contains code repository of askbot, on branch master.

To upgrade - I copy entire directory cp -pr A B (-pr to preserve file permissions), then jump into B, bring the updated code and merge it:

git fetch origin master:github-master #bring new code from github
git merge origin github-master #may need to resolve conflicts if there are customizations

Then I check if there are new database migrations:

ls askbot/migrations/

If there any any new .py files -> back up the database, create copy of the database, reflect database change in the settings.py and run

python manage.py migrate

If there are no migrations - test run the site. It is also possible to run the test suite - all should succeed except PageLoadTests (there is a missing piece of test data)

Once everything works - swap the directories.

The git method has advantage that it makes it easy to maintain your customizations while being able to upgrade, but one has to learn basic git manipulations.

Method using pip or easy_install

First install askbot into virtual environment. Then make a copy of that environment and the project directory.

In the copy of your virtual environment run

pip upgrade askbot
python manage.py migrate --list

If there are new database migrations, clone the database as well and reflect the change in the settings.py

Run the migrations

python manage.py migrate# there may be other apps to migrate besides askbot

See whether everything works, then either swap the project directories and the python environment or change the server configuration to serve from the new directory.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2011-02-18 13:16:14 -0600

Seen: 806 times

Last updated: Feb 18 '11