c3e170bda976

Initial commit.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 28 Sep 2011 18:18:54 -0400
parents d17f6eca3ba7
children 571a5b9218ae
branches/tags (none)
files Vagrantfile puppet/base.pp puppet/modules/environ/files/bashrc puppet/modules/environ/manifests/init.pp puppet/modules/java/CHANGELOG puppet/modules/java/LICENSE puppet/modules/java/Modulefile puppet/modules/java/README.markdown puppet/modules/java/manifests/init.pp puppet/modules/java/manifests/package_debian.pp puppet/modules/java/manifests/package_redhat.pp puppet/modules/java/spec/spec.opts puppet/modules/java/spec/spec_helper.rb puppet/modules/java/templates/sun-java6.preseed puppet/modules/java/tests/init.pp puppet/modules/leiningen/files/lein.sh puppet/modules/leiningen/manifests/init.pp

Changes

diff -r d17f6eca3ba7 -r c3e170bda976 Vagrantfile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Vagrantfile	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,14 @@
+Vagrant::Config.run do |config|
+  config.vm.host_name = "cv"
+  config.vm.box = "lucid32"
+  config.vm.box_url = "http://files.vagrantup.com/lucid32.box"
+
+  #                              guest <-- host
+  config.vm.forward_port "http", 8000,     4565
+
+  config.vm.provision :puppet do |puppet|
+    puppet.manifest_file  = "base.pp"
+    puppet.manifests_path = "puppet"
+    puppet.module_path = "puppet/modules"
+  end
+end
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/base.pp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/base.pp	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,21 @@
+class ubuntu {
+  group { "puppet": ensure => "present"; } ->
+  group { "vagrant": ensure => "present"; } ->
+  user { "vagrant": ensure => "present"; } ->
+  file { "/home/vagrant/bin":
+      ensure  => "directory",
+      owner   => "vagrant",
+      group   => "vagrant",
+      mode    => "755",
+  }
+
+  class { "java": }
+  class { "leiningen": }
+  class { "environ": }
+
+  $niceties = [ "htop", "dtach", "sudo", "vim" ]
+  package { $niceties: ensure => "installed" }
+}
+
+class { "ubuntu": }
+
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/environ/files/bashrc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/environ/files/bashrc	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,102 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+
+# If not running interactively, don't do anything
+[ -z "$PS1" ] && return
+
+# don't put duplicate lines in the history. See bash(1) for more options
+# ... or force ignoredups and ignorespace
+HISTCONTROL=ignoredups:ignorespace
+
+# append to the history file, don't overwrite it
+shopt -s histappend
+
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+HISTSIZE=1000
+HISTFILESIZE=2000
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# make less more friendly for non-text input files, see lesspipe(1)
+[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
+
+# set variable identifying the chroot you work in (used in the prompt below)
+if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
+    debian_chroot=$(cat /etc/debian_chroot)
+fi
+
+# set a fancy prompt (non-color, unless we know we "want" color)
+case "$TERM" in
+    xterm-color) color_prompt=yes;;
+esac
+
+# uncomment for a colored prompt, if the terminal has the capability; turned
+# off by default to not distract the user: the focus in a terminal window
+# should be on the output of commands, not on the prompt
+force_color_prompt=yes
+
+if [ -n "$force_color_prompt" ]; then
+    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
+    # We have color support; assume it's compliant with Ecma-48
+    # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
+    # a case would tend to support setf rather than setaf.)
+    color_prompt=yes
+    else
+    color_prompt=
+    fi
+fi
+
+if [ "$color_prompt" = yes ]; then
+    PS1='\n${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
+else
+    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
+fi
+unset color_prompt force_color_prompt
+
+# If this is an xterm set the title to user@host:dir
+case "$TERM" in
+xterm*|rxvt*)
+    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
+    ;;
+*)
+    ;;
+esac
+
+# enable color support of ls and also add handy aliases
+if [ -x /usr/bin/dircolors ]; then
+    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
+    alias ls='ls --color=auto'
+    #alias dir='dir --color=auto'
+    #alias vdir='vdir --color=auto'
+
+    alias grep='grep --color=auto'
+    alias fgrep='fgrep --color=auto'
+    alias egrep='egrep --color=auto'
+fi
+
+# some more ls aliases
+alias ll='ls -alF'
+alias la='ls -A'
+alias l='ls -CF'
+
+# Alias definitions.
+# You may want to put all your additions into a separate file like
+# ~/.bash_aliases, instead of adding them here directly.
+# See /usr/share/doc/bash-doc/examples in the bash-doc package.
+
+if [ -f ~/.bash_aliases ]; then
+    . ~/.bash_aliases
+fi
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
+    . /etc/bash_completion
+fi
+
+alias cv='cd /vagrant'
+export PATH=~/bin:$PATH
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/environ/manifests/init.pp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/environ/manifests/init.pp	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,9 @@
+class environ() {
+  file { "/home/vagrant/.bashrc":
+      source  => "puppet:///modules/environ/bashrc",
+      owner   => "vagrant",
+      group   => "vagrant",
+      mode    => "755",
+      require => User["vagrant"],
+  }
+}
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/java/CHANGELOG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/java/CHANGELOG	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,23 @@
+2011-06-16 Jeff McCune <jeff@puppetlabs.com> - 0.1.5
+* Add Debian based distro (Lucid) support
+
+2011-06-02 Jeff McCune <jeff@puppetlabs.com> - 0.1.4
+* Fix class composition ordering problems
+
+2011-05-28 Jeff McCune <jeff@puppetlabs.com> - 0.1.3
+* Remove stages
+
+2011-05-26 Jeff McCune <jeff@puppetlabs.com> - 0.1.2
+* Changes JRE/JDK selection class parameter to $distribution
+
+2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 0.1.1
+* Re-did versioning to follow semantic versioning
+
+2011-05-25 Jeff McCune <jeff@puppetlabs.com> - 1.0.1
+* Add validation of class parameters
+
+2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 1.0.0
+* Default to JDK version 6u25
+
+2011-05-24 Jeff McCune <jeff@puppetlabs.com> - 0.0.1
+* Initial release
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/java/LICENSE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/java/LICENSE	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,17 @@
+Puppet OpenNebula Module - Puppet module for managing OpenNebula
+
+Copyright (C) 2011 Puppet Labs Inc
+
+Puppet Labs can be contacted at: info@puppetlabs.com
+
+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
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/java/Modulefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/java/Modulefile	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,11 @@
+name    'puppetlabs-java'
+version '0.1.5'
+source 'git://github.com/puppetlabs/puppetlabs-java'
+author 'puppetlabs'
+license 'Apache'
+summary 'Manage the official Java runtime'
+description 'Manage the official Java runtime'
+project_page 'https://github.com/puppetlabs/puppetlabs-java'
+
+## Add dependencies, if any:
+dependency 'puppetlabs/stdlib', '>= 0.1.6'
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/java/README.markdown
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/java/README.markdown	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,33 @@
+# Java #
+
+Manage the Java runtime for use with other application software.
+
+Currently this simply deploys the package on Enterprise Linux based systems and Debian based systems.
+
+Tested on:
+
+ * Centos 5.6
+ * Ubuntu 10.04 Lucid
+
+# RedHat Support #
+
+The Java runtime this module is designed to configure are the RPM's provided by Oracle and obtained by extracting them from the "bin" installers.
+
+For example:
+
+    ./jdk-6u25-linux-x64-rpm.bin -x
+
+Please download the installer from:
+
+ * [Java Downloads](http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html)
+
+# Ubuntu Support #
+
+## Lucid ##
+
+You need to have the partner repository enabled in order to install the Sun JDK or JRE.
+
+    aptitude install python-software-properties
+    sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
+    aptitude update
+
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/java/manifests/init.pp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/java/manifests/init.pp	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,32 @@
+class java {
+  $release = regsubst(generate("/usr/bin/lsb_release", "-s", "-c"), '(\w+)\s', '\1')
+
+  file { "partner.list":
+    path => "/etc/apt/sources.list.d/partner.list",
+    ensure => file,
+    owner => "root",
+    group => "root",
+    content => "deb http://archive.canonical.com/ $release partner\ndeb-src http://archive.canonical.com/ $release partner\n",
+    notify => Exec["apt-get-update"],
+  }
+
+  exec { "apt-get-update":
+    command => "/usr/bin/apt-get update",
+    refreshonly => true,
+  }
+
+  package { "debconf-utils":
+    ensure => installed
+  }
+
+  exec { "agree-to-jre-license":
+    command => "/bin/echo -e sun-java6-jre shared/accepted-sun-dlj-v1-1 select true | debconf-set-selections",
+    unless => "debconf-get-selections | grep 'sun-java6-jre.*shared/accepted-sun-dlj-v1-1.*true'",
+    path => ["/bin", "/usr/bin"], require => Package["debconf-utils"],
+  }
+
+  package { "sun-java6-jre":
+    ensure => latest,
+    require => [ File["partner.list"], Exec["agree-to-jre-license"], Exec["apt-get-update"] ],
+  }
+}
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/java/manifests/package_debian.pp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/java/manifests/package_debian.pp	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,33 @@
+# Class: java::package_debian
+#
+#   Implementation class of the Java package
+#   for debian based systems.
+#
+#   This class is not meant to be used by the end user
+#   of the module.  It is an implementation class
+#   of the composite Class[java]
+#
+# Parameters:
+#
+# Actions:
+#
+# Requires:
+#
+# Sample Usage:
+#
+class java::package_debian(
+  $version,
+  $distribution
+) {
+
+  file { "/var/local/sun-java6.preseed":
+    content => template("${module_name}/sun-java6.preseed"),
+  }
+  package { 'java':
+    ensure => $version,
+    name   => $distribution,
+    responsefile => "/var/local/sun-java6.preseed",
+    require => File["/var/local/sun-java6.preseed"],
+  }
+
+}
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/java/manifests/package_redhat.pp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/java/manifests/package_redhat.pp	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,28 @@
+# Class: java::package_redhat
+#
+#   Implementation class of the Java package
+#   for redhat based systems.
+#
+#   This class is not meant to be used by the end user
+#   of the module.  It is an implementation class
+#   of the composite Class[java]
+#
+# Parameters:
+#
+# Actions:
+#
+# Requires:
+#
+# Sample Usage:
+#
+class java::package_redhat(
+  $version,
+  $distribution
+) {
+
+  package { 'java':
+    ensure => $version,
+    name   => $distribution,
+  }
+
+}
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/java/spec/spec.opts
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/java/spec/spec.opts	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,6 @@
+--format
+s
+--colour
+--loadby
+mtime
+--backtrace
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/java/spec/spec_helper.rb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/java/spec/spec_helper.rb	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,18 @@
+require 'pathname'
+dir = Pathname.new(__FILE__).parent
+$LOAD_PATH.unshift(dir, dir + 'lib', dir + '../lib')
+
+require 'mocha'
+require 'puppet'
+gem 'rspec', '=1.2.9'
+require 'spec/autorun'
+
+Spec::Runner.configure do |config|
+    config.mock_with :mocha
+end
+
+# We need this because the RAL uses 'should' as a method.  This
+# allows us the same behaviour but with a different method name.
+class Object
+    alias :must :should
+end
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/java/templates/sun-java6.preseed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/java/templates/sun-java6.preseed	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,3 @@
+sun-java6-bin   shared/accepted-sun-dlj-v1-1    boolean true
+sun-java6-jdk   shared/accepted-sun-dlj-v1-1    boolean true
+sun-java6-jre   shared/accepted-sun-dlj-v1-1    boolean true
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/java/tests/init.pp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/java/tests/init.pp	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,10 @@
+node default {
+
+  notify { "alpha": } ->
+  class { 'java':
+    distribution => 'jdk',
+    version      => 'latest',
+  } ->
+  notify { "omega": }
+
+}
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/leiningen/files/lein.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/leiningen/files/lein.sh	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,247 @@
+#!/bin/sh
+
+LEIN_VERSION="1.6.1.1"
+export LEIN_VERSION
+
+case $LEIN_VERSION in
+    *SNAPSHOT) SNAPSHOT="YES" ;;
+    *) SNAPSHOT="NO" ;;
+esac
+
+# Make sure classpath is in unix format for manipulating, then put
+# it back to windows format when we use it
+if [ "$OSTYPE" = "cygwin" ] && [ "$CLASSPATH" != "" ]; then
+    CLASSPATH=`cygpath -up $CLASSPATH`
+fi
+
+if [ `whoami` = "root" ] && [ "$LEIN_ROOT" = "" ]; then
+    echo "WARNING: You're currently running as root; probably by accident."
+    echo "Press control-C to abort or Enter to continue as root."
+    echo "Set LEIN_ROOT to disable this warning."
+    read _
+fi
+
+NOT_FOUND=1
+ORIGINAL_PWD="$PWD"
+while [ ! -r "$PWD/project.clj" ] && [ "$PWD" != "/" ] && [ $NOT_FOUND -ne 0 ]
+do
+    cd ..
+    if [ "$(dirname "$PWD")" = "/" ]; then
+        NOT_FOUND=0
+        cd "$ORIGINAL_PWD"
+    fi
+done
+
+if [ "$LEIN_HOME" = "" ]; then
+    LEIN_HOME="$HOME/.lein"
+fi
+
+DEV_PLUGINS="$(ls -1 lib/dev/*jar 2> /dev/null)"
+USER_PLUGINS="$(ls -1 "$LEIN_HOME"/plugins/*jar 2> /dev/null)"
+
+artifact_name () {
+    echo "$1" | sed -e "s/.*\/\(.*\)/\1/" | \
+        rev | sed -e "s/raj[-[:digit:].]*-\(.*\)/\1/" | rev
+}
+
+unique_user_plugins () {
+    saveIFS="$IFS"
+    IFS="$(printf '\n\t')"
+
+    plugins="$(echo "$DEV_PLUGINS"; echo "$USER_PLUGINS")"
+    artifacts="$(for i in $plugins; do echo "$(artifact_name "$i")"; done)"
+    duplicates="$(echo "$artifacts" | sort | uniq -d)"
+
+    if [ -z "$duplicates" ]; then
+        echo "$USER_PLUGINS"
+    else
+        for i in $USER_PLUGINS; do
+            artifact="$(artifact_name "$i")"
+            if ! echo "$duplicates" | grep -xq "$artifact"; then
+                echo "$i"
+            fi
+        done
+    fi
+    IFS="$saveIFS"
+}
+
+LEIN_PLUGIN_PATH="$(echo "$DEV_PLUGINS" | tr \\n :)"
+LEIN_USER_PLUGIN_PATH="$(echo "$(unique_user_plugins)" | tr \\n :)"
+CLASSPATH="$CLASSPATH:$LEIN_PLUGIN_PATH:$LEIN_USER_PLUGIN_PATH:test/:src/"
+LEIN_JAR="$HOME/.lein/self-installs/leiningen-$LEIN_VERSION-standalone.jar"
+CLOJURE_JAR="$HOME/.m2/repository/org/clojure/clojure/1.2.1/clojure-1.2.1.jar"
+NULL_DEVICE=/dev/null
+
+# apply context specific CLASSPATH entries
+if [ -f .classpath ]; then
+    CLASSPATH="`cat .classpath`:$CLASSPATH"
+fi
+
+# normalize $0 on certain BSDs
+if [ "$(dirname "$0")" = "." ]; then
+    SCRIPT="$(which $(basename "$0"))"
+else
+    SCRIPT="$0"
+fi
+
+# resolve symlinks to the script itself portably
+while [ -h "$SCRIPT" ] ; do
+    ls=`ls -ld "$SCRIPT"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        SCRIPT="$link"
+    else
+        SCRIPT="$(dirname "$SCRIPT"$)/$link"
+    fi
+done
+
+BIN_DIR="$(dirname "$SCRIPT")"
+
+if [ -r "$BIN_DIR/../src/leiningen/core.clj" ]; then
+    # Running from source checkout
+    LEIN_DIR="$(dirname "$BIN_DIR")"
+    LEIN_LIBS="$(find -H "$LEIN_DIR/lib" -mindepth 1 -maxdepth 1 -print0 2> /dev/null | tr \\0 \:)"
+    CLASSPATH="$CLASSPATH:$LEIN_LIBS:$LEIN_DIR/src:$LEIN_DIR/classes:$LEIN_DIR/resources:$LEIN_JAR"
+
+    if [ "$LEIN_LIBS" = "" -a "$1" != "self-install" -a ! -r "$LEIN_JAR" ]; then
+        echo "Leiningen is missing its dependencies. Please see \"Building\" in the README."
+        exit 1
+    fi
+else
+    # Not running from a checkout
+    CLASSPATH="$CLASSPATH:$LEIN_JAR"
+
+    if [ ! -r "$LEIN_JAR" -a "$1" != "self-install" ]; then
+        "$0" self-install
+    fi
+fi
+
+HTTP_CLIENT="wget --no-check-certificate -O"
+if type -p curl >/dev/null 2>&1; then
+    if [ "$https_proxy" != "" ]; then
+        CURL_PROXY="-x $https_proxy"
+    fi
+    HTTP_CLIENT="curl $CURL_PROXY --insecure -f -L -o"
+fi
+
+export JAVA_CMD=${JAVA_CMD:-"java"}
+
+# Support $JAVA_OPTS for backwards-compatibility.
+export JVM_OPTS=${JVM_OPTS:-"$JAVA_OPTS"}
+
+# TODO: investigate http://skife.org/java/unix/2011/06/20/really_executable_jars.html
+# If you're packaging this for a package manager (.deb, homebrew, etc)
+# you need to remove the self-install and upgrade functionality.
+if [ "$1" = "self-install" ]; then
+    echo "Downloading Leiningen now..."
+    LEIN_DIR=`dirname "$LEIN_JAR"`
+    mkdir -p "$LEIN_DIR"
+    LEIN_URL="https://github.com/downloads/technomancy/leiningen/leiningen-$LEIN_VERSION-standalone.jar"
+    $HTTP_CLIENT "$LEIN_JAR" "$LEIN_URL"
+    if [ $? != 0 ]; then
+        echo "Failed to download $LEIN_URL"
+        if [ $SNAPSHOT = "YES" ]; then
+            echo "If you have Maven installed, you can do"
+            echo "mvn dependency:copy-dependencies; mv target/dependency lib"
+            echo "See README.md for further SNAPSHOT build instructions."
+        fi
+        rm $LEIN_JAR 2> /dev/null
+        exit 1
+    fi
+elif [ "$1" = "upgrade" ]; then
+    if [ "$LEIN_DIR" != "" ]; then
+        echo "The upgrade task is not meant to be run from a checkout."
+        exit 1
+    fi
+    if [ $SNAPSHOT = "YES" ]; then
+        echo "The upgrade task is only meant for stable releases."
+        echo "See the \"Hacking\" section of the README."
+        exit 1
+    fi
+    if [ ! -w "$SCRIPT" ]; then
+        echo "You do not have permission to upgrade the installation in $SCRIPT"
+        exit 1
+    else
+        echo "The script at $SCRIPT will be upgraded to the latest stable version."
+        echo -n "Do you want to continue [Y/n]? "
+        read RESP
+        case "$RESP" in
+            y|Y|"")
+                echo
+                echo "Upgrading..."
+                TARGET="/tmp/lein-$$-upgrade"
+                LEIN_SCRIPT_URL="https://github.com/technomancy/leiningen/raw/stable/bin/lein"
+                $HTTP_CLIENT "$TARGET" "$LEIN_SCRIPT_URL" \
+                    && mv "$TARGET" "$SCRIPT" \
+                    && chmod +x "$SCRIPT" \
+                    && echo && $SCRIPT self-install && echo && echo "Now running" `$SCRIPT version`
+                exit $?;;
+            *)
+                echo "Aborted."
+                exit 1;;
+        esac
+    fi
+else
+    if [ "$OSTYPE" = "cygwin" ]; then
+        # When running on Cygwin, use Windows-style paths for java
+        CLOJURE_JAR=`cygpath -w "$CLOJURE_JAR"`
+        ORIGINAL_PWD=`cygpath -w "$ORIGINAL_PWD"`
+        CLASSPATH=`cygpath -wp "$CLASSPATH"`
+        NULL_DEVICE=NUL
+    fi
+
+    if [ $DEBUG ]; then
+        echo $CLASSPATH
+        echo $CLOJURE_JAR
+    fi
+
+    JLINE=""
+    if ([ "$1" = "repl" ] || [ "$1" = "interactive" ] || [ "$1" = "int" ]) &&
+        [ -z $INSIDE_EMACS ] && [ "$TERM" != "dumb" ]; then
+        # Use rlwrap if it's available, otherwise fall back to JLine
+        RLWRAP=`which rlwrap`
+        if [ ! -x "$RLWRAP" ] || [ "$RLWRAP" = "" ]; then
+            if [ ! -r "$LEIN_HOME/.jline-warn" ]; then
+                echo "Using JLine for console I/O; install rlwrap for optimum experience."
+                touch "$LEIN_HOME/.jline-warn"
+            fi
+            RLWRAP=""
+            JLINE=jline.ConsoleRunner
+            if [ "$OSTYPE" = "cygwin" ]; then
+                JLINE="-Djline.terminal=jline.UnixTerminal jline.ConsoleRunner"
+                CYGWIN_JLINE=y
+            fi
+        else
+            # Test to see if rlwrap supports custom quote chars
+            rlwrap -m -q '"' echo "hi" > /dev/null 2>&1
+            if [ $? -eq 0 ]; then
+                RLWRAP="$RLWRAP -m -q '\"'"
+            fi
+        fi
+    fi
+
+    # The -Xbootclasspath argument is optional here: if the jar
+    # doesn't exist everything will still work, it will just have a
+    # slower JVM boot.
+    test $CYGWIN_JLINE && stty -icanon min 1 -echo
+    if [ "$1" = "trampoline" ]; then
+        TRAMPOLINE_FILE="/tmp/lein-trampoline-$$"
+        $JAVA_CMD -Xbootclasspath/a:"$CLOJURE_JAR" -client $JVM_OPTS \
+            -Dleiningen.original.pwd="$ORIGINAL_PWD" \
+            -Dleiningen.trampoline-file=$TRAMPOLINE_FILE -cp "$CLASSPATH" \
+            $JLINE clojure.main -e "(use 'leiningen.core)(-main)" \
+            $NULL_DEVICE "$@"
+        if [ -r $TRAMPOLINE_FILE ]; then
+            TRAMPOLINE="$(cat $TRAMPOLINE_FILE)"
+            rm $TRAMPOLINE_FILE
+            exec sh -c "$TRAMPOLINE"
+        fi
+    else
+        exec $RLWRAP $JAVA_CMD -Xbootclasspath/a:"$CLOJURE_JAR" -client $JVM_OPTS \
+            -Dleiningen.original.pwd="$ORIGINAL_PWD" \
+            -cp "$CLASSPATH" $JLINE clojure.main -e "(use 'leiningen.core)(-main)" \
+            $NULL_DEVICE "$@"
+        test $CYGWIN_JLINE && stty icanon echo
+    fi
+fi
+
diff -r d17f6eca3ba7 -r c3e170bda976 puppet/modules/leiningen/manifests/init.pp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/puppet/modules/leiningen/manifests/init.pp	Wed Sep 28 18:18:54 2011 -0400
@@ -0,0 +1,9 @@
+class leiningen() {
+  file { "/home/vagrant/bin/lein":
+      source  => "puppet:///modules/leiningen/lein.sh",
+      owner   => "vagrant",
+      group   => "vagrant",
+      mode    => "755",
+      require => File["/home/vagrant/bin"],
+  }
+}