Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #3073 from mozilla/django-upgrade-1116335
Browse files Browse the repository at this point in the history
Django upgrade
  • Loading branch information
jezdez committed Jun 9, 2015
2 parents c28d5a3 + c565bf9 commit ca49d1f
Show file tree
Hide file tree
Showing 12,148 changed files with 191,500 additions and 1,368,141 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 1 addition & 3 deletions .gitignore
Expand Up @@ -2,7 +2,6 @@
*.pyo
*.sw?
.vagrant
vagrantconfig_local.yaml
kuma.box
settings_local.py
pip-log.txt
Expand All @@ -22,13 +21,11 @@ media/sitemap*
static/
locale
xfers/*
puppet/cache/*
humans.txt
tmp
webroot/.htaccess
kumascript.log
kumascript_settings_local.json
lib/product_details_json
.DS_Store
node_modules/
media/css/*.css
Expand All @@ -39,3 +36,4 @@ james.ini
celeryev.pid
media/js/libs/ckeditor/source/ckbuilder
.tox
.env
61 changes: 41 additions & 20 deletions .gitmodules
Expand Up @@ -6,7 +6,7 @@
url = git://github.com/mozilla/basket-client.git
[submodule "vendor/src/bleach"]
path = vendor/src/bleach
url = git://github.com/lmorchard/bleach.git
url = git://github.com/jsocol/bleach.git
[submodule "vendor/src/commonware"]
path = vendor/src/commonware
url = git://github.com/jsocol/commonware.git
Expand All @@ -19,27 +19,15 @@
[submodule "vendor/src/django-appconf"]
path = vendor/src/django-appconf
url = git://github.com/jezdez/django-appconf.git
[submodule "vendor/src/django-badger"]
path = vendor/src/django-badger
url = git://github.com/mozilla/django-badger.git
[submodule "vendor/src/django-constance"]
path = vendor/src/django-constance
url = git://github.com/comoga/django-constance.git
[submodule "vendor/src/django-extensions"]
path = vendor/src/django-extensions
url = git://github.com/django-extensions/django-extensions.git
[submodule "vendor/src/django-grappelli"]
path = vendor/src/django-grappelli
url = git://github.com/sehmaschine/django-grappelli.git
[submodule "vendor/src/django-memcached-hashring"]
path = vendor/src/django-memcached-hashring
url = git://github.com/jezdez/django-memcached-hashring.git
[submodule "vendor/src/django-mozilla-product-details"]
path = vendor/src/django-mozilla-product-details
url = git://github.com/fwenzel/django-mozilla-product-details.git
[submodule "vendor/src/django-multidb-router"]
path = vendor/src/django-multidb-router
url = git://github.com/jbalogh/django-multidb-router.git
[submodule "vendor/src/django-nose"]
path = vendor/src/django-nose
url = git://github.com/django-nose/django-nose.git
Expand All @@ -60,7 +48,7 @@
url = git://github.com/lmorchard/django-teamwork.git
[submodule "vendor/src/django-tidings"]
path = vendor/src/django-tidings
url = git://github.com/erikrose/django-tidings.git
url = git://github.com/mozilla/django-tidings.git
[submodule "vendor/src/django-timezones"]
path = vendor/src/django-timezones
url = git://github.com/brosner/django-timezones.git
Expand All @@ -70,9 +58,6 @@
[submodule "vendor/src/elasticsearch-py"]
path = vendor/src/elasticsearch-py
url = git://github.com/elasticsearch/elasticsearch-py.git
[submodule "vendor/src/elasticsearch-dsl-py"]
path = vendor/src/elasticsearch-dsl-py
url = git://github.com/elasticsearch/elasticsearch-dsl-py.git
[submodule "vendor/src/hash_ring"]
path = vendor/src/hash_ring
url = git://github.com/Doist/hash_ring.git
Expand Down Expand Up @@ -106,9 +91,6 @@
[submodule "vendor/src/requests-oauthlib"]
path = vendor/src/requests-oauthlib
url = git://github.com/requests/requests-oauthlib.git
[submodule "vendor/src/simplejson"]
path = vendor/src/simplejson
url = git://github.com/simplejson/simplejson.git
[submodule "vendor/src/tower"]
path = vendor/src/tower
url = git://github.com/clouserw/tower.git
Expand Down Expand Up @@ -142,3 +124,42 @@
[submodule "vendor/src/django-ratelimit"]
path = vendor/src/django-ratelimit
url = git://github.com/jsocol/django-ratelimit.git
[submodule "vendor/src/django-taggit"]
path = vendor/src/django-taggit
url = git://github.com/alex/django-taggit.git
[submodule "vendor/src/django-product-details"]
path = vendor/src/django-product-details
url = git://github.com/mozilla/django-product-details.git
[submodule "vendor/src/django-debug-toolbar"]
path = vendor/src/django-debug-toolbar
url = git://github.com/django-debug-toolbar/django-debug-toolbar.git
[submodule "vendor/src/html5lib"]
path = vendor/src/html5lib
url = https://github.com/html5lib/html5lib-python
[submodule "vendor/src/pyquery"]
path = vendor/src/pyquery
url = https://github.com/gawel/pyquery
[submodule "vendor/src/py-amqp"]
path = vendor/src/py-amqp
url = https://github.com/celery/py-amqp
[submodule "vendor/src/cssselect"]
path = vendor/src/cssselect
url = https://github.com/SimonSapin/cssselect
[submodule "vendor/src/python-dateutil"]
path = vendor/src/python-dateutil
url = https://github.com/dateutil/dateutil
[submodule "vendor/src/sqlparse"]
path = vendor/src/sqlparse
url = https://github.com/andialbrecht/sqlparse
[submodule "vendor/src/werkzeug"]
path = vendor/src/werkzeug
url = https://github.com/mitsuhiko/werkzeug
[submodule "vendor/src/django-devserver"]
path = vendor/src/django-devserver
url = https://github.com/dcramer/django-devserver
[submodule "vendor/src/elasticsearch-dsl-py"]
path = vendor/src/elasticsearch-dsl-py
url = https://github.com/elastic/elasticsearch-dsl-py
[submodule "vendor/src/django-flat-theme"]
path = vendor/src/django-flat-theme
url = https://github.com/elky/django-flat-theme.git
23 changes: 10 additions & 13 deletions .travis.yml
@@ -1,28 +1,28 @@
cache:
- apt
- directories:
- ~/.cache/pip
- $HOME/.cache/pip
language: python
python:
- "2.6"
- "2.7"
services:
- memcached
env:
matrix:
- TOXENV=py26
- TOXENV=py27
- TOXENV=flake8
- TOXENV=docs
global:
- PIP_WHEEL_DIR=$HOME/.cache/pip/wheels
- PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels
- DJANGO_SETTINGS_MODULE=settings_travis
- DEBIAN_FRONTEND=noninteractive
before_install: scripts/travis-install
before_install:
- scripts/travis-install
- pip install -U pip
install:
- pip wheel -r requirements/compiled.txt -r requirements/dev.txt coveralls
- pip install coveralls tox==1.9.2
before_script: mysql -e 'create database kuma;'
script: tox -v
- pip install -r requirements/travis.txt
- if [[ $TOXENV == 'py27' ]]; then ansible-playbook -vvv --tags=mysql --connection=local --inventory-file=provisioning/inventory provisioning/travis.yml; fi
script:
- tox -v
after_success: coveralls
notifications:
irc:
Expand All @@ -31,6 +31,3 @@ notifications:
on_success: always
on_failure: always
use_notice: true
matrix:
allow_failures:
- env: TOXENV=flake8
6 changes: 3 additions & 3 deletions Procfile
@@ -1,5 +1,5 @@
web: find kuma -name '*.pyc' -exec rm {} \; && python2.6 manage.py runserver 0.0.0.0:8000
worker: python2.6 manage.py celery worker --events --beat --autoreload --concurrency=4
camera: python2.6 manage.py celerycam --freq=2.0
web: find kuma -name '*.pyc' -exec rm {} \; && python2.7 manage.py runserver 0.0.0.0:8000
worker: python2.7 manage.py celery worker --events --beat --autoreload --concurrency=4
camera: python2.7 manage.py celerycam --freq=2.0
kumascript: node kumascript/run.js
stylus: scripts/compile-stylesheets --watch
106 changes: 65 additions & 41 deletions Vagrantfile
@@ -1,58 +1,82 @@
require "yaml"

# Load up our vagrant config files -- vagrantconfig.yaml first
_config = YAML.load(File.open(File.join(File.dirname(__FILE__),
"vagrantconfig.yaml"), File::RDONLY).read)

# Local-specific/not-git-managed config -- vagrantconfig_local.yaml
begin
_config.merge!(YAML.load(File.open(File.join(File.dirname(__FILE__),
"vagrantconfig_local.yaml"), File::RDONLY).read))
rescue Errno::ENOENT # No vagrantconfig_local.yaml found -- that's OK; just
# use the defaults.
Vagrant.require_version ">= 1.7.2"

plugins = [
'vagrant-hostsupdater',
'vagrant-env',
'vagrant-vbguest',
'vagrant-cachier',
]
plugins.each do |plugin|
if !Vagrant.has_plugin?(plugin)
system("vagrant plugin install #{plugin}")
end
end

CONF = _config
if Vagrant::Util::Platform.windows?
NFS = false
else
NFS = (ENV['VAGRANT_NFS'] || 'true') == 'true'
end

Vagrant.configure("2") do |config|
config.vm.box = CONF['box']
config.vm.network :private_network, :ip => CONF['ip_address']
config.package.name = CONF['package_name']
config.vm.synced_folder ".", "/vagrant", :disabled => true
MEMORY_SIZE = (ENV['VAGRANT_MEMORY_SIZE'] || '2048').to_i
CPU_CORES = (ENV['VAGRANT_CPU_CORES'] || '2').to_i
IP = ENV['VAGRANT_IP'] || '192.168.10.55'
GUI = (ENV['VAGRANT_GUI'] || 'false') == 'true'
ANSIBLE_VERBOSE = (ENV['VAGRANT_ANSIBLE_VERBOSE'] || 'false') == 'true'

# nfs needs to be explicitly enabled to run.
if CONF['nfs'] == false or RUBY_PLATFORM =~ /mswin(32|64)/
config.vm.synced_folder ".", CONF['mount_point']
else
config.vm.synced_folder ".", CONF['mount_point'], :nfs => true
Vagrant.configure('2') do |config|
config.package.name = 'kuma-ubuntu.box'
config.vm.box = 'ubuntu/trusty64'
config.vm.define 'developer-local'
config.vm.network :private_network, ip: IP
config.vm.hostname = 'developer-local.allizom.org'
config.hostsupdater.aliases = ['mdn-local.mozillademos.org']
config.ssh.forward_agent = true
config.env.enable

config.cache.scope = :box
config.cache.auto_detect = false
config.cache.enable :apt
config.cache.enable :apt_lists
config.cache.enable :gem
config.cache.enable :generic, {
"pip" => { cache_dir: "/root/.cache/pip" },
"npm" => { cache_dir: "/root/.npm" },
"product_details" => { cache_dir: "/home/vagrant/product_details_json" },
}
if NFS
config.cache.synced_folder_opts = {
type: :nfs,
# The nolock option can be useful for an NFSv3 client that wants to avoid the
# NLM sideband protocol. Without this option, apt-get might hang if it tries
# to lock files needed for /var/cache/* operations. All of this can be avoided
# by using NFSv4 everywhere. Please note that the tcp option is not the default.
mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
}
end

# nfs needs to be explicitly enabled to run.
config.vm.synced_folder '.', '/vagrant', :disabled => true
config.vm.synced_folder '.', '/home/vagrant/src', :nfs => NFS

config.vm.provider :virtualbox do |vb, override|
vb.customize ["modifyvm", :id, "--memory", CONF['memory_size']]
vb.customize ['modifyvm', :id, '--ostype', 'Ubuntu']
vb.customize ['modifyvm', :id, '--cpus', CONF['number_cpus']]
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ['modifyvm', :id, '--ioapic', 'on']
vb.customize ['modifyvm', :id, '--memory', MEMORY_SIZE]
vb.customize ['modifyvm', :id, '--cpus', CPU_CORES]

# This thing can be a little hungry for memory
# uncomment to enable VM GUI console, mainly for troubleshooting
if CONF['gui'] == true
if GUI
vb.boot_mode = :gui
end
end

config.vm.provision :shell do |shell|
shell.inline = "wget -O /tmp/puppetlabs-release-precise.deb https://apt.puppetlabs.com/puppetlabs-release-precise.deb;
dpkg -i /tmp/puppetlabs-release-precise.deb;
apt-get update;
apt-get --assume-yes install facter=1.7.6-1puppetlabs1 puppet=2.7.26-1puppetlabs1 puppet-common=2.7.26-1puppetlabs1;
mkdir -p /etc/puppet/modules;
puppet module install -f puppetlabs-stdlib;
puppet module install -f --version 1.8.0 puppetlabs-apt;
puppet module install -f --version 0.4.0 elasticsearch-elasticsearch"
end

config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "dev-vagrant.pp"
config.vm.provision :ansible do |ansible|
ansible.playbook = 'provisioning/vagrant.yml'
ansible.sudo = true
if ANSIBLE_VERBOSE
ansible.verbose = 'vvvv'
end
end
end

0 comments on commit ca49d1f

Please sign in to comment.