First time here? Check out the FAQ!
4

how do you manage Askbot and upgrades

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

viisik's avatar
161
viisik
asked 2011-02-18 13:16:14 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

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.

Evgeny's avatar
13.2k
Evgeny
updated 2011-02-18 13:53:16 -0500, answered 2011-02-18 13:50:29 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments