Created
August 30, 2012 13:24
-
-
Save murtaza52/3528456 to your computer and use it in GitHub Desktop.
Pallet complete example
This file contains hidden or 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 actions.clj | |
(:require [pallet.core] | |
[pallet.compute] | |
[pallet.action.package])) | |
(def hardware-types {:micro "t1.micro" :small "m1.small" :cpu-medium "c1.medium" :medium "m1.medium" :large "m1.large"}) | |
(def ubuntu-app-server | |
(pallet.core/node-spec | |
:image {:os-family :ubuntu} | |
:hardware {:hardware-id (:small hardware-types)} | |
:network {:location-id "us-east-1a"})) | |
(def with-ant | |
(pallet.core/server-spec | |
:phases {:configure (pallet.phase/phase-fn | |
(pallet.action.package/package "ant"))})) | |
(def mygroup | |
(pallet.core/group-spec | |
"mygroup" :extends [with-ant] :node-spec ubuntu-app-server)) | |
(pallet.core/lift | |
(pallet.core/group-spec "app-servers") | |
:compute (pallet.configure/compute-service :data-center) | |
:phase {:configure (pallet.phase/phase-fn | |
(pallet.action.package/package "ant"))}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment