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
(defn cluster-spec | |
"Create a cluster-spec. | |
`name` is used as a prefix for all groups in the cluster. | |
- :groups specify a sequence of groups that define the cluster | |
- :extends specify a server-spec, a group-spec, or sequence thereof, | |
for all groups in the cluster |
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
# Install virtualbox additions. | |
# Requires the guest additions iso connected to the secondary slave. | |
# This seems overly complicated, but is a combination | |
# that seems to work: | |
# the vbox ose packages were somehow being installed by the standard task, | |
# the LSB header is required for update-rc.d, which in turn is needed, | |
# due to straight linking to rc2.d not working (automatic boot sequence, | |
# and dependency management), | |
# cdrom source not being removed at the point when this script runs. | |
# Deletes /etc/udev/rules.d/70-persistent-net.rules to allow cloning. |
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
(defn record-public-key | |
"Record a public key" | |
[session user & {:keys [filename type parameter-path] | |
:or {type "rsa"} :as options}] | |
(let [filename (or filename (ssh-default-filenames type)) | |
path (str (user-ssh-dir user) filename ".pub")] | |
(-> | |
session | |
(remote-file/with-remote-file | |
(action/as-clj-action |
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
(defn attach-hard-disk [m uuid] | |
{:pre [(model/Machine? m)]} | |
(session/with-vbox (:server m) [_ vbox] | |
(let [medium (vbox/find-medium vbox uuid)] | |
(session/with-session m :shared [_ vb-m] | |
(try | |
(attach-device vb-m "SATA Controller" 0 0 :hard-disk medium) | |
(catch clojure.contrib.condition.Condition _ | |
(attach-device vb-m "IDE Controller" 0 0 :hard-disk medium))) | |
(.saveSettings vb-m))))) |
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
# add preseed/url=http://host/path/to/preseed.cfg to the kernel options | |
# locale | |
d-i debian-installer/locale string en_US | |
# Keyboard selection. | |
d-i console-keymaps-at/keymap select us | |
d-i keyboard-configuration/xkb-keymap select us | |
# netcfg will choose an interface that has link if possible. This makes it |
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
(require 'pallet.compute) | |
(def service (pallet.compute/service "your service name from config.clj here") | |
(def security-group-client | |
(.. | |
(clojure.contrib.reflect/get-field | |
org.jclouds.ec2.compute.EC2ComputeService "ec2Client" (.compute service)) | |
getSecurityGroupServices)) | |
(.createSecurityGroupInRegion security-group-client "us-east-1" "sg" "my new sg) |
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
(ns pallet.aether | |
"Wrapper for aether resolution | |
See: | |
https://docs.sonatype.org/display/AETHER/Home" | |
(:require | |
[clojure.java.io :as io] | |
[clojure.contrib.logging :as logging]) | |
(import | |
org.apache.maven.repository.internal.MavenRepositorySystemSession |
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
{:debian-6-0-1-tb {:description "Debian Squeeze 6.0.1" | |
:os-family :debian | |
:os-version "6.0.1" | |
:os-type-id "Debian_64" | |
:os-64-bit true | |
:username "vmfest" | |
:password "vmfest" | |
:sudo-password "vmfest"}} |
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
;;; clojurescript-mode.el --- Minor mode for clojurescript code | |
;; Copyright (C) 2011 Hugo Duncan | |
;; | |
;; Authors: Hugo Duncan | |
;; Version: 0.1.0 | |
;; Keywords: languages, lisp, javascript | |
;; To run the compiler every time a cljs file is saved: |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.cloudhoist</groupId> | |
<artifactId>closure-library</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>google closure library</name> | |
<description>closure library in a jar</description> | |
<build> |