This file contains 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
domU-12-31-39-13-D8-C1% rsyslogd -v | |
rsyslogd 5.6.2, compiled with: | |
FEATURE_REGEXP: Yes | |
FEATURE_LARGEFILE: No | |
FEATURE_NETZIP (message compression): Yes | |
GSSAPI Kerberos 5 support: No | |
FEATURE_DEBUG (debug build, slow code): No | |
Atomic operations supported: Yes | |
Runtime Instrumentation (slow code): No |
This file contains 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
node[:apt][:repo].each do |repo| | |
apt_repository repo[:name] | |
uri repo[:uri] | |
distribution repo[:dist] | |
components repo[:component] | |
action :add | |
end | |
end |
This file contains 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
# Set attribute indicating munin role | |
node.set["munin"]["node"] = true | |
# Find available munin servers | |
available_servers = search(:node, "munin_server:true") | |
# Install munin plugins | |
munin_plugin "passenger_memory_stats" | |
munin_plugin "passenger_status" |
This file contains 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
#!/usr/bin/ruby | |
# | |
# Filter hosts wose time since last checkin >= X | |
# | |
# usage: (process that outputs lines) | filterHosts.rb <#hrs> | |
# to prune hosts in opscode: knife status *:* | filterHosts.rb <#hrs> | xargs -I % knife node delete % -y | |
STDIN.each_line {|line| | |
#split the line by commas, strip whitespace, map to fields |
This file contains 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
#!/bin/bash | |
# User data to configure a vanilla Ubuntu EC2 instance. | |
# Installs chef-client (with minimal dependencies), | |
# configures chef, and adds roles | |
test $UID == 0 || (echo "Error: must run as root"; exit 1) | |
######### STEP 1: OPERATING SYSTEM CONFIGURATION | |
BOOTLOG="/var/log/bootstrap.log" |
This file contains 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
# Recipe:: client | |
# | |
# Copyright 2010, Medidata Solutions Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains 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
include Chef::Mixin::Command | |
action :create do | |
size = new_resource.size | |
volumes = new_resource.volumes.times.map{|i| (i == 0 ? "/dev/sdf" : "/dev/sdf#{i}") } | |
setra = new_resource.blockdev_setra | |
volume_group = new_resource.volume_group | |
logical_volume = new_resource.name | |
mdadm_device = new_resource.mdadm_device | |
mount_point = new_resource.mount_point |
This file contains 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
include Opscode::Aws::Ec2 | |
#Auto locates and attached ebs devices based on the data bag they reside in. The following test cases need to be performed | |
# Create multiple resources with new node: PASS | |
# | |
# Re-attach multiple resources after a reboot: PASS | |
# | |
# Create resources across 2 runs. First run creates first raid set, second run re-attaches then creates: PASS | |
# |
This file contains 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
{ | |
"run_list": [ | |
"recipe[chef-client::config]", | |
"recipe[chef-client::service]", | |
"recipe[chef-client::delete_validation]", | |
"recipe[runit]", | |
"role[locke-validation-app]" | |
], | |
"chef_client": { | |
"server_url": "https://api.opscode.com/organizations/mdsol", |
This file contains 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
before_migrate do | |
if app['main']['uses_bundler'] | |
link "#{release_path}/vendor/bundle" do | |
to "#{app['main']['deploy_to']}/shared/vendor_bundle" | |
end | |
common_groups = %w{development test cucumber staging production} | |
execute "bundle install --deployment --without #{(common_groups -([app['main']['rails_env']])).join(' ')}" do | |
ignore_failure true | |
cwd release_path | |
environment ({'LANG' => 'en_US.UTF-8'}) |