-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathVagrantfile-build
57 lines (49 loc) · 2.38 KB
/
Vagrantfile-build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.host_name = "djangocore"
config.vm.customize ['modifyvm', :id, '--memory', '2048']
config.ssh.forward_agent = true
# Shared folders
hosthome = "#{ENV['HOME']}/"
config.vm.share_folder("v-djangocore-box", "/djangocore-box", ".", :nfs => true)
config.vm.share_folder("v-django", "/django", "../django", :nfs => true)
config.vm.share_folder("v-hosthome", "/home/vagrant/.hosthome", hosthome)
# Host-only network required to use NFS shared folders
config.vm.network :hostonly, "1.2.3.4"
# Provisioning -------------------------------------------------------------
config.vm.provision :shell, :inline => "/djangocore-box/provisioning/shell/install-chef.sh 10.16.2"
config.vm.provision :shell, :inline => "su vagrant -c /djangocore-box/provisioning/shell/init-system.sh"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "provisioning/chef"
chef.log_level = :debug
chef.run_list = [
"recipe[git]",
"recipe[openssl]",
"recipe[memcached]",
"recipe[mysql]",
"recipe[mysql::client]",
"recipe[mysql::server]",
"recipe[postgresql]",
"recipe[postgresql::client]",
"recipe[postgresql::server]"]
chef.json.merge!({
:mysql => {
:server_root_password => 'secret',
:server_repl_password => 'secret',
:server_debian_password => 'secret',
:bind_address => '127.0.0.1'
},
:postgresql => {
:password => { :postgres => 'secret' },
:listen_addresses => '*'
}})
end
config.vm.provision :shell, :inline => "su vagrant -c '/djangocore-box/provisioning/shell/install-python.sh 2.4 2.5 2.6 2.7 3.3'"
config.vm.provision :shell, :inline => "su vagrant -c /djangocore-box/provisioning/shell/install-gis.sh"
config.vm.provision :shell, :inline => "su vagrant -c '/djangocore-box/provisioning/shell/install-pysqlite.sh 2.4 2.5 2.6 2.7'" # pysqlite isn't Python 3 compatible
config.vm.provision :shell, :inline => "su vagrant -c /djangocore-box/provisioning/shell/create-databases.sh"
config.vm.provision :shell, :inline => "su vagrant -c /djangocore-box/provisioning/shell/virtual-display.sh"
end