Skip to content

Commit

Permalink
@node is deprecated, use node, chef commit f904589
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Jun 13, 2010
1 parent 6cd72a1 commit 1193f67
Show file tree
Hide file tree
Showing 118 changed files with 485 additions and 485 deletions.
2 changes: 1 addition & 1 deletion activemq/templates/default/sv-activemq-run.erb
@@ -1,3 +1,3 @@
#!/bin/sh
exec 2>&1
exec /opt/apache-activemq-<%= @node[:activemq][:version] %>/bin/activemq
exec /opt/apache-activemq-<%= node[:activemq][:version] %>/bin/activemq
2 changes: 1 addition & 1 deletion apache2/templates/default/a2dismod.erb
@@ -1,6 +1,6 @@
#!/bin/sh -e

SYSCONFDIR='<%= @node[:apache][:dir] %>'
SYSCONFDIR='<%= node[:apache][:dir] %>'

if [ -z $1 ]; then
echo "Which module would you like to disable?"
Expand Down
4 changes: 2 additions & 2 deletions apache2/templates/default/a2dissite.erb
@@ -1,11 +1,11 @@
#!/bin/sh -e

SYSCONFDIR='<%= @node[:apache][:dir] %>'
SYSCONFDIR='<%= node[:apache][:dir] %>'

if [ -z $1 ]; then
echo "Which site would you like to disable?"
echo -n "Your choices are: "
ls $@node[:apache][:dir]/sites-enabled/* | \
ls $node[:apache][:dir]/sites-enabled/* | \
sed -e "s,$SYSCONFDIR/sites-enabled/,,g" | xargs echo
echo -n "Site name? "
read SITENAME
Expand Down
2 changes: 1 addition & 1 deletion apache2/templates/default/a2enmod.erb
@@ -1,6 +1,6 @@
#!/bin/sh -e

SYSCONFDIR='<%= @node[:apache][:dir] %>'
SYSCONFDIR='<%= node[:apache][:dir] %>'

if [ -z $1 ]; then
echo "Which module would you like to enable?"
Expand Down
2 changes: 1 addition & 1 deletion apache2/templates/default/a2ensite.erb
@@ -1,6 +1,6 @@
#!/bin/sh -e

SYSCONFDIR='<%= @node[:apache][:dir] %>'
SYSCONFDIR='<%= node[:apache][:dir] %>'

if [ -z $1 ]; then
echo "Which site would you like to enable?"
Expand Down
56 changes: 28 additions & 28 deletions apache2/templates/default/apache2.conf.erb
Expand Up @@ -3,12 +3,12 @@
#
# Based on the Ubuntu apache2.conf

ServerRoot "<%= @node[:apache][:dir] %>"
ServerRoot "<%= node[:apache][:dir] %>"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
<% if @node[:platform] == "debian" || @node[:platform] == "ubuntu" -%>
<% if node[:platform] == "debian" || node[:platform] == "ubuntu" -%>
LockFile /var/lock/apache2/accept.lock
<% else %>
LockFile logs/accept.lock
Expand All @@ -18,9 +18,9 @@ LockFile logs/accept.lock
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
<% if @node[:platform] == "debian" || @node[:platform] == "ubuntu" -%>
<% if node[:platform] == "debian" || node[:platform] == "ubuntu" -%>
PidFile /var/run/apache2.pid
<% elsif @node[:platform] == "centos" || @node[:platform] == "redhat" || @node[:platform] == "fedora" -%>
<% elsif node[:platform] == "centos" || node[:platform] == "redhat" || node[:platform] == "fedora" -%>
PidFile /var/run/httpd.pid
<% else -%>
PidFile logs/httpd.pid
Expand All @@ -29,26 +29,26 @@ PidFile logs/httpd.pid
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout <%= @node[:apache][:timeout] %>
Timeout <%= node[:apache][:timeout] %>

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive <%= @node[:apache][:keepalive] %>
KeepAlive <%= node[:apache][:keepalive] %>

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests <%= @node[:apache][:keepaliverequests] %>
MaxKeepAliveRequests <%= node[:apache][:keepaliverequests] %>

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout <%= @node[:apache][:keepalivetimeout] %>
KeepAliveTimeout <%= node[:apache][:keepalivetimeout] %>

##
## Server-Pool Size Regulation (MPM specific)
Expand All @@ -61,12 +61,12 @@ KeepAliveTimeout <%= @node[:apache][:keepalivetimeout] %>
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers <%= @node[:apache][:prefork][:startservers] %>
MinSpareServers <%= @node[:apache][:prefork][:minspareservers] %>
MaxSpareServers <%= @node[:apache][:prefork][:maxspareservers] %>
ServerLimit <%= @node[:apache][:prefork][:serverlimit] %>
MaxClients <%= @node[:apache][:prefork][:maxclients] %>
MaxRequestsPerChild <%= @node[:apache][:prefork][:maxrequestsperchild] %>
StartServers <%= node[:apache][:prefork][:startservers] %>
MinSpareServers <%= node[:apache][:prefork][:minspareservers] %>
MaxSpareServers <%= node[:apache][:prefork][:maxspareservers] %>
ServerLimit <%= node[:apache][:prefork][:serverlimit] %>
MaxClients <%= node[:apache][:prefork][:maxclients] %>
MaxRequestsPerChild <%= node[:apache][:prefork][:maxrequestsperchild] %>
</IfModule>

# worker MPM
Expand All @@ -77,16 +77,16 @@ KeepAliveTimeout <%= @node[:apache][:keepalivetimeout] %>
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
StartServers <%= @node[:apache][:worker][:startservers] %>
MaxClients <%= @node[:apache][:worker][:maxclients] %>
MinSpareThreads <%= @node[:apache][:worker][:minsparethreads] %>
MaxSpareThreads <%= @node[:apache][:worker][:maxsparethreads] %>
ThreadsPerChild <%= @node[:apache][:worker][:threadsperchild] %>
MaxRequestsPerChild <%= @node[:apache][:worker][:maxrequestsperchild] %>
StartServers <%= node[:apache][:worker][:startservers] %>
MaxClients <%= node[:apache][:worker][:maxclients] %>
MinSpareThreads <%= node[:apache][:worker][:minsparethreads] %>
MaxSpareThreads <%= node[:apache][:worker][:maxsparethreads] %>
ThreadsPerChild <%= node[:apache][:worker][:threadsperchild] %>
MaxRequestsPerChild <%= node[:apache][:worker][:maxrequestsperchild] %>
</IfModule>

User <%= @node[:apache][:user] %>
Group <%= @node[:apache][:user] %>
User <%= node[:apache][:user] %>
Group <%= node[:apache][:user] %>

#
# AccessFileName: The name of the file to look for in each directory
Expand Down Expand Up @@ -133,7 +133,7 @@ HostnameLookups Off
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog <%= @node[:apache][:log_dir] %>/error.log
ErrorLog <%= node[:apache][:log_dir] %>/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
Expand All @@ -143,11 +143,11 @@ ErrorLog <%= @node[:apache][:log_dir] %>/error.log
LogLevel warn

# Include module configuration:
Include <%= @node[:apache][:dir] %>/mods-enabled/*.load
Include <%= @node[:apache][:dir] %>/mods-enabled/*.conf
Include <%= node[:apache][:dir] %>/mods-enabled/*.load
Include <%= node[:apache][:dir] %>/mods-enabled/*.conf

# Include ports listing
Include <%= @node[:apache][:dir] %>/ports.conf
Include <%= node[:apache][:dir] %>/ports.conf

#
# The following directives define some format nicknames for use with
Expand Down Expand Up @@ -224,7 +224,7 @@ LogFormat "%{User-agent}i" agent


# Include generic snippets of statements
Include <%= @node[:apache][:dir] %>/conf.d/
Include <%= node[:apache][:dir] %>/conf.d/

# Include the virtual host configurations:
Include <%= @node[:apache][:dir] %>/sites-enabled/
Include <%= node[:apache][:dir] %>/sites-enabled/
8 changes: 4 additions & 4 deletions apache2/templates/default/default-site.erb
@@ -1,5 +1,5 @@
<VirtualHost *:80>
ServerAdmin <%= @node[:apache][:contact] %>
ServerAdmin <%= node[:apache][:contact] %>

DocumentRoot /var/www/
<Directory />
Expand All @@ -24,13 +24,13 @@
Allow from all
</Directory>

ErrorLog <%= @node[:apache][:log_dir] %>/error.log
ErrorLog <%= node[:apache][:log_dir] %>/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog <%= @node[:apache][:log_dir] %>/access.log combined
CustomLog <%= node[:apache][:log_dir] %>/access.log combined
ServerSignature On

Alias /doc/ "/usr/share/doc/"
Expand All @@ -42,7 +42,7 @@
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

<% if @node[:platform] == "centos" || @node[:platform] == "redhat" || @node[:platform] == "fedora" -%>
<% if node[:platform] == "centos" || node[:platform] == "redhat" || node[:platform] == "fedora" -%>
#
# This configuration file enables the default "Welcome"
# page if there is no default index page present for
Expand Down
2 changes: 1 addition & 1 deletion apache2/templates/default/mod_auth_openid.rb.erb
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby

allowed_openids = Array.new
<% @node[:apache][:allowed_openids].each do |id| -%>
<% node[:apache][:allowed_openids].each do |id| -%>
allowed_openids << "<%= id %>"
<% end -%>
Expand Down
4 changes: 2 additions & 2 deletions apache2/templates/default/mods/alias.conf.erb
Expand Up @@ -12,9 +12,9 @@
# We include the /icons/ alias for FancyIndexed directory listings. If
# you do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "<%= @node[:apache][:icondir] %>"
Alias /icons/ "<%= node[:apache][:icondir] %>"

<Directory "<%= @node[:apache][:icondir] %>">
<Directory "<%= node[:apache][:icondir] %>">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Expand Down
2 changes: 1 addition & 1 deletion apache2/templates/default/mods/fcgid.conf.erb
Expand Up @@ -3,7 +3,7 @@
IPCConnectTimeout 20
</IfModule>

<% if @node[:platform] == "centos" || @node[:platform] == "redhat" || @node[:platform] == "fedora" -%>
<% if node[:platform] == "centos" || node[:platform] == "redhat" || node[:platform] == "fedora" -%>
# Sane place to put sockets and shared memory file
SocketPath run/mod_fcgid
SharememPath run/mod_fcgid/fcgid_shm
Expand Down
4 changes: 2 additions & 2 deletions apache2/templates/default/mods/ssl.conf.erb
Expand Up @@ -39,7 +39,7 @@ SSLPassPhraseDialog builtin
# Configure the SSL Session Cache: First the mechanism
# to use and second the expiring timeout (in seconds).
#SSLSessionCache dbm:/var/run/apache2/ssl_scache
<% if @node[:platform] == "centos" || @node[:platform] == "redhat" || @node[:platform] == "fedora" -%>
<% if node[:platform] == "centos" || node[:platform] == "redhat" || node[:platform] == "fedora" -%>
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
<% else -%>
SSLSessionCache shmcb:/var/run/apache2/ssl_scache
Expand All @@ -49,7 +49,7 @@ SSLSessionCacheTimeout 300
# Semaphore:
# Configure the path to the mutual exclusion semaphore the
# SSL engine uses internally for inter-process synchronization.
<% if @node[:platform] == "centos" || @node[:platform] == "redhat" || @node[:platform] == "fedora" -%>
<% if node[:platform] == "centos" || node[:platform] == "redhat" || node[:platform] == "fedora" -%>
SSLMutex default
<% else -%>
SSLMutex file:/var/run/apache2/ssl_mutex
Expand Down
6 changes: 3 additions & 3 deletions apache2/templates/default/security.erb
Expand Up @@ -24,7 +24,7 @@
# where Full conveys the most information, and Prod the least.
#
#ServerTokens Minimal
ServerTokens <%= @node[:apache][:servertokens] %>
ServerTokens <%= node[:apache][:servertokens] %>

#
# Optionally add a line containing the server version and virtual host
Expand All @@ -35,7 +35,7 @@ ServerTokens <%= @node[:apache][:servertokens] %>
# Set to one of: On | Off | EMail
#
#ServerSignature Off
ServerSignature <%= @node[:apache][:serversignature] %>
ServerSignature <%= node[:apache][:serversignature] %>

#
# Allow TRACE method
Expand All @@ -46,5 +46,5 @@ ServerSignature <%= @node[:apache][:serversignature] %>
# Set to one of: On | Off | extended
#
#TraceEnable Off
TraceEnable <%= @node[:apache][:traceenable] %>
TraceEnable <%= node[:apache][:traceenable] %>

6 changes: 3 additions & 3 deletions apache2/templates/default/web_app.conf.erb
Expand Up @@ -25,11 +25,11 @@
</Location>

LogLevel info
ErrorLog <%= @node[:apache][:log_dir] %>/<%= @params[:name] %>-error.log
CustomLog <%= @node[:apache][:log_dir] %>/<%= @params[:name] %>-access.log combined
ErrorLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-error.log
CustomLog <%= node[:apache][:log_dir] %>/<%= @params[:name] %>-access.log combined

RewriteEngine On
RewriteLog <%= @node[:apache][:log_dir] %>/<%= @application_name %>-rewrite.log
RewriteLog <%= node[:apache][:log_dir] %>/<%= @application_name %>-rewrite.log
RewriteLogLevel 0

# Canonical host, <%= @params[:server_name] %>
Expand Down
6 changes: 3 additions & 3 deletions application/templates/default/myproj.conf.erb
@@ -1,13 +1,13 @@
# nginx + passenger application vhost
#
# Generated by Chef for <%= @node[:fqdn] %>
# Generated by Chef for <%= node[:fqdn] %>
# Local modifications will be overwritten.
#
server {
listen 80;
server_name <%= @server_name %><% @server_aliases.each do |a| %><%= " #{a}" %> <% end %>;
root <%= @docroot %>;
error_log <%= @node[:nginx][:log_dir] %>/<%= @app %>-error.log;
access_log <%= @node[:nginx][:log_dir] %>/<%= @app %>-access.log;
error_log <%= node[:nginx][:log_dir] %>/<%= @app %>-error.log;
access_log <%= node[:nginx][:log_dir] %>/<%= @app %>-access.log;
passenger_enabled on;
}
6 changes: 3 additions & 3 deletions application/templates/default/rails_nginx_passenger.conf.erb
@@ -1,13 +1,13 @@
# nginx + passenger application vhost
#
# Generated by Chef for <%= @node[:fqdn] %>
# Generated by Chef for <%= node[:fqdn] %>
# Local modifications will be overwritten.
#
server {
listen 80;
server_name <%= @server_name %><% @server_aliases.each do |a| %><%= " #{a}" %> <% end %>;
root <%= @docroot %>;
error_log <%= @node[:nginx][:log_dir] %>/<%= @app %>-error.log;
access_log <%= @node[:nginx][:log_dir] %>/<%= @app %>-access.log;
error_log <%= node[:nginx][:log_dir] %>/<%= @app %>-error.log;
access_log <%= node[:nginx][:log_dir] %>/<%= @app %>-access.log;
passenger_enabled on;
}
2 changes: 1 addition & 1 deletion application/templates/default/sv-unicorn-run.erb
Expand Up @@ -3,5 +3,5 @@
cd <%= @options[:app]['deploy_to'] %>/current

exec 2>&1
exec chpst -u <%= @options[:app]["owner"] %>:<%= @options[:app]["group"] %> unicorn_rails -E <%= @node[:app_environment] %> -c /etc/unicorn/<%= @options[:app]['id'] %>.rb
exec chpst -u <%= @options[:app]["owner"] %>:<%= @options[:app]["group"] %> unicorn_rails -E <%= node[:app_environment] %> -c /etc/unicorn/<%= @options[:app]['id'] %>.rb

12 changes: 6 additions & 6 deletions bootstrap/templates/default/client.rb.erb
Expand Up @@ -7,18 +7,18 @@
log_level :info
log_location <%= @client_log %>
ssl_verify_mode :verify_none
<% case @node[:bootstrap][:chef][:url_type] -%>
<% case node[:bootstrap][:chef][:url_type] -%>
<% when "http" -%>
chef_server_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:<%= @node[:bootstrap][:chef][:server_port] %>"
chef_server_url "http://<%= node[:bootstrap][:chef][:server_fqdn] %>:<%= node[:bootstrap][:chef][:server_port] %>"
<% when "https" -%>
chef_server_url "https://<%= @node[:bootstrap][:chef][:server_fqdn] %>"
chef_server_url "https://<%= node[:bootstrap][:chef][:server_fqdn] %>"
<% end -%>

validation_client_name "<%= @node[:bootstrap][:chef][:validation_client_name] %>"
validation_client_name "<%= node[:bootstrap][:chef][:validation_client_name] %>"
validation_key "/etc/chef/validation.pem"
client_key "/etc/chef/client.pem"

file_cache_path "<%= @node[:bootstrap][:chef][:cache_path] %>"
pid_file "<%= @node[:bootstrap][:chef][:run_path] %>/chef-client.pid"
file_cache_path "<%= node[:bootstrap][:chef][:cache_path] %>"
pid_file "<%= node[:bootstrap][:chef][:run_path] %>/chef-client.pid"

Mixlib::Log::Formatter.show_time = <%= @show_time %>

0 comments on commit 1193f67

Please sign in to comment.