Ask Your Question
1

How to use two different askbot code bases?

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

Benoit gravatar image Benoit flag of United States
865 22 8 31

Is there a way to have two different askbot versions installed on the same server?
For example, a www.server.com/release and a www.server.com/beta 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 www.server.com as a regular apache port 80 deployed system and have www.server.com:8000 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?

delete close flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

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

Evgeny gravatar image Evgeny flag of Chile
11009 50 84 182
http://askbot.org/

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

Hi Benoit, I would install the beta version into the same directory that contains your settings.py 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 manage.py 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 - forum.example.com and forum-beta.example.com. Can't advise you anyting regarding the webrick.

Askbot.org 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 askbot.org is using a fork or the app (there are some modifications in the application files that make this site multilingual).

link publish delete flag offensive edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2010-10-16 09:41:20 -0500

Seen: 44 times

Last updated: Oct 16 '10