Skip to content

Commit

Permalink
Merge pull request #179 from basho-labs/tuning-refactor
Browse files Browse the repository at this point in the history
Tuning refactor
  • Loading branch information
Seth Thomas committed Jul 2, 2015
2 parents ee92ebf + a267b95 commit 40c8628
Show file tree
Hide file tree
Showing 7 changed files with 227 additions and 96 deletions.
86 changes: 46 additions & 40 deletions .kitchen.cloud.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
<%
version = '2.1.1'
split = version.split('.')
maj = split[0]
min = split[1]
inc = split[2]
url = "http://s3.amazonaws.com/downloads.basho.com/riak/#{maj}.#{min}"
%>
---

provisioner:
name: chef_zero
require_chef_omnibus: latest
require_chef_omnibus: 12.3.0

platforms:
- name: amazon-2014.09.01
driver:
name: ec2
image_id: ami-9a6ed3f2
image_id: ami-5ba7ea6b
transport:
username: ec2-user
ssh_key: <%= ENV["EC2_SSH_KEY_PATH"] %>
run_list:
Expand All @@ -17,47 +26,47 @@ platforms:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/rhel/6"
url: "<%= url %>/<%= version %>/rhel/6"
- name: ubuntu-14-04-x64
driver:
name: digitalocean
run_list:
- recipe[apt]
attributes:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/ubuntu/trusty"
run_list:
- recipe[apt]
url: "<%= url %>/<%= version %>/ubuntu/trusty"
- name: ubuntu-12-04-x64
driver:
name: digitalocean
run_list:
- recipe[apt]
attributes:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/ubuntu/precise"
run_list:
- recipe[apt]
url: "<%= url %>/<%= version %>/ubuntu/precise"
- name: debian-7-0-x64
driver:
name: digitalocean
run_list:
- recipe[apt]
attributes:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/debian/7"
run_list:
- recipe[apt]
url: "<%= url %>/<%= version %>/debian/7"
- name: centos-7-0-x64
driver:
name: digitalocean
run_list:
- recipe[yum-epel]
attributes:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/rhel/7"
run_list:
- recipe[yum-epel]
url: "<%= url %>/<%= version %>/rhel/7"
- name: centos-6-5-x64
driver:
name: digitalocean
Expand All @@ -67,7 +76,7 @@ platforms:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/rhel/6"
url: "<%= url %>/<%= version %>/rhel/6"
- name: centos-5-8-x64
driver:
name: digitalocean
Expand All @@ -77,71 +86,68 @@ platforms:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/rhel/5"
- name: fedora-19-x64
driver:
name: digitalocean
attributes:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/fedora/19"
provisioner:
root_path: /home/vagrant/kitchen
url: "<%= url %>/<%= version %>/rhel/5"

suites:
- name: default
run_list:
- recipe[riak::sysctl]
- recipe[riak]
attributes:
riak:
package:
local:
filename: ""
version:
major: "2"
minor: "1"
incremental: "1"
major: <%= maj %>
minor: <%= min %>
incremental: <%= inc %>
- name: search
run_list:
- recipe[riak::sysctl]
- recipe[riak]
attributes:
riak:
manage_java: true
package:
version:
major: "2"
minor: "1"
incremental: "1"
major: <%= maj %>
minor: <%= min %>
incremental: <%= inc %>
config:
search.top_level: "on"
excludes: ["freebsd-10.1", "freebsd-9.2"]
- name: enterprise
run_list:
- recipe[riak::sysctl]
- recipe[riak]
attributes:
riak:
package:
version:
major: "2"
minor: "1"
incremental: "1"
major: <%= maj %>
minor: <%= min %>
incremental: <%= inc %>
local:
url: ""
enterprise_key: <%= (ENV["RIAK_ENTERPRISE_KEY"].nil? ? "" : ENV["RIAK_ENTERPRISE_KEY"]) %>
- name: custom_package
run_list:
- recipe[riak::sysctl]
- recipe[riak]
attributes:
riak:
install_method: "custom_package"
- name: source
run_list:
- recipe[riak::sysctl]
- recipe[riak]
attributes:
riak:
install_method: "source"
source:
major: "2"
minor: "1"
incremental: "1"
major: <%= maj %>
minor: <%= min %>
incremental: <%= inc %>
- name: sysctl
run_list:
- recipe[riak::sysctl]
74 changes: 42 additions & 32 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
<%
version = '2.1.1'
split = version.split('.')
maj = split[0]
min = split[1]
inc = split[2]
url = "http://s3.amazonaws.com/downloads.basho.com/riak/#{maj}.#{min}"
%>
---
driver:
name: vagrant
require_chef_omnibus: true
require_chef_omnibus: 12.3.0
customize:
memory: 512

