Ask Your Question

how do you manage Askbot and upgrades

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

viisik's avatar

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

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

Evgeny's avatar

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 and run

python 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 migrate --list

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

Run the migrations

python 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



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

Seen: 1,011 times

Last updated: Feb 18 '11