Created
October 21, 2011 12:50
-
-
Save xlson/1303759 to your computer and use it in GitHub Desktop.
basic-pallet-ec2
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} | |
:network {:inbound-ports [22 80]})) | |
(def with-admin-user | |
(pallet.core/server-spec | |
:phases {:bootstrap (pallet.phase/phase-fn | |
(pallet.crate.automated-admin-user/automated-admin-user))})) | |
(def basicgroup | |
(pallet.core/group-spec "basicgroup" | |
:node-spec basicnode | |
:extends [with-admin-user])) | |
(defn scale-cluster [n] | |
(pallet.core/converge | |
(pallet.core/group-spec "basicgroup" :count n) | |
:compute (pallet.compute/service "aws"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment