This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServerTokens OS | |
ServerRoot "/etc/httpd" | |
PidFile run/httpd.pid | |
Timeout 60 | |
KeepAlive Off | |
MaxKeepAliveRequests 100 | |
KeepAliveTimeout 15 | |
<IfModule prefork.c> | |
StartServers 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServerTokens OS | |
ServerRoot "/etc/httpd" | |
PidFile run/httpd.pid | |
Timeout 60 | |
KeepAlive Off | |
MaxKeepAliveRequests 100 | |
KeepAliveTimeout 15 | |
<IfModule prefork.c> | |
StartServers 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 local2 | |
chroot /var/lib/haproxy | |
pidfile /var/run/haproxy.pid | |
maxconn 4000 | |
user haproxy | |
group haproxy | |
daemon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
driver: | |
name: docker | |
provisioner: | |
name: chef_zero | |
driver_config: | |
forward: | |
- 8080:80 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package "haproxy" | |
action :install | |
end | |
template "/etc/haproxy/haproxy.conf" do | |
source "haproxy.conf.erb" | |
owner "root" | |
group "root" | |
mode "0644" | |
variables :pool_members => pool_members |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name 'chef-client' | |
maintainer 'Chef Software, Inc.' | |
maintainer_email '[email protected]' | |
license 'Apache 2.0' | |
description 'Manages client.rb configuration and chef-client service' | |
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) | |
version '4.3.1' | |
recipe 'chef-client', 'Includes the service recipe by default.' | |
recipe 'chef-client::bluepill_service', 'Configures chef-client as a service under Bluepill' | |
recipe 'chef-client::bsd_service', 'Configures chef-client as a service on *BSD' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package 'haproxy' do | |
action :install | |
end | |
pool_members = search("node","role:webserver") | |
template "/etc/haproxy/haproxy.cfg" do | |
source "haproxy.cfg.erb" | |
owner "root" | |
group "root" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mydirectory = "/Users/YOU/training/chef-repo" | |
git "previous-repo" do | |
destination "#{mydirectory}" | |
repository "git://github.com/johnfitzpatrick/cheffundamentals3.git" | |
reference "v1" | |
action :export | |
end | |
execute "chown -R YOU #{mydirectory}" do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
#log loghost local0 info | |
maxconn 4096 | |
user haproxy | |
group haproxy | |
stats socket /var/run/haproxy.sock user haproxy group haproxy | |
defaults |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Hello, <%= node["myapache"]["greeting"] %></h1> | |
<p> | |
This is a <%= node["platform"] %> <%= node["platform_version"] %> server with <%= node["memory"]["total"] %> RAM. | |
<br><br> | |
The CentOS servers in your organization have the following FQDN/IP Addresses:- | |
<ul> | |
<% @nodes.each do |node| %> | |
<li><%= node['fqdn'] %> / <%= node['cloud']['public_ipv4'] %></li> | |
<% end %> |