A Nagios check that connects to PuppetDB and determines the Puppet agent run health on a host.
- PuppetDB
- A puppetmaster configured to send reports to PuppetDB
[www] | |
ping.path = /ping |
## Install a necessary packages | |
$ sudo apt-get install kvm cloud-utils genisoimage | |
## URL to most recent cloud image of 12.04 | |
$ img_url="http://cloud-images.ubuntu.com/server/releases/12.04/release" | |
$ img_url="${img_url}/ubuntu-12.04-server-cloudimg-amd64-disk1.img" | |
## download the image | |
$ wget $img_url -O disk.img.dist | |
## Create a file with some user-data in it |
#curl -L https://gist.github.com/karlentwistle/5029263/raw/84faa6a15a9c521533e33135090c1214c457f08d/chef_solo_bootstrap.sh | bash | |
aptitude -y update | |
echo "Installing RVM and Ruby dependencies" | |
sudo apt-get install -y build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion git-core libgdbm-dev pkg-config libffi-dev | |
echo "Installing RVM system-wide" | |
bash -c "bash <( curl -L https://github.com/wayneeseguin/rvm/raw/1.3.0/contrib/install-system-wide ) --version '1.3.0'" | |
cat >> /etc/profile <<'EOF' | |
# Load RVM if it is installed, | |
# first try to load user install |
d-i debian-installer/locale string en_US | |
d-i debian-installer/language string en | |
d-i debian-installer/country string US | |
d-i debian-installer/locale string en_US.UTF-8 | |
d-i debian-installer/allow_unauthenticated string true | |
d-i console-setup/ask_detect boolean false | |
d-i console-setup/layoutcode string us |
# based on http://stackoverflow.com/questions/549186/change-background-of-terminal-app-from-the-commandline | |
function darkback { | |
osascript -e "tell application \"Terminal\" to set background color of window 1 to {0,0,0}" | |
} | |
function lightback { | |
osascript -e "tell application \"Terminal\" to set background color of window 1 to {65535,65535,65535}" | |
} |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# override these variables in ~/.vagrant.d/Vagrantfile for your local changes | |
$local_username ||= `whoami`.strip | |
$local_projects_directory ||= "~/projects/vagrant/" | |
$vm_memory ||= "4096" | |
$vm_cpus ||= "4" | |
$server_root_password = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" |
#!/bin/sh | |
# https://gist.github.com/smoser/5823699 | |
set -e | |
[ "$(id -u)" = "0" ] && sudo="" || sudo="sudo" | |
[ -e "/usr/bin/apt-get.distrib" ] || | |
$sudo dpkg-divert --local --rename --add /usr/bin/apt-get | |
$sudo tee /usr/bin/apt-get >/dev/null <<"EOF" | |
#!/bin/sh |
require "fileutils" | |
root_dir = "/Users/jason/Downloads/images" | |
Dir.chdir(root_dir) | |
puts Dir.pwd | |
Dir.glob("**/*.{jpg}").each do |fname| | |
tfname = fname.split("/").last | |
if fname.match("[small|large|normal]_") | |
tfname = fname.split("_").last | |
end | |
p1,p2 = tfname[0,1],tfname[1,1] |
#!/bin/bash | |
# Your github username | |
github_user="dcai" | |
# The remote name of your github repo, it usually origin | |
github_remote_name="github" | |
### STOP CONFIG SINCE HERE! ### | |
github_diff_root="https://github.com/$github_user/moodle/compare/" |