Skip to content

Commit

Permalink
Merge branch 'master-chef-11.4' into master-chef-11.10
Browse files Browse the repository at this point in the history
  • Loading branch information
jbraeuer committed Mar 25, 2014
2 parents cdf044f + 2dcba05 commit 753fb92
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
3 changes: 3 additions & 0 deletions opsworks_initial_setup/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
default[:opsworks][:ruby_version] = '1.9.3'
default[:opsworks][:run_cookbook_tests] = false

default['opsworks_initial_setup']['swapfile_name'] = '/var/swapfile'
default['opsworks_initial_setup']['swapfile_size_mb'] = 256

default[:opsworks_initial_setup][:sysctl] = Mash.new
default[:opsworks_initial_setup][:sysctl]['net.core.somaxconn'] = 1024 # 128
default[:opsworks_initial_setup][:sysctl]['net.core.netdev_max_backlog'] = 3072 # 1000
Expand Down
1 change: 1 addition & 0 deletions opsworks_initial_setup/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include_recipe 'opsworks_initial_setup::swap' if node[:ec2] && node[:ec2][:instance_type] == 't1.micro'
include_recipe 'opsworks_initial_setup::sysctl'
include_recipe 'opsworks_initial_setup::limits'
include_recipe 'opsworks_initial_setup::bind_mounts'
Expand Down
21 changes: 21 additions & 0 deletions opsworks_initial_setup/recipes/swap.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
bash "create swap file #{node['opsworks_initial_setup']['swapfile_name']}" do
user 'root'
code <<-EOC
dd if=/dev/zero of=#{node['opsworks_initial_setup']['swapfile_name']} bs=1M count=#{node['opsworks_initial_setup']['swapfile_size_mb']}
mkswap #{node['opsworks_initial_setup']['swapfile_name']}
chown root:root #{node['opsworks_initial_setup']['swapfile_name']}
chmod 0600 #{node['opsworks_initial_setup']['swapfile_name']}
EOC
creates node['opsworks_initial_setup']['swapfile_name']
end

mount 'swap' do
action :enable
device node['opsworks_initial_setup']['swapfile_name']
fstype 'swap'
end

bash 'activate all swap devices' do
user 'root'
code 'swapon -a'
end
2 changes: 1 addition & 1 deletion passenger_apache2/attributes/passenger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
default[:passenger][:gems_path] = '/'
end

default[:passenger][:version] = '4.0.33'
default[:passenger][:version] = '4.0.39'
default[:passenger][:root_path] = "#{node[:passenger][:gems_path]}/passenger-#{passenger[:version]}"

if platform?('centos','redhat','fedora','amazon') and node[:packages][:dist_only]
Expand Down

0 comments on commit 753fb92

Please sign in to comment.