Skip to content

Instantly share code, notes, and snippets.

View big-samantha's full-sized avatar

Samantha Smith big-samantha

View GitHub Profile
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 16384
user haproxy
group haproxy
daemon
defaults
log global
#template containing this
backend appnodes
<% if @hostname =~ /^s-/ -%>
option httpchk http://host.subdomain1.company.com/foo.jpg
server s-app1 1.1.1.1:80 check inter 1m
server s-app2 2.2.2.2.153:80 check inter 1m
<% else -%>
option httpchk http://host.subdomain2.company.com/foo.jpg
server p-app1 11.11.11.11:80 check inter 1m
server p-app2 12.12.12.12:80 check inter 1m
# Install, configure, and make persistent, iptables.
class iptables (
$publicports = [],
)
{
include
'iptables::config',
'iptables::service',
'iptables::install'
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName <%= projectname %>
ServerAlias www.<%= projectname %>
<% aliases.each do |alias| -%>
ServerAlias <%= alias %>
<% end -%>
DocumentRoot /www/<%= projectname %>/web
class sudoers {
include sudoers::neckbeards
}
class sudoers::neckbeards {
$sudofile = $hostname ? {
/^d-/ => 'puppet:///modules/sudoers/dev_sudo',
default => 'puppet:///modules/sudoers/neckbeards_sudo'
}
input_file = ARGV[0]
def print_all(f)
puts f.read()
end
def rewind(f)
f.seek(0, IO::SEEK_SET)
end
# Set variable input_file equal to the first argument passed to the script.
input_file = ARGV[0]
# create a function called print_all with varible f included.
# Then read contents of variable f as file and return as string to terminal
# via puts.
def print_all(f)
puts f.read()
end
/usr/bin/java -Xms512M -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Dcom.sun.management.jmxremote -Dactivemq.classpath=/var/lib/activemq/main/conf;/etc/activemq/instances-enabled/main; -Dactivemq.home=/usr/share/activemq -Dactivemq.base=/var/lib/activemq/main -jar /usr/share/activemq/bin/run.jar start xbean:activemq.xml
#nodes.pp
node 'activemq' {
include easervers::activemqserver
}
#activemqserver.pp
class easervers::activemqserver {
include ::easervers
include ::iptables
include ::activemq
# Configure ActiveMQ middleware server node.
class easervers::activemqserver {
include ::easervers
include ::iptables
include ::activemq
}