Creates a virtual machine using Vagrant and Puppet to develop Django apps. You can either use it with an existing Django project or to create a new one.
You can customize the following parameters in Vagrantfile:
project_name=> Defaults todjangoprojectdjango_dir=> Defaults to/home/vagrant/djangoprojectdjango_url=> Defaults todjangoproject.localdb_username=> Defaults todjangodb_password=> Defaults todjangodb_name=> Defaults todjangodb_root_password=> Defaults tosecure
If you don't place an existing project within django_dir, it'll create a new project.
- Install Vagrant & VirtualBox
- Clone this repository including all submodules (
git clone --recursive https://github.com/tsteur/django-dev-vm.git) - Execute the command
vagrant up - It'll take some time when executing this command the first time. It'll download the Vagrant base box once and install all required packages afterwards.
- Log in to your VM via
vagrant ssh. - Make sure
djangoproject/djangoproject/settings.pymatches your database connection settings - Next execute
python manage.py syncdbandpython ./manage.py collectstaticwithin your Django project folder - Start the development web server
cd ~/djangoproject && sudo python manage.py runserver djangoproject.local:80 - Don't forget to update your local hosts file.
192.168.33.20 djangoproject.local
- Ubuntu Precise 64 Bit (12.04)
- MySQL + Percona Toolkit
- Memcached
- Python including Django, Grappelli, Johnny Cache, Pil, django-tastypie, django-evolution, django-debug-toolbar and django-snippetscream
- apache2-utils
- Subversion
- Git
- puppetlabs-mysql - https://github.com/puppetlabs/puppetlabs-mysql
- puppetlabs-stdlib - https://github.com/puppetlabs/puppetlabs-stdlib