Expand All @@ -16,55 +24,47 @@ platforms:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/ubuntu/trusty"
url: "<%= url %>/<%= version %>/ubuntu/trusty"
- name: ubuntu-12.04
run_list:
- recipe[apt]
attributes:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/ubuntu/precise"
url: "<%= url %>/<%= version %>/ubuntu/precise"
- name: debian-7.8
run_list:
- recipe[apt]
attributes:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/debian/7"
- name: centos-7.0
url: "<%= url %>/<%= version %>/debian/7"
- name: centos-7.1
run_list:
- recipe[yum-epel]
attributes:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/rhel/7"
url: "<%= url %>/<%= version %>/rhel/7"
- name: centos-6.6
run_list:
- recipe[yum-epel]
attributes:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/rhel/6"
url: "<%= url %>/<%= version %>/rhel/6"
- name: centos-5.11
run_list:
- recipe[yum-epel]
attributes:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/rhel/5"
- name: fedora-19
attributes:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/fedora/19"
provisioner:
root_path: /home/vagrant/kitchen
url: "<%= url %>/<%= version %>/rhel/5"
- name: freebsd-10.1
driver:
guest: ":freebsd"
Expand All @@ -75,8 +75,8 @@ platforms:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/freebsd/10"
- name: freebsd-9.2
url: "<%= url %>/<%= version %>/freebsd/10"
- name: freebsd-9.3
driver:
guest: ":freebsd"
vagrantfile_erb: vagrantfile_bsd.erb
Expand All @@ -86,58 +86,68 @@ platforms:
riak:
package:
local:
url: "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/freebsd/9.2"
url: "<%= url %>/<%= version %>/freebsd/9.2"
suites:
- name: default
run_list:
- recipe[riak::sysctl]
- recipe[riak]
attributes:
riak:
package:
version:
major: "2"
minor: "1"
incremental: "1"
major: <%= maj %>
minor: <%= min %>
incremental: <%= inc %>
- name: search
run_list:
- recipe[riak::sysctl]
- recipe[riak]
attributes:
riak:
manage_java: true
package:
version:
major: "2"
minor: "1"
incremental: "1"
major: <%= maj %>
minor: <%= min %>
incremental: <%= inc %>
config:
search.top_level: "on"
excludes: ["freebsd-10.1", "freebsd-9.2"]
excludes: ["freebsd-10.1", "freebsd-9.3"]
- name: enterprise
run_list:
- recipe[riak::sysctl]
- recipe[riak]
attributes:
riak:
package:
version:
major: "2"
minor: "1"
incremental: "1"
major: <%= maj %>
minor: <%= min %>
incremental: <%= inc %>
local:
url: ""
enterprise_key: <%= (ENV["RIAK_ENTERPRISE_KEY"].nil? ? "" : ENV["RIAK_ENTERPRISE_KEY"]) %>
- name: custom_package
run_list:
- recipe[riak::sysctl]
- recipe[riak]
attributes:
riak:
install_method: "custom_package"
- name: source
run_list:
- recipe[riak::sysctl]
- recipe[riak]
attributes:
riak:
install_method: "source"
source:
major: "2"
minor: "1"
incremental: "1"
major: <%= maj %>
minor: <%= min %>
incremental: <%= inc %>
excludes: ["freebsd-10.1", "freebsd-9.3"]
- name: sysctl
run_list:
- recipe[riak::sysctl]
excludes: ["freebsd-10.1", "freebsd-9.3"]
11 changes: 0 additions & 11 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@
# ulimit
default['riak']['limits']['nofile'] = 65_536

# sysctl
default['riak']['sysctl']['vm']['swappiness'] = 0
default['riak']['sysctl']['net']['core']['somaxconn'] = 40_000
default['riak']['sysctl']['net']['ipv4']['tcp_max_syn_backlog'] = 40_000
default['riak']['sysctl']['net']['ipv4']['tcp_sack'] = 1
default['riak']['sysctl']['net']['ipv4']['tcp_window_scaling'] = 1
default['riak']['sysctl']['net']['ipv4']['tcp_fin_timeout'] = 15
default['riak']['sysctl']['net']['ipv4']['tcp_keepalive_intvl'] = 30
default['riak']['sysctl']['net']['ipv4']['tcp_tw_reuse'] = 1
default['riak']['sysctl']['net']['ipv4']['tcp_moderate_rcvbuf'] = 1

default['riak']['platform_bin_dir'] = '/usr/sbin'
default['riak']['platform_data_dir'] = '/var/lib/riak'
default['riak']['platform_etc_dir'] = '/etc/riak'
Expand Down
Loading

0 comments on commit 40c8628

Please sign in to comment.