Browse files

setup basic worker vagrant box (no worker code yet)

  • Loading branch information...
1 parent 0ecb664 commit d6daec58f086cbce6538fffedf2345f4833fcebd @pitr pitr committed Nov 6, 2012
Showing with 43 additions and 45 deletions.
  1. +4 −2 Cheffile
  2. +17 −36 Cheffile.lock
  3. +2 −3 Vagrantfile
  4. +20 −4 chef/roles/worker.rb
View
6 Cheffile
@@ -4,6 +4,8 @@
site 'http://community.opscode.com/api/v1'
cookbook 'apt'
+cookbook 'build-essential'
cookbook 'git'
-cookbook 'chef-client'
-cookbook 'application'
+cookbook 'percona-install'
+cookbook 'redisio'
+cookbook 'rvm', :git => 'git://github.com/fnichol/chef-rvm.git', :ref => 'v0.9.0'
View
53 Cheffile.lock
@@ -1,52 +1,33 @@
SITE
remote: http://community.opscode.com/api/v1
specs:
- apache2 (1.1.16)
- application (1.0.2)
- apache2 (>= 0.0.0)
- gunicorn (>= 0.0.0)
- passenger_apache2 (>= 0.0.0)
- php (>= 0.0.0)
- python (>= 1.0.6)
- runit (>= 0.0.0)
- tomcat (>= 0.0.0)
- unicorn (>= 0.0.0)
- apt (1.4.8)
- build-essential (1.1.2)
- chef-client (1.2.0)
+ apt (1.5.0)
+ build-essential (1.2.0)
dmg (1.0.0)
git (1.0.2)
build-essential (>= 0.0.0)
dmg (>= 0.0.0)
runit (>= 0.0.0)
yum (>= 0.0.0)
- gunicorn (1.1.0)
- python (>= 0.0.0)
- java (1.6.0)
- mysql (1.3.0)
- build-essential (>= 0.0.0)
- openssl (>= 0.0.0)
- openssl (1.0.0)
- passenger_apache2 (1.0.0)
- apache2 (>= 1.0.4)
- build-essential (>= 0.0.0)
- php (1.1.0)
- build-essential (>= 0.0.0)
- mysql (>= 0.0.0)
- xml (>= 0.0.0)
- python (1.0.8)
- build-essential (>= 0.0.0)
- yum (>= 0.0.0)
+ percona-install (0.1.4)
+ redisio (1.1.0)
runit (0.15.0)
- tomcat (0.11.0)
- java (>= 0.0.0)
- unicorn (1.1.0)
- xml (1.0.4)
+ users (1.1.4)
yum (1.0.0)
+GIT
+ remote: git://github.com/fnichol/chef-rvm.git
+ ref: v0.9.0
+ sha: 4a408e5d6c5a52c37388a799c516430263339849
+ specs:
+ rvm (0.9.0)
+
DEPENDENCIES
- application (>= 0)
apt (>= 0)
- chef-client (>= 0)
+ build-essential (>= 0)
git (>= 0)
+ percona-install (>= 0)
+ redisio (>= 0)
+ rvm (>= 0)
+ users (>= 0)
View
5 Vagrantfile
@@ -6,10 +6,9 @@ Vagrant::Config.run do |config|
chef.roles_path = 'chef/roles'
chef.data_bags_path = 'chef/data_bags'
- chef.add_role 'sebastian'
- chef.add_role 'sebastian_run_migrations'
+ chef.add_role 'worker'
# You may also specify custom JSON attributes:
- chef.json = { :mysql_password => "foo" }
+ # chef.json = { :mysql_password => "foo" }
end
end
View
24 chef/roles/worker.rb
@@ -4,11 +4,27 @@
run_list(
"recipe[apt]",
+ "recipe[build-essential]",
"recipe[git]",
- "recipe[rbenv]",
- "recipe[application]"
+ "recipe[percona-install]",
+ "recipe[percona-install::server]",
+ "recipe[redisio::install]",
+ "recipe[rvm::system]",
+ "recipe[rvm::gem_package]",
+ "recipe[rvm::vagrant]"
)
-override_attributes(
- 'unicorn' => { 'port' => '80', 'worker_timeout' => 300 }
+default_attributes(
+ 'rvm' => {
+ 'default_ruby' => 'ruby-1.9.3-p286',
+ 'rubies' => ['ruby-1.9.3-p286'],
+
+ 'version' => '1.16.16', # rvm 1.16.17 is broken - https://github.com/fnichol/chef-rvm/issues/133
+ 'branch' => 'none'
+ },
+ 'authorization' => {
+ 'sudo' => {
+ 'users' => ['vagrant']
+ }
+ }
)

0 comments on commit d6daec5

Please sign in to comment.