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 nodes-in-group | |
"Build a list of nodes in a given security-group" | |
[security-group] | |
(filter #(= (% 0) security-group) | |
(map #(vector (pallet.compute/group-name %) | |
(pallet.compute/primary-ip %) | |
(pallet.compute/id %) | |
(pallet.compute.jclouds/node-locations %) ) | |
(pallet.compute/nodes srvc)))) |
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 quickstart.core | |
(:require pallet.core | |
pallet.compute | |
pallet.phase | |
pallet.crate.automated-admin-user)) | |
(def basicnode | |
(pallet.core/node-spec | |
:image {:os-family :ubuntu :os-version-matches "10.10"} | |
:hardware {:min-cores 2 :min-ram 512} |
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
BREW_HOME=$HOME/.homebrew | |
$ brew install libxml2 | |
$ brew link libxml2 | |
$ brew install https://github.com/adamv/homebrew-alt/raw/master/duplicates/libxslt.rb | |
$ brew link libxslt | |
$ brew install libiconv | |
$ brew link libiconv | |
$ gem install nokogiri -- --with-xml2-dir=$BREW_HOME/Cellar/libxml2/2.7.8 --with-xslt-dir=$BREW_HOME/Cellar/libxslt/1.1.26 --with-iconv-dir=$BREW_HOME/Cellar/libiconv/1.13.1/ |
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/env ruby | |
if ARGV.empty? | |
puts "Usage: gemmate <name-of-gem>" | |
else | |
src = `gem which #{ARGV[0]}`.split.last | |
lib_dir = src.slice 0, src.rindex("lib") | |
`mate -a '#{lib_dir}'` | |
end |
NewerOlder