Installing FlightDeck on OSX
I had a very difficult time trying to setup FlightDeck locally for development when I tried months ago, partly because I couldn't find documentation that walked me all of the way through setting it up, and also partly due to the fact that I'm so new to Python. So one of my personal goals for the Mozilla all hands work week was to seek help from Piotr Zalewa (aka Zalun) on how to install FlightDeck on my macbook. Well he was very kind and helped me out, and now I've got FlightDeck running locally! so I thought I would document what I did as best I can so that I don't forget this information, and so that I can share it with you.
Requirements (for these instructions)
- OSX
- Python 2.6
- Git
- MySQL
Installation
$ git clone https://github.com/zalun/FlightDeck.git
$ cd FlightDeck
$ sudo easy_install pip
$ sudo pip install virtualenvwrapper
Now add the following to ~/.bash_profile
source /usr/local/bin/virtualenvwrapper.sh
Then close your terminal instance and start a new one, then type to following commands:
$ sudo pip install virtualenv
$ mkvirtualenv --no-site-packages flightdeck
Now you are in a virtual environment called "flightdeck", when you want to return to this virtual environment later on remember to use 'workon flightdeck'.
Now you need to install the required dependencies, to do so to the following:
$ pip install mysql-python
$ pip install -r ./requirements/development.txt
Now you'll need to create a new settings_local.py file in the root (where settings.py can be found):
PRODUCTION = False
DEBUG = True
SESSION_COOKIE_SECURE = False
DATABASES = {
'default': {
'NAME': 'flightdeck-db',
'ENGINE': 'django.db.backends.mysql',
'HOST': '127.0.0.1',
'PORT': '',
'USER': 'root',
'PASSWORD': '*****',
},
}
Note: you need to create a new MySQL db called 'flightdeck-db' (or whatever you want it to be).
Then type the following:
When you are asked "Would you like to create one now? (yes/no):" then type "yes" and follow the instructions from there.
$ git submodule update
$ ./manage.py add_core_lib addon-sdk-0.9
$ ./manage.py runserver
Now you're done! and FlightDeck should be running locally now (you should see a message that says something like "Development server is running at http://127.0.0.1:8000/")
When you want to shutdown the server go to the terminal window and hit ctrl+c.
The next time that you want to run the server do this:
$ workon flightdeck
$ ./manage.py runserver

@erikvold