Created
September 16, 2011 10:38
-
-
Save vizanto/1221817 to your computer and use it in GitHub Desktop.
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 nodes.core | |
(:require [pallet compute, resource] | |
pallet.compute.vmfest | |
vmfest.manager, vmfest.virtualbox.image | |
[pallet.crate java tomcat] | |
[pallet.action.package :as package] | |
[pallet.action.exec-script :as exec-script] | |
[pallet.utils :as utils] | |
[pallet.session :as session] | |
[pallet.script.lib]) | |
(:use pallet.core | |
pallet.thread-expr | |
pallet.action.package | |
clojure.contrib.with-ns)) | |
(def tomcat-settings | |
(pallet.crate.tomcat/settings-map | |
{:server (pallet.crate.tomcat/server | |
:port 8005 :shutdown "SHUTDOWN" | |
(pallet.crate.tomcat/global-resources) | |
(pallet.crate.tomcat/service | |
(pallet.crate.tomcat/engine | |
"catalina" "localhost" | |
(pallet.crate.tomcat/connector :port "8081" :protocol "HTTP/1.1"))))})) | |
; | |
; [Bug?] Tomcat is not configured for port 8081 | |
; | |
(def webserver-conf | |
(server-spec | |
:phases {:configure (pallet.phase/phase-fn | |
(pallet.crate.java/java) | |
(pallet.crate.tomcat/settings tomcat-settings) | |
(pallet.crate.tomcat/install) | |
(pallet.crate.tomcat/deploy "probe" | |
:url "http://psi-probe.googlecode.com/files/probe-2.2.3.zip" | |
:sha1 "ca600308c5780f4a0f3b54a96e25ced785069ddf") | |
) | |
; | |
; [Bug?] PSI Probe is copied to /var/lib/tomcat6/webapps/probe.war but not deployed?! | |
; | |
; | |
; [????] Settings phase looks useless to me as a user when settings also have to be specified in the configure phase, or do they? | |
; | |
:settings (pallet.phase/phase-fn | |
(pallet.crate.tomcat/settings tomcat-settings)) | |
})) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment