Ask Your Question

How to use two different askbot code bases?

asked 2010-10-16 09:41:20 -0600

Benoit's avatar

Is there a way to have two different askbot versions installed on the same server?
For example, a and a where the "release" would use 1 version of askbot (let's say 0.6.14) and the "beta" would use the latest out of the repository?

Note that instead of /release & beta, it would be just as good to have as a regular apache port 80 deployed system and have running the webBRICK server.

Basically, is there a variable I can set that indicates to an askbot installation: use .../site-packages/askbot-0.6.14 or use .../site-packages/askbot-beta?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2010-10-16 15:56:30 -0600

Evgeny's avatar

updated 2010-10-16 16:19:45 -0600

Hi Benoit, I would install the beta version into the same directory that contains your file for the "beta" site and have the code cloned from github. That way you can merge the latest updates into the code and try them out.

With multiple deployments you need to consider how to set up the server configuration, database and the python code.

With the python part you can deploy copies of actual code into the site directories. Having more than one copy in the site-packages won't work because of the conflicts of the package names. You can also deploy with python virtualenv - with one virtual environment for each deployment.

For the database - if you want to point both production and "beta" instances to the same database, then you can do it only in the cases when the two instances have the same database schema. The schema changes from time to time, with the south migrations taking care of the transitions. The easiest way to tell whether the shema has changed is by typing python migrate --list; this command will list the migrations that have/have not been applied. Don't forget to add the --list parameter, or you will run the actual migration by accident (and remember to back up the database before applying the migrations). If the lists of migrations are the same in the two instances, it is safe to point both to the same database.

If the database schemas differ, then you'll have to have a separate database for the "beta" instance.

The server configuration depends obviously on the type of server you are using. With apache you can try using two WSGIScriptAlias statements within the same virtual host (if you want to use the same domain name), or you can set up two virtual hosts - and Can't advise you anyting regarding the webrick. site runs the latest code from the master branch most of the time. I find it very simple to upgrade (fetch new code then merge) from github even though is using a fork or the app (there are some modifications in the application files that make this site multilingual).

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: 2010-10-16 09:41:20 -0600

Seen: 224 times

Last updated: Oct 16 '10