Skip to content

Commit

Permalink
Bug 1144669: Update deployment for peep dependencies.
Browse files Browse the repository at this point in the history
Fix CI and C9 and add relocatable to deployment
  • Loading branch information
pmac committed Apr 14, 2015
1 parent 2eebfd6 commit ec97cca
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "vendor-local/src/legal-docs"]
path = vendor-local/src/legal-docs
url = git://github.com/mozilla/legal-docs.git
url = https://github.com/mozilla/legal-docs.git
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -23,7 +23,8 @@ script: coverage run manage.py test
before_install:
- git submodule update --init --recursive
install:
- pip install -r requirements/dev.txt
- python bin/peep.py install -r requirements/dev.txt --no-use-wheel
- python bin/peep.py install -r requirements/prod.txt --no-use-wheel
after_success:
- pip install coveralls
- coveralls
Expand Down
5 changes: 3 additions & 2 deletions bin/install-c9
Expand Up @@ -3,8 +3,9 @@ cd $(readlink --canonicalize --no-newline ${0%/*})/..
git submodule update --init --recursive
sudo apt-get update
sudo apt-get install -y libmysqlclient-dev libxml2-dev libxslt1-dev python-dev
sudo pip install -r requirements/dev.txt
sudo pip uninstall -y django # included as submodule, we do not want the one installed by django-nose requirements
sudo python bin/peep.py install -r requirements/dev.txt --no-use-wheel
# mysql in the prod requirements
sudo python bin/peep.py install -r requirements/prod.txt --no-use-wheel
sudo pip install ipython # highly recommended, but not required so not in requirements/dev.txt
# default npm install -g destination in c9 is in /home/ubuntu/.nvm/v0.10.28/
npm install -g less
Expand Down
13 changes: 9 additions & 4 deletions bin/update/deploy_base.py
Expand Up @@ -14,7 +14,7 @@
import commander_settings as settings


PYTHON = getattr(settings, 'PYTHON_PATH', 'python2.6')
PYTHON = settings.PYTHON_PATH
NEW_RELIC_API_KEY = getattr(settings, 'NEW_RELIC_API_KEY', None)
NEW_RELIC_APP_ID = getattr(settings, 'NEW_RELIC_APP_ID', None)
NEW_RELIC_URL = 'https://rpm.newrelic.com/deployments.xml'
Expand Down Expand Up @@ -78,8 +78,10 @@ def update_code(ctx, tag):
with ctx.lcd(settings.SRC_DIR):
ctx.local("git fetch --all")
ctx.local("git checkout -f %s" % tag)
ctx.local(peep_install_cmd('prod'))
ctx.local(peep_install_cmd('compiled'))
# keeping submodule handling for now because legal-docs
# TODO delete next two lines when all submodules are gone
ctx.local("git submodule sync")
ctx.local("git submodule update --init --recursive")
ctx.local("find . -name '*.pyc' -delete")


Expand Down Expand Up @@ -139,7 +141,10 @@ def update_info(ctx):
def peep_install(ctx):
"""Install things using peep."""
with ctx.lcd(settings.SRC_DIR):
ctx.local('../venv/bin/peep install -r requirements/compiled.txt')
ctx.local(peep_install_cmd('prod'))
# update any newly installed libs to be relocatable
# this call is idempotent
ctx.local('virtualenv-2.7 --relocatable ../venv')


@task
Expand Down
7 changes: 7 additions & 0 deletions requirements/base.txt
@@ -1,7 +1,9 @@
# sha256: byzISLK3Kt9TpvPyG-BJxHfoLECLznzttX7-sJhL3iQ
# sha256: flDlc-SEQ1hzs1FdeYLYAJOyaVq6F_0P8CQwdFTcOlY
Django==1.6.11

# sha256: 4h6LijS01EbJtWCQ4yh847Y9GuHPbe8ejb-Ij0DkbMw
# sha256: Vibe-NP1i9L1ne67vn7-KckiAGpFFQblwH3VtKSQ_8M
django-pipeline==1.4.7

# sha256: QZSbCQMWEXmRNuAZFouE617Ymcjk5pIRfS04UEZZ_RY
Expand All @@ -17,12 +19,14 @@ jingo-markdown==1.3
django-statsd-mozilla==0.3.14

# sha256: eI_6Kd-3VJAOCLkIgffqFsPCXKKUlUjup7Q9LKc54z8
# sha256: -65f6zOuk5TCdbyDSrlGhLlN4DrMjzY4e9C_DFHvKO4
statsd==3.1

# sha256: w2yTiocuX_SUk4szsUqqFWy0OexnVI_Ks1Nbt4sIRug
PyYAML==3.11

# sha256: n9IrNUpMR1WtjH0WHZP1AmrKTP6Zm9LlMWjxR2XALNY
# sha256: FRwFcXNHSjpA-JcWWVHA4zrQTzfeZbbeVH3e8Qf9DtM
futures==2.2.0

# sha256: G1VbiogAE0_a_jK30MtS9b2_3Qk3B8PdSExepZ8dmLc
Expand Down Expand Up @@ -53,9 +57,11 @@ django-recaptcha==1.0.3
django-picklefield==0.3.1

# sha256: KuY89HXwvQSbci-sIIE9Yq7cFJV91aO_ANEg0rVARGA
# sha256: PpVEXB21AKNEB5pHsXHEXvGPV9GI3_2w5BZccb6o6z0
python-dateutil==2.4.2

# sha256: QYqTw5en7asj5ViNvAZ6x0pyPts9VBvUk295R252Rdo
# sha256: 4kBSQR_E-9H2cmNVN8P8IzDZSBsYwDF2lbRiWVEskdU
six==1.9.0

# sha256: zDw_3qAwgTFur-9mCWjpgeBBi20qlgago_6FA2NDhsg
Expand All @@ -68,6 +74,7 @@ cef==0.5
django-session-csrf==0.5

# sha256: Pk2AGZlglZuCiVGqJMv6o2zr7RSdzXKMEehVeYsV-HA
# sha256: 2slBnbPs4nu1PHQzJD_CLtQs9o3p1sQSk5Dh2a7-YxA
whitenoise==1.0.6

# sha256: 02C9MYmPnfWfb6p4ZVEGW7pFs15-48ObOBtPv-9zkvQ
Expand Down
4 changes: 4 additions & 0 deletions requirements/dev.txt
Expand Up @@ -7,6 +7,7 @@
Sphinx==1.0.7

# sha256: CjoiZeHvsN76ci0fQpcw3J35da3DxgrH0rQyvfA8BB0
# sha256: cyCRkITm2sj0VAY4pGRHo71zD8oXKvwX0sA-7SLPT1E
Pygments==2.0.2

# sha256: x9txeBCraWX2bIzwOYqYydjfmC2jm0zX8WKRHriVlvo
Expand All @@ -18,12 +19,15 @@ docutils==0.12
flake8==2.0

# sha256: ic9r9P9kT_i5EuL6fiq7aNV6jn6Rjjk8coQNMNLrzws
# sha256: PYypv2XFAU9GkYBUTR3Vu1ud9wmq1jBPnC5DcK4Ke3w
mccabe==0.3

# sha256: SqEp342QB7GSv4IBP0FVM5lGUtfKqTDQAmh-tCpsKkE
# sha256: uLfjVjC1U54moZffxgBb6eHpoTVJazd3I6jrwBuby_8
pep8==1.6.2

# sha256: rEVxaVwQzhU2vNuhopS58tPmzJ0OoXG2fVCghkzj4EI
# sha256: P6gKELNtUWhr93RPXcmWIs1cmM6O1kAi5imGiq_Bd2k
pyflakes==0.8.1

# sha256: D41ubgIjuPsEEUtKcgk4DhrPJ-Ch3Rq5j-zghafDxSU
Expand Down
7 changes: 6 additions & 1 deletion scripts/update_tableau_data.py
Expand Up @@ -3,7 +3,12 @@

from django.conf import settings

import MySQLdb
try:
import MySQLdb
except ImportError:
# not everyone needs the mysql lib, but this function needs it.
# we'll pass here and fail later so tests can work.
MySQLdb = None

from bedrock.mozorg.models import ContributorActivity

Expand Down

0 comments on commit ec97cca

Please sign in to comment.