Skip to content

Instantly share code, notes, and snippets.

@youngnh
Created October 30, 2010 21:17
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save youngnh/655752 to your computer and use it in GitHub Desktop.
pallet_simple.clj
(ns pallet-simple
(:use [pallet core compute resource])
(:use [pallet.crate.automated-admin-user])
(:use [pallet.crate.couchdb :only (couchdb)])
(:use [pallet.crate.java :only (java)])
(:use [pallet.crate.jetty :only (jetty)]))
(def ec2-access-id "Your-Access-ID-Here")
(def ec2-secret-key "Your-Secret-Key-Here")
(def ec2-service (compute-service "ec2" :identity ec2-access-id :credential ec2-secret-key))
(defnode couchnode {:image-id "us-east-1/ami-da0cf8b3" :min-ram (* 7 1024) :min-cores 2}
:bootstrap (phase (automated-admin-user))
:configure (phase (java :openjdk)
(couchdb)))
(converge {couchnode 5} :compute ec2-service)
(lift couchnode :compute ec2-service
:phase (phase (jetty)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment