With Puppet:
puppet module install rtyler-jenkins
puppet apply -v -e "include jenkins"
# First verify the version of Java being used is not SunJSK. | |
java -version | |
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html | |
wget -o jdk-7u1-linux-i586.rpm --no-check-certificate --no-cookies --header "Cookie: gpw_e24=xxx;" http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm | |
# Install Java | |
sudo rpm -i jdk-7u1-linux-i586.rpm | |
# Check if the default java version is set to sun jdk |
#!/bin/bash | |
# | |
# Carbon (part of Graphite) | |
# | |
# chkconfig: 3 50 50 | |
# description: Carbon init.d | |
. /etc/rc.d/init.d/functions | |
prog=carbon | |
RETVAL=0 |
#!/usr/bin/env python | |
""" | |
Nagios plugin to check PostgreSQL 9 streaming replication lag. | |
Requires psycopg2 and nagiosplugin (both installable with pip/easy_install). | |
MIT licensed: | |
Copyright (c) 2010 Jacob Kaplan-Moss. All rights reserved. |
def bytes_converter(bytes, from_unit, to_unit, bsize=1024): | |
""" | |
Converted bytes units | |
>>> bytes_converter('2', 'gigabyte', 'kilobyte') | |
2097152.0 | |
>>> bytes_converter('2097152', 'kilobyte', 'gigabyte') | |
2.0 | |
""" |
""" | |
Tasks for managing a test server | |
""" | |
import os | |
from fabric.api import cd, env, prefix, run, sudo, task | |
from fabric.contrib.files import exists, sed | |
from fabric.context_managers import hide | |
from fabric.colors import green, red | |
#!/usr/bin/python: | |
import thread | |
import time | |
def print_time (nomedothread, delay): | |
conta = 0 | |
while conta < 5: | |
time.sleep(delay) | |
conta += 1 | |
print "%s: %s" % (nomedothread, time.ctime(time.time()) ) |
This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.
# Ensure system is in ship-shape.
aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev