Created
June 7, 2013 21:47
-
-
Save tbatchelli/5732649 to your computer and use it in GitHub Desktop.
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
(bootstrap-ns dobladez | |
'[[com.palletops/java-crate "0.8.5-beta.5"] | |
[com.palletops/mongodb-crate "0.1.0-SNAPSHOT"] | |
[com.palletops/upstart-crate "0.8.0-alpha.2"]]) | |
(ns dobladez | |
(:require [pallet.crate.java :as java] | |
[pallet.crate.mongodb :as mongodb] | |
[pallet.crate.upstart :as upstart] | |
[pallet.api :as api] | |
[pallet.actions :as actions])) | |
(def base-server | |
(api/server-spec | |
:extends [(upstart/server-spec {})] | |
:phases | |
{ | |
:install (api/plan-fn | |
(actions/exec-script "echo INSTALLING BASE_SERVER") | |
(actions/exec-script "ls -l /") | |
(actions/package-manager :update) | |
;(actions/package "python-software-properties" :priority 1) ;; this package provides add-apt-repository | |
)})) | |
(def coral-db-server | |
(api/server-spec | |
:extends [(mongodb/server-spec {:version "2.4.4" :config {:rest false} })] | |
)) | |
(def coral-app-server | |
(api/server-spec | |
:extends [(java/server-spec {:vendor :oracle :version [7]}) ])) | |
(def coral-all-group | |
(api/group-spec :coral-all | |
:extends [*base-spec* base-server coral-db-server coral-app-server])) | |
(defn run [] | |
(api/converge {coral-all-group 1} :compute *compute* :phase [:bootstrap :install])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment