AMO/FlightDeck/1.0a6/ServerUpdate
From MozillaWiki
< AMO | FlightDeck | 1.0a6
1.a6 is a major update. There were changes in database and file structure. Majority of changes will be done by simply pulling the branch, but some has to be implemented manually.
Update Process
- Copy ./flightdeck/settings_local.py to some safe space
- copy all SDKs from ./sdk_versions/ to some safe space
- Pull the staging branch first
git pull origin staging
- Copy all revisions from the safe place to ./lib/
- Edit ./settings_local.py
- from settings import *
- add there DATABASE and AUTH_DATABASE settings
- Install vendor libraries
git clone --recursive git://github.com/zalun/FlightDeck-lib.git vendor
- Call update database script
python ./scripts/update-1.0a6.py
- Initialize submodules
git submodule init && git submodule update
- Add new SDKS
-
python ./manage.py add_core_lib jetpack-sdk-0.8
-
python ./manage.py add_core_lib addon-sdk-0.9
-
Clean Up
Some of the directories were ignored by git before. This is a full root directory listing of the current project:
apps/ cuddlefish/ docs/ lib/ media/ requirements/ scripts/ tools/ upload/ utils/ vendor/ README __init__.py log_settings.py manage.py settings.py settings_local.py urls.py
If there is any other file or directory it is adviced to remove it.
WSGI Config
This is a WSGI script I run under Apache2 on http://flightdeck.zalewa.info/
import sys import os import site PROJECT_PATH = '/var/www/FlightDeck' VIRTUAL_ENV = '/home/zalun/Envs/flightdeck' ALLDIRS = [ os.path.join(PROJECT_PATH), os.path.join(PROJECT_PATH, 'apps'), os.path.join(VIRTUAL_ENV, 'lib/python2.6/site-packages'), ] # Remember original sys.path. prev_sys_path = list(sys.path) # Add each new site-packages directory. for directory in ALLDIRS: site.addsitedir(directory) # add the app's directory to the PYTHONPATH apache_configuration= os.path.dirname(__file__) project = os.path.dirname(apache_configuration) workspace = os.path.dirname(project) sys.path.append(workspace) # reorder sys.path so new directories from the addsitedir show up first new_sys_path = [p for p in sys.path if p not in prev_sys_path] for item in new_sys_path: sys.path.remove(item) sys.path[:0] = new_sys_path os.environ['DJANGO_SETTINGS_MODULE'] = 'settings_local' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()