Pancake/Setting up a Pancake development environment: Difference between revisions
(Created page with "== Introduction == This page containsinstructions on how to run pancake locally on your Mac or Linux machine. Note that Pancake is a somewhat complex application; it consists of...") |
No edit summary |
||
| Line 40: | Line 40: | ||
The above scripts will setup a Python virtualenv for each of the modules and install all required dependencies. | The above scripts will setup a Python virtualenv for each of the modules and install all required dependencies. | ||
== Configuring pancake == | |||
When running in development mode, Pancake expects its configuration files under ~/.pancake. The repository contains samples of these files with sane defaults that you can use for development. | |||
To copy the configuration files templates, execute the following commands: | |||
mkdir ~/.pancake | |||
cd pancake | |||
cp pancake-expander/etc/expander.json ~/.pancake/ | |||
cp pancake-search/etc/search.json ~/.pancake/ | |||
cp pancake-social/etc/social.json ~/.pancake/ | |||
cp pancake-web/etc/web.json ~/.pancake/ | |||
cp pancake-user-apil/etc/user-api.json ~/.pancake/ | |||
cp fxhome-lattice/etc/lattice.json ~/.pancake/ | |||
== Running Pancake == | == Running Pancake == | ||
Revision as of 18:50, 16 July 2012
Introduction
This page containsinstructions on how to run pancake locally on your Mac or Linux machine. Note that Pancake is a somewhat complex application; it consists of a web frontend that talks to multiple independent web services that are part of the backend. It also depends on two Java based services, Elastic Search and Neo4J. In development mode there is no dependency on MySQL but it does require a local Redis installation.
Requirements
Pancake requires the following software to be installed and running on your development machine:
- Python 2.7
- Elastic Search
- Neo4J
If you use a modern version of OS X or Linux then Python 2.7 will likely be installed already.
Installing Elastic Search
TODO
Installing Neo4J
TODO
Checking out the Pancake code
Code for Pancake lives on Bitbucket. You can check it out using the following command:
hg clone https://bitbucket.org/mozillapancake/pancake
Configuring Pancake
Before you can run any of the Pancake code you need to run the following scripts:
cd pancake scripts/setup-expander.sh scripts/setup-lattice.sh scripts/setup-search.sh scripts/setup-social.sh scripts/setup-user-api.sh scripts/setup-web.sh
The above scripts will setup a Python virtualenv for each of the modules and install all required dependencies.
Configuring pancake
When running in development mode, Pancake expects its configuration files under ~/.pancake. The repository contains samples of these files with sane defaults that you can use for development.
To copy the configuration files templates, execute the following commands:
mkdir ~/.pancake cd pancake cp pancake-expander/etc/expander.json ~/.pancake/ cp pancake-search/etc/search.json ~/.pancake/ cp pancake-social/etc/social.json ~/.pancake/ cp pancake-web/etc/web.json ~/.pancake/ cp pancake-user-apil/etc/user-api.json ~/.pancake/ cp fxhome-lattice/etc/lattice.json ~/.pancake/
Running Pancake
Execute each of the following run-*.sh scripts in a new terminal window:
cd pancake scripts/run-expander.sh scripts/run-lattice.sh scripts/run-search.sh scripts/run-social.sh scripts/run-user-api.sh scripts/run-web.sh
Pancake is now available and running on http://localhost:6543
Updating the project from version control
You can simply run a hg pull / hg update to pull in new code. You don't have to run the setup script again after that.
The servers are started with auto reloading of templates, statics and code but this might not always work. If in doubt just Control-C the script and start it again after changes.