Created
November 8, 2010 20:19
-
-
Save tbatchelli/668197 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
;;;;;;;;;;;; | |
;; pallet ;; | |
;;;;;;;;;;;; | |
(ns bacug-haproxy | |
(:use pallet.maven | |
[pallet.compute :as compute]) | |
(:require webapp-nodes.nodes)) | |
;; define the compute service, this time form maven settings | |
(def service (compute-service-from-settings)) | |
;; create one node in the 'proxied' tag | |
(pallet.core/converge | |
{webapp-nodes.nodes/proxied 1} | |
:compute service :phase [:deploy-nano-webapp :restart-tomcat]) | |
;; SSH in! | |
;; deploy a webapp on the nodes in the 'proxied' tag | |
(pallet.core/lift webapp-nodes.nodes/proxied :compute service :phase :deploy-nano-webapp) | |
;; make the deploy faster --> use a blobstore! | |
(def blobstore (pallet.blobstore/blobstore-from-settings)) | |
;;;;; remember to update the proxied crate | |
;; deploy 3 proxied nodes with webapp + 1 haproxy, | |
(pallet.core/converge | |
{webapp-nodes.nodes/proxied 2 | |
webapp-nodes.nodes/haproxy 1} | |
:compute service | |
:blobstore blobstore | |
:phase [:deploy-from-blobstore :restart-haproxy :restart-tomcat]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment