Permalink
Browse files

Extracted Python requirements to external file + updated Vagranfile t…

…o v2 + moved Vagrant stuff to extras/vagrant
  • Loading branch information...
1 parent 3b3a98e commit 9efa8c05068d6938b190cab52001086106395bf8 dot2code Technologies committed Nov 27, 2013
View
@@ -1,3 +1,8 @@
+v0.5.3, 27/11/2013
+------------------
+
+ - Improved/updated infrastructure (setup.py, Puppet manifest, etc.).
+
v0.5.2, 25/11/2013
------------------
View
@@ -1,24 +1,28 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
-Vagrant::Config.run do |config|
+Vagrant.configure('2') do |config|
config.vm.box = 'precise64'
- config.vm.host_name = 'dev'
+ config.vm.hostname = 'dev'
config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
- config.vm.provision :puppet do |puppet|
- puppet.manifests_path = 'vagrant/manifests'
+ config.vm.provider :virtualbox do |vb|
+ vb.customize [
+ 'modifyvm', :id,
+ '--memory', '512',
+ '--name', 'Varnish Bans Manager',
+ ]
end
- config.vm.customize [
- 'modifyvm', :id,
- '--memory', '512',
- '--name', 'Varnish Bans Manager',
- ]
+ config.vm.provision :puppet do |puppet|
+ puppet.manifests_path = 'extras/vagrant/manifests'
+ end
# /etc/hosts
# 192.168.100.102 vbm.d2c.dev
- config.vm.forward_port 9000, 9000
- config.vm.network :hostonly, '192.168.100.102'
- config.vm.network :bridged
+ config.vm.network :forwarded_port, guest: 9000, host: 9000
+ config.vm.network :private_network, ip: '192.168.100.102'
+ config.vm.network :public_network
+
+ config.vm.synced_folder '.', '/vagrant', :nfs => true
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,73 @@
+# Gunicorn HTTP server settings. Check out Gunicorn documentation
+# (http://docs.gunicorn.org/en/latest/configure.html) for further
+# details and for a full list of options. Note that 'debug' and
+# 'secure_scheme_headers' Gunicorn settings will always be overriden
+# by VBM internal settings.
+[http]
+bind: 0.0.0.0:9000
+worker_class: eventlet
+forwarded_allow_ips: 127.0.0.1
+x_forwarded_for_header: X-FORWARDED-FOR
+
+# SSL settings. Enable SSL only for proxied VBM deployments.
+[ssl]
+enabled: false
+secure_proxy_ssl_header_name: HTTP_X_FORWARDED_PROTO
+secure_proxy_ssl_header_value: https
+
+# Relational database settings. Check out Django documentation for
+# more information about alternative database engines (PostgreSQL,
+# Oracle, etc.).
+[database]
+engine: django.db.backends.mysql
+name: varnish_bans_manager
+user: bob
+password: s3cr3t
+host: 127.0.0.1
+port: 3306
+
+# Filesytem settings. VBM internally generated files and user
+# uploaded files will be stored in some folder inside the
+# 'root' path.
+#
+# Publicly accessible files will be stored under 'root'/public/,
+# so, when using a reverse proxy, remember to setup it to serve
+# those files directly.
+#
+# Files under 'root'/private/ and 'root'/temporary/ require some
+# app-level access control checks. Never serve those files
+# directly from the reverse proxy.
+#
+# Depending on what reverse proxy you are using, you can boost
+# performance using the adequate sendfile backend:
+#
+# nginx: varnish_bans_manager.filesystem.sendfile_backends.nginx
+# Apache: varnish_bans_manager.filesystem.sendfile_backends.xsendfile
+[filesystem]
+root: /vagrant/files/
+sendfile: varnish_bans_manager.filesystem.sendfile_backends.stream
+
+# Mailing settings.
+[email]
+host: 127.0.0.1
+port: 25
+from: noreply@varnish-bans-manager.domain.com
+subject_prefix: [VBM]
+notifications: cabalde@dot2code.com
+
+# i18n settings. English (en) and Spanish (es) are the available
+# languages at the moment.
+[i18n]
+default: en
+
+# Misc settings.
+[misc]
+# Service timezone.
+timezone: Europe/Madrid
+
+# Internal secret key.
+secret_key: Fgebt?qVUNr41mQ9OEmi8)z6yzy&?(>.7kZ+7$9p}Pl|0E=:2qM1aW|VRdMz{_gQ
+
+# For development purposes only. Always keep this value to false, or,
+# even better, remove it from the configuration file.
+development: true
View
@@ -0,0 +1,12 @@
+django >= 1.5,<1.6
+django-celery >= 3.0.11
+django-mediagenerator >= 1.11
+django-templated-email >= 0.4.7
+gunicorn >= 0.14.6
+eventlet >= 0.9.17
+simplejson >= 2.1.6
+path.py >= 2.4.1
+ordereddict >= 1.1
+south >= 0.7.6
+pytz
+pil
View
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-"""
+'''
Varnish Bans Manager
====================
@@ -11,14 +11,27 @@
:copyright: (c) 2012 by the dot2code Team, see AUTHORS.txt for more details.
:license: GPL, see LICENSE.txt for more details.
-"""
+'''
from __future__ import absolute_import
+import sys
+import os
from setuptools import setup, find_packages
+if sys.version_info < (2, 7):
+ raise Exception('VBM requires Python 2.7 or higher.')
+
+with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt')) as file:
+ install_requires = file.read().splitlines()
+
+extra = {}
+
+if sys.version_info[0] == 3:
+ extra['use_2to3'] = True
+
setup(
name='varnish-bans-manager',
- version='0.5.2',
+ version='0.5.3',
author='dot2code Technologies',
author_email='info@dot2code.com',
packages=find_packages(),
@@ -38,18 +51,6 @@
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
],
- install_requires=[
- "django >= 1.5,<1.6",
- "django-celery >= 3.0.11",
- "django-mediagenerator >= 1.11",
- "django-templated-email >= 0.4.7",
- "gunicorn >= 0.14.6",
- "eventlet >= 0.9.17",
- "simplejson >= 2.1.6",
- "path.py >= 2.4.1",
- "ordereddict >= 1.1",
- "pytz",
- "pil",
- "south >= 0.7.6",
- ],
+ install_requires=install_requires,
+ **extra
)

0 comments on commit 9efa8c0

Please sign in to comment.