Created
May 11, 2013 19:45
-
-
Save itsNikolay/5561173 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#^syntax detection | |
site 'http://community.opscode.com/api/v1' | |
cookbook "apt" | |
cookbook "build-essential", {} | |
cookbook "rvm", {:github=>"fnichol/chef-rvm", :ref=>"v0.9.0"} | |
cookbook "git", {} | |
cookbook "postgresql", {} | |
cookbook "nginx", {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "precise32" | |
config.vm.box_url = "/home/itsnikolay/Vagrant/precise32.box" | |
config.ssh.forward_agent = true | |
config.vm.provision :chef_solo do |chef| | |
chef.cookbooks_path = ["chief/cookbooks"] | |
chef.add_recipe :apt | |
chef.add_recipe 'rvm::vagrant' | |
chef.add_recipe 'rvm::system' | |
chef.add_recipe 'git' | |
chef.add_recipe 'postgresql::server' | |
chef.add_recipe 'nginx' | |
chef.json = { | |
:git => { | |
:prefix => "/usr/local" | |
}, | |
:postgresql => { | |
:config => { | |
:listen_addresses => "*", | |
:port => "5432" | |
}, | |
:pg_hba => [ | |
{ | |
:type => "local", | |
:db => "postgres", | |
:user => "postgres", | |
:addr => nil, | |
:method => "trust" | |
}, | |
{ | |
:type => "host", | |
:db => "all", | |
:user => "all", | |
:addr => "0.0.0.0/0", | |
:method => "md5" | |
}, | |
{ | |
:type => "host", | |
:db => "all", | |
:user => "all", | |
:addr => "::1/0", | |
:method => "md5" | |
} | |
], | |
:password => { | |
:postgres => "password" | |
} | |
}, | |
:nginx => { | |
:dir => "/etc/nginx", | |
:log_dir => "/var/log/nginx", | |
:binary => "/usr/sbin/nginx", | |
:user => "www-data", | |
:init_style => "runit", | |
:pid => "/var/run/nginx.pid", | |
:worker_connections => "1024" | |
} | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment