Skip to content

Commit

Permalink
Introduce customize.rb in all cookbooks.
Browse files Browse the repository at this point in the history
Conflicts:
	passenger_apache2/attributes/passenger.rb
	runit/attributes/default.rb
  • Loading branch information
jbraeuer authored and Christian Requena committed Mar 4, 2014
1 parent fcba313 commit e9cceb7
Show file tree
Hide file tree
Showing 60 changed files with 853 additions and 7 deletions.
7 changes: 7 additions & 0 deletions agent_version/attributes/customize.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
###
# This is the place to override the agent_version cookbook's default attributes.
#
# Do not edit THIS file directly. Instead, create
# "agent_version/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
###
17 changes: 17 additions & 0 deletions agent_version/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
###
# Do not use this file to override the agent_version cookbook's default
# attributes. Instead, please use the customize.rb attributes file,
# which will keep your adjustments separate from the AWS OpsWorks
# codebase and make it easier to upgrade.
#
# However, you should not edit customize.rb directly. Instead, create
# "agent_version/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
#
# Do NOT create an 'agent_version/attributes/apache.rb' in your cookbooks. Doing so
# would completely override this file and might cause upgrade issues.
#
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html
###

include_attribute 'opsworks_initial_setup::default'
include_attribute 'agent_version::customize'
11 changes: 11 additions & 0 deletions dependencies/attributes/customize.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
###
# This is the place to override the dependencies cookbook's default attributes.
#
# Do not edit THIS file directly. Instead, create
# "dependencies/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
###

# The following shows how to override the gem binary:
#
#normal[:dependencies][:gem_binary] = '/my/gem/binary'
18 changes: 18 additions & 0 deletions dependencies/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
###
# Do not use this file to override the dependencies cookbook's default
# attributes. Instead, please use the customize.rb attributes file,
# which will keep your adjustments separate from the AWS OpsWorks
# codebase and make it easier to upgrade.
#
# However, you should not edit customize.rb directly. Instead, create
# "dependencies/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
#
# Do NOT create an 'dependencies/attributes/default.rb' in your cookbooks. Doing so
# would completely override this file and might cause upgrade issues.
#
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html
###

default[:dependencies][:gems] = {}
default[:dependencies][:debs] = {}
default[:dependencies][:npms] = {}
Expand Down Expand Up @@ -27,3 +43,5 @@
include_attribute "opsworks_nodejs::opsworks_nodejs" if node["opsworks"].has_key?("instance") &&
node["opsworks"]["instance"].has_key?("layers") &&
node["opsworks"]["instance"]["layers"].include?("nodejs-app")

include_attribute "dependencies::customize"
12 changes: 12 additions & 0 deletions deploy/attributes/customize.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
###
# This is the place to override the deploy cookbook's default attributes.
#
# Do not edit THIS file directly. Instead, create
# "deploy/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
###

# The following shows how to override the deploy user and shell:
#
#normal[:opsworks][:deploy_user][:shell] = '/bin/zsh'
#normal[:opsworks][:deploy_user][:user] = 'deploy'
17 changes: 17 additions & 0 deletions deploy/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
###
# Do not use this file to override the deploy cookbook's default
# attributes. Instead, please use the customize.rb attributes file,
# which will keep your adjustments separate from the AWS OpsWorks
# codebase and make it easier to upgrade.
#
# However, you should not edit customize.rb directly. Instead, create
# "deploy/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
#
# Do NOT create an 'deploy/attributes/default.rb' in your cookbooks. Doing so
# would completely override this file and might cause upgrade issues.
#
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html
###

include_attribute "deploy::deploy"
include_attribute "deploy::customize"
18 changes: 18 additions & 0 deletions deploy/attributes/deploy.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
###
# Do not use this file to override the deploy cookbook's default
# attributes. Instead, please use the customize.rb attributes file,
# which will keep your adjustments separate from the AWS OpsWorks
# codebase and make it easier to upgrade.
#
# However, you should not edit customize.rb directly. Instead, create
# "deploy/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
#
# Do NOT create an 'deploy/attributes/deploy.rb' in your cookbooks. Doing so
# would completely override this file and might cause upgrade issues.
#
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html
###

include_attribute 'deploy::logrotate'
include_attribute 'deploy::rails_stack'

Expand Down Expand Up @@ -92,3 +108,5 @@
end

default[:opsworks][:skip_uninstall_of_other_rails_stack] = false

include_attribute "deploy::customize"
20 changes: 19 additions & 1 deletion deploy/attributes/logrotate.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
###
# Do not use this file to override the deploy cookbook's default
# attributes. Instead, please use the customize.rb attributes file,
# which will keep your adjustments separate from the AWS OpsWorks
# codebase and make it easier to upgrade.
#
# However, you should not edit customize.rb directly. Instead, create
# "deploy/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
#
# Do NOT create an 'deploy/attributes/logrotate.rb' in your cookbooks. Doing so
# would completely override this file and might cause upgrade issues.
#
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html
###

default[:logrotate][:rotate] = 30
default[:logrotate][:dateformat] = false # set to '-%Y%m%d' to have date formatted logs
default[:logrotate][:dateformat] = false # set to '-%Y%m%d' to have date formatted logs

include_attribute "deploy::customize"
18 changes: 18 additions & 0 deletions deploy/attributes/rails_stack.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
###
# Do not use this file to override the deploy cookbook's default
# attributes. Instead, please use the customize.rb attributes file,
# which will keep your adjustments separate from the AWS OpsWorks
# codebase and make it easier to upgrade.
#
# However, you should not edit customize.rb directly. Instead, create
# "deploy/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
#
# Do NOT create an 'deploy/attributes/rails_stack.rb' in your cookbooks. Doing so
# would completely override this file and might cause upgrade issues.
#
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html
###

default[:opsworks][:rails_stack][:name] = "apache_passenger"
case node[:opsworks][:rails_stack][:name]
when "apache_passenger"
Expand All @@ -13,3 +29,5 @@
else
raise "Unknown stack: #{node[:opsworks][:rails_stack][:name].inspect}"
end

include_attribute "deploy::customize"
11 changes: 11 additions & 0 deletions ebs/attributes/customize.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
###
# This is the place to override the ebs cookbook's default attributes.
#
# Do not edit THIS file directly. Instead, create
# "ebs/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
###

# The following shows how to override the mdadm chunk size:
#
#normal[:ebs][:mdadm_chunk_size] = '512'
19 changes: 18 additions & 1 deletion ebs/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
###
# Do not use this file to override the deploy cookbook's default
# attributes. Instead, please use the customize.rb attributes file,
# which will keep your adjustments separate from the AWS OpsWorks
# codebase and make it easier to upgrade.
#
# However, you should not edit customize.rb directly. Instead, create
# "ebs/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
#
# Do NOT create an 'ebs/attributes/default.rb' in your cookbooks. Doing so
# would completely override this file and might cause upgrade issues.
#
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html
###

default[:ebs][:devices] ||= {}
default[:ebs][:raids] ||= {}
default[:ebs][:mdadm_chunk_size] = '256'
Expand All @@ -21,5 +37,6 @@
set[:ebs][:raids][raid_device][:disks] = new_raid_devices
skip_chars = new_raid_devices.size
end

end

include_attribute "ebs::customize"
12 changes: 12 additions & 0 deletions haproxy/attributes/customize.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
###
# This is the place to override the haproxy cookbook's default attributes.
#
# Do not edit THIS file directly. Instead, create
# "haproxy/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
###

# The following shows how to override the HA-Proxy stats url and user:
#
#normal[:haproxy][:stats_url] = '/haproxy?stats'
#normal[:haproxy][:stats_user] = 'opsworks'
18 changes: 18 additions & 0 deletions haproxy/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
###
# Do not use this file to override the haproxy cookbook's default
# attributes. Instead, please use the customize.rb attributes file,
# which will keep your adjustments separate from the AWS OpsWorks
# codebase and make it easier to upgrade.
#
# However, you should not edit customize.rb directly. Instead, create
# "haproxy/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
#
# Do NOT create an 'haproxy/attributes/default.rb' in your cookbooks. Doing so
# would completely override this file and might cause upgrade issues.
#
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html
###

include_attribute 'opsworks_commons::default'

rhel_arch = RUBY_PLATFORM.match(/64/) ? 'x86_64' : 'i686'
Expand Down Expand Up @@ -50,3 +66,5 @@ def random_haproxy_pw
default[:haproxy][:enable_stats] = false

default[:haproxy][:balance] = 'roundrobin'

