Created
September 15, 2016 02:52
-
-
Save adngdb/0cf0a3145c460799377330df7d7f649c to your computer and use it in GitHub Desktop.
A shell script to install a local Socorro dev environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script config | |
WORKSPACE=~/mozilla/workspace | |
GITHUB_USER=adngdb | |
# Secrets | |
DATABASE_PASSWORD= | |
BOTO_SECRET_ACCESS_KEY= | |
BOTO_ACCESS_KEY= | |
# Requirements | |
# * git | |
# * virtualenv | |
# ==== Common steps | |
cd $WORKSPACE | |
git clone [email protected]:$GITHUB_USER/socorro | |
cd socorro | |
git remote add mozilla [email protected]:mozilla/socorro | |
virtualenv -p /usr/bin/python2.7 socorro-virtualenv | |
. socorro-virtualenv/bin/activate | |
# ==== Install the Web app | |
# Install all needed dependencies for python libraries. | |
sudo apt-get install libpq-dev libxslt-dev libsasl2-dev libffi-dev | |
# Install all python requirements. | |
pip install -r requirements.txt | |
# Install the socorro package locally, so the webapp can access it. | |
pip install -e . | |
# Install django specific requirements. | |
cd webapp-django | |
npm install | |
# Collect static files for tests to run faster. | |
./manage.py collectstatic --noinput | |
./manage.py migrate | |
# Run webapp tests to ensure all is good. | |
./manage.py test | |
echo "DEBUG=True | |
CACHE_BACKEND=django.core.cache.backends.locmem.LocMemCache | |
DATABASE_URL=postgres://breakpad_rw:$DATABASE_PASSWORD@localhost:5433/breakpad | |
DEBUG=True | |
DEFAULT_PRODUCT=Firefox | |
ELASTICSEARCH_URLS=http://localhost:9222 | |
MWARE_BASE_URL=http://localhost:8883 | |
resource.boto.secret_access_key=$BOTO_SECRET_ACCESS_KEY | |
resource.boto.access_key=$BOTO_ACCESS_KEY | |
resource.boto.bucket_name=org.allizom.crash-stats.rhelmer-test.crashes" > .env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment