Skip to content

Commit 3fca127

Browse files
committed
Add Vagrant machine
* Remove accidentally commmitted module code * Adjust gitignore files * Add MakeFile target for pulling down puppet modules * Add settings file for MySQL/Postgres
1 parent a986bc5 commit 3fca127

25 files changed

+62
-333
lines changed

.gitignore

+7-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ oscar/share
1717
.~lock.*
1818
dist/
1919
*.DS_Store
20-
sites/sandbox/*.sqlite
21-
sites/sandbox/public/
22-
sites/sandbox/whoosh_index/
23-
sites/demo/*.sqlite
24-
sites/demo/public/
25-
sites/demo/whoosh_index/
2620
.idea
2721
TODO
2822
.coverage
@@ -34,3 +28,10 @@ coverage.xml
3428
violations.txt
3529
nosetests.xml
3630
settings_local.py
31+
.vagrant
32+
sites/sandbox/*.sqlite
33+
sites/sandbox/public/
34+
sites/sandbox/whoosh_index/
35+
sites/demo/*.sqlite
36+
sites/demo/public/
37+
sites/demo/whoosh_index/

.vagrant

-1
This file was deleted.

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,10 @@ i18n:
3838
../sites/sandbox/manage.py makemessages --ignore=sandbox/ --locale=ru; \
3939
../sites/sandbox/manage.py makemessages --ignore=sandbox/ --locale=es; \
4040
../sites/sandbox/manage.py makemessages --ignore=sandbox/ --locale=it; \
41-
../sites/sandbox/manage.py makemessages --ignore=sandbox/ --locale=da
41+
../sites/sandbox/manage.py makemessages --ignore=sandbox/ --locale=da
42+
43+
puppet:
44+
# Install puppet modules required to set-up a Vagrant box
45+
puppet module install --target-dir sites/puppet/modules/ saz-memcached -v 2.0.2
46+
git clone git://github.com/uggedal/puppet-module-python.git sites/puppet/modules/python
47+
git clone git://github.com/codeinthehole/puppet-userconfig.git sites/puppet/modules/userconfig

Vagrantfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
#
4+
# Before bringing up your Vagrant machine, run:
5+
#
6+
# make puppet
7+
#
8+
# to fetch the puppet modules required to build the VM.
9+
10+
Vagrant::Config.run do |config|
11+
config.vm.box = "precise64"
12+
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
13+
config.vm.forward_port 8000, 8080
14+
#config.vm.boot_mode = :gui
15+
config.vm.provision :puppet do |puppet|
16+
puppet.manifests_path = "sites/puppet/manifests"
17+
puppet.manifest_file = "site.pp"
18+
puppet.module_path = "sites/puppet/modules"
19+
#puppet.options = "--debug"
20+
end
21+
end

setup.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,19 @@
88
"""
99

1010
from setuptools import setup, find_packages
11+
import os
1112

1213
from oscar import get_version
1314

15+
PROJECT_DIR = os.path.dirname(__file__)
1416

1517
setup(name='django-oscar',
1618
version=get_version().replace(' ', '-'),
1719
url='https://github.com/tangentlabs/django-oscar',
1820
author="David Winterbottom",
1921
author_email="[email protected]",
2022
description="A domain-driven e-commerce framework for Django 1.3+",
21-
long_description=open('README.rst').read(),
23+
long_description=open(os.path.join(PROJECT_DIR, 'README.rst')).read(),
2224
keywords="E-commerce, Django, domain-driven",
2325
license='BSD',
2426
platforms=['linux'],

sites/puppet/manifests/site.pp

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@
1010
class {"memcached": max_memory => 64 }
1111

1212
# Python
13+
# - set-up a virtualenv
14+
# - install testing requirements
15+
# - install oscar in 'develop' mode
1316
$virtualenv = "/var/www/virtualenv"
1417
include python::dev
1518
include python::venv
1619
python::venv::isolate { $virtualenv:
1720
requirements => "/vagrant/requirements.txt"
1821
}
1922
exec {"install-oscar":
20-
command => "$virtualenv/bin/python /vagrant/setup.py develop",
23+
command => "cd /vagrant && $virtualenv/bin/python setup.py develop",
2124
require => Python::Venv::Isolate[$virtualenv]
2225
}
2326
}

sites/puppet/modules/memcached/Modulefile

-8
This file was deleted.

sites/puppet/modules/memcached/README-DEVELOPER

-9
This file was deleted.

sites/puppet/modules/memcached/README.md

-29
This file was deleted.

sites/puppet/modules/memcached/Rakefile

-17
This file was deleted.

sites/puppet/modules/memcached/manifests/init.pp

-33
This file was deleted.

sites/puppet/modules/memcached/manifests/params.pp

-21
This file was deleted.

sites/puppet/modules/memcached/metadata.json

-31
This file was deleted.

sites/puppet/modules/memcached/spec/classes/memcached_spec.rb

-101
This file was deleted.

sites/puppet/modules/memcached/spec/fixtures/manifests/site.pp

Whitespace-only changes.

sites/puppet/modules/memcached/spec/spec.opts

-6
This file was deleted.

sites/puppet/modules/memcached/spec/spec_helper.rb

-13
This file was deleted.

0 commit comments

Comments
 (0)