include_attribute "haproxy::customize"
11 changes: 11 additions & 0 deletions memcached/attributes/customize.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
###
# This is the place to override the memcached cookbook's default attributes.
#
# Do not edit THIS file directly. Instead, create
# "memcached/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
###

# The following shows how to override the memcached max connections:
#
#normal[:memcached][:max_connections] = "8192"
18 changes: 18 additions & 0 deletions memcached/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
###
# Do not use this file to override the memcached cookbook's default
# attributes. Instead, please use the customize.rb attributes file,
# which will keep your adjustments separate from the AWS OpsWorks
# codebase and make it easier to upgrade.
#
# However, you should not edit customize.rb directly. Instead, create
# "memcached/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
#
# Do NOT create an 'memcached/attributes/default.rb' in your cookbooks. Doing so
# would completely override this file and might cause upgrade issues.
#
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html
###

default[:memcached][:memory] = 512
default[:memcached][:port] = 11211
default[:memcached][:user] = "nobody"
Expand All @@ -15,3 +31,5 @@
default[:memcached][:start_command] = "/etc/init.d/memcached start"
default[:memcached][:stop_command] = "/etc/init.d/memcached stop"
default[:memcached][:testing][:gem_version] = '1.6.1'

include_attribute "memcached::customize"
19 changes: 19 additions & 0 deletions mod_php5_apache2/attributes/customize.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
###
# This is the place to override the mod_php5_apache2 cookbook's default attributes.
#
# Do not edit THIS file directly. Instead, create
# "mod_php5_apache2/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
###

# The following shows how to override the mod_php5_apache2 packages:
#
#normal[:mod_php5_apache2][:packages] = [ 'php-xml',
# 'php-common',
# 'php-xmlrpc',
# 'php-devel',
# 'php-gd',
# 'php-cli',
# 'php-pear-Auth-SASL',
# 'php-mysql',
# 'php-mcrypt' ]
20 changes: 19 additions & 1 deletion mod_php5_apache2/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
###
# Do not use this file to override the mod_php5_apache2 cookbook's default
# attributes. Instead, please use the customize.rb attributes file,
# which will keep your adjustments separate from the AWS OpsWorks
# codebase and make it easier to upgrade.
#
# However, you should not edit customize.rb directly. Instead, create
# "mod_php5_apache2/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
#
# Do NOT create an 'mod_php5_apache2/attributes/default.rb' in your cookbooks. Doing so
# would completely override this file and might cause upgrade issues.
#
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html
###

packages = []

case node[:platform_family]
Expand Down Expand Up @@ -41,4 +57,6 @@
]
end

default[:mod_php5_apache2][:packages] = packages
default[:mod_php5_apache2][:packages] = packages

include_attribute "mod_php5_apache2::customize"
11 changes: 11 additions & 0 deletions mysql/attributes/customize.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
###
# This is the place to override the mysql cookbook's default attributes.
#
# Do not edit THIS file directly. Instead, create
# "mysql/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
###

# The following shows how to override the MySQL max_connections settings:
#
#normal[:mysql][:tunable][:max_connections] = '512'
18 changes: 18 additions & 0 deletions mysql/attributes/server.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
###
# Do not use this file to override the mysql cookbook's default
# attributes. Instead, please use the customize.rb attributes file,
# which will keep your adjustments separate from the AWS OpsWorks
# codebase and make it easier to upgrade.
#
# However, you should not edit customize.rb directly. Instead, create
# "mysql/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
#
# Do NOT create an 'mysql/attributes/server.rb' in your cookbooks. Doing so
# would completely override this file and might cause upgrade issues.
#
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html
###

require 'openssl'

root_pw = String.new
Expand Down Expand Up @@ -86,3 +102,5 @@
default[:mysql][:tunable][:long_query_time] = 1

default[:mysql][:clients] = []

include_attribute "mysql::customize"
12 changes: 12 additions & 0 deletions nginx/attributes/customize.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
###
# This is the place to override the nginx cookbook's default attributes.
#
# Do not edit THIS file directly. Instead, create
# "nginx/attributes/customize.rb" in your cookbook repository and
# put the overrides in YOUR customize.rb file.
###

# The following shows how to disable NGinx compression:
#
#normal[:nginx][:gzip] = 'off'
#normal[:nginx][:gzip_static] = 'off'
Loading

0 comments on commit e9cceb7

Please sign in to comment.