SlideShare una empresa de Scribd logo
1 de 20
Continuous Deployment of Clojure
Web Applications
Chas Emerick
@cemerick, http://cemerick.com
ego
I am:
• A Clojure programmer of > 2.5 years
• Coauthor of the forthcoming “Clojure
Programming” book from O’Reilly
• Architect of Docuharvest
• Founder of Snowtide Informatics
(first (clojure-conj))
first principles
⚛ ☺
Your Powerful Beauty Your Customers
Anything that gets in the way of this happy
union is the enemy.
(first (clojure-conj))
definitional bits & minor opinions
• We’re focusing on small- to medium-size
deployments today.
• You’re (probably) not a special snowflake. Stay
close to the herd, and stick to your knitting.
• Application deployment is (always?) a people
and process problem, not a technology
problem.
(first (clojure-conj))
choosing a path
“system administration”
Unrepeatable, manual, undocumented; the high
priesthoods
oh god no
(first (clojure-conj))
choosing a path (“roll your own”)
Even the most clever spike is not a solution.
“Emacs + SLIME + Clojure running in GNU Screen;
all requests handled by Apache; mod_proxy sends
them to the appropriate Jetty instance / servlet.”
– Brian Carper @ http://briancarper.net/blog/510/deploying-
clojure-websites
“Feel free to say: ‘duct tape and string’ and ‘You're
doing it wrong’.” – Brian Carper (private email)
(first (clojure-conj))
obligatory yak photo
(first (clojure-conj))
choosing a path
community? ⇒ standards ⇒ sanity
• The Platonic ideal: vertically-integrated
platforms, e.g. GAE, Heroku, Azure,
VMWare/SpringSource platform
• Dominant tools: Chef, Puppet, et al.
• Clojure-centric tools:
– jclouds: generic “cloud” API, provisioning
– Pallet: declarative, composable configuration
definition & management
(first (clojure-conj))
interlude: deployment existentialism
The complexity that is visited upon us when writing
software is enough; in an ideal world, we shouldn’t have
to develop all this extraneous expertise in how to build,
package, and deploy that software as well. There are a
few things in software that I know how to do really well
that make me slightly unique, and I wish I could
concentrate on those rather than becoming a generalist
in this, yet another vector, which is fundamentally a
means to an end. History and circumstance seem to be
stacked against me at the moment, though.
– “…wherein I feel the pain of being a generalist”
http://cemerick.com/2010/09/22/
(first (clojure-conj))
hey jclouds!
• Meatspace: e.g. compute nodes, storage (local
& EBS/SAN), network routing & security, IP
allocation, etc
• If you had an API to this infrastructurey stuff,
you could make it do your bidding
• Luckily: jclouds provides exactly this, for
multiple cloud providers
(first (clojure-conj))
howdy pallet!
• Pallet:crates :: chef:recipes
• Include recipes via chef-solo if you like
• Beautiful declarative expression of
provisioning and configuration operations
• Simple, flexible model:
lift/converge/phases/tags/prefix
(first (clojure-conj))
pallet “Hello World”
(def service (jcompute/compute-service "ec2”
“AWS_ID” “AWS_SECRET_KEY” :ssh :log4j))
(pallet.core/defnode appserver
{:os-family :ubuntu
:os-description-matches "10.10"
:min-ram 1024
:inbound-ports [22 8080]}
:bootstrap (pallet.resource/phase
(admin/automated-admin-user))
:configure (pallet.resource/phase
(pallet.crate.java/java :openjdk)
(tomcat/tomcat))
:deploy (pallet.resource/phase
(web-deploy warfile-path :port 8080)))
(pallet.core/converge {appserver 1}
:compute service
:prefix “demo”
:phase [:deploy])
(first (clojure-conj))
get thee a .war file
• Allows you to deploy to any Java app server &
platforms like Google App Engine and the
Spring/VMWare platform
• Seriously, it’s not difficult:
– Maven: baked in war packaging
– Leiningen/Cake: leiningen-war plugin
– Gradle, Buildr, rake: Surely simple enough
(first (clojure-conj))
app servers
embedded Jetty/Grizzly
• Great for experimentation and throughout
development, e.g. jetty directly supported in
ring/compojure
• In production environments: roll-your-own
that buys you nothing, therefore unnecessarily
evil.
(first (clojure-conj))
Tomcat, JBoss, Glassfish et al.
• Huge communities guarantee:
• tool integration (e.g. profilers)
• tons of experienced devs
• books
• monitoring and management support
• resource management (e.g. DB connection pools)
• clustering (e.g. Shoal)
• commercial/paid support
• You will eventually need these; give yourself the
chance to take advantage of these resources
(first (clojure-conj))
now for the (continuous) part
Craft more
power & beauty
git push
Hudson
pulls
<build
process
here>
provision
/
configure
(first (clojure-conj))
automate or die
Craft more
power & beauty
git push
Hudson
pulls
<build
process
here>
provision
/
configure
(first (clojure-conj))
links
Resources that will eventually be available:
Slides: linked from my blog @ http://cemerick.com
Code: http://github.com/cemerick/clojure-web-deploy-conj
Credits:
• Hugo Duncan et al. http://github.com/hugoduncan/pallet
• Adrian Cole et al. http://code.google.com/p/jclouds
• ClojureNYC and Western Mass Dev Group attendees
that suffered through earlier revs of this talk
(first (clojure-conj))
Thank You!
I too am not a bit tamed—I too am untranslatable;
I sound my barbaric yawp over the roofs of the world.
The last scud of day holds back for me;
It flings my likeness after the rest, and true as any, on the
shadow’d wilds;
It coaxes me to the vapor and the dusk.
I depart as air—I shake my white locks at the runaway sun;
I effuse my flesh in eddies, and drift it in lacy jags.
I bequeathe myself to the dirt, to grow from the grass I love;
If you want me again, look for me under your boot-soles.
You will hardly know who I am, or what I mean;
But I shall be good health to you nevertheless,
And filter and fibre your blood.
Failing to fetch me at first, keep encouraged;
Missing me one place, search another;
I stop somewhere, waiting for you.
— Walt Whitman, Leaves of Grass
(first (clojure-conj))

Más contenido relacionado

Destacado

A Digitalization Partnership: Sharing human and material resources by Larissa...
A Digitalization Partnership: Sharing human and material resources by Larissa...A Digitalization Partnership: Sharing human and material resources by Larissa...
A Digitalization Partnership: Sharing human and material resources by Larissa...
dduin
 
EDIT & Scientific Publishing in Natural History Institutions
EDIT & Scientific Publishing in Natural History InstitutionsEDIT & Scientific Publishing in Natural History Institutions
EDIT & Scientific Publishing in Natural History Institutions
dduin
 
Abbi sw 180 chatroom project
Abbi sw 180 chatroom projectAbbi sw 180 chatroom project
Abbi sw 180 chatroom project
AbbiJohnson
 
งานนำเสนอ1
งานนำเสนอ1งานนำเสนอ1
งานนำเสนอ1
fahasholy
 
Oš litija presentation
Oš litija presentationOš litija presentation
Oš litija presentation
Nena Mandelj
 
EJT a New Journal by Patrick Grootaert
EJT a New Journal by Patrick GrootaertEJT a New Journal by Patrick Grootaert
EJT a New Journal by Patrick Grootaert
dduin
 
Cmat powerpoint presentation
Cmat powerpoint presentationCmat powerpoint presentation
Cmat powerpoint presentation
JustBryan
 
Global References index to Biodiversity (GRIB), a bibliographic index of EDIT...
Global References index to Biodiversity (GRIB), a bibliographic index of EDIT...Global References index to Biodiversity (GRIB), a bibliographic index of EDIT...
Global References index to Biodiversity (GRIB), a bibliographic index of EDIT...
dduin
 
Optosem presentation
Optosem presentationOptosem presentation
Optosem presentation
xantec
 
Misconception of biology student
Misconception of biology studentMisconception of biology student
Misconception of biology student
mangkibone
 

Destacado (20)

20
2020
20
 
Wish you were here before!' Who Gains from Collaboration between Computer Sci...
Wish you were here before!' Who Gains from Collaboration between Computer Sci...Wish you were here before!' Who Gains from Collaboration between Computer Sci...
Wish you were here before!' Who Gains from Collaboration between Computer Sci...
 
A Digitalization Partnership: Sharing human and material resources by Larissa...
A Digitalization Partnership: Sharing human and material resources by Larissa...A Digitalization Partnership: Sharing human and material resources by Larissa...
A Digitalization Partnership: Sharing human and material resources by Larissa...
 
EDIT & Scientific Publishing in Natural History Institutions
EDIT & Scientific Publishing in Natural History InstitutionsEDIT & Scientific Publishing in Natural History Institutions
EDIT & Scientific Publishing in Natural History Institutions
 
Common book
Common bookCommon book
Common book
 
Abbi sw 180 chatroom project
Abbi sw 180 chatroom projectAbbi sw 180 chatroom project
Abbi sw 180 chatroom project
 
งานนำเสนอ1
งานนำเสนอ1งานนำเสนอ1
งานนำเสนอ1
 
Google apps og cloud computing i Odense Kommune
Google apps og cloud computing i Odense KommuneGoogle apps og cloud computing i Odense Kommune
Google apps og cloud computing i Odense Kommune
 
Oš litija presentation
Oš litija presentationOš litija presentation
Oš litija presentation
 
EJT a New Journal by Patrick Grootaert
EJT a New Journal by Patrick GrootaertEJT a New Journal by Patrick Grootaert
EJT a New Journal by Patrick Grootaert
 
Assessing social and economic impacts of building materials
Assessing social and economic impacts of building materialsAssessing social and economic impacts of building materials
Assessing social and economic impacts of building materials
 
E twinning star
E twinning starE twinning star
E twinning star
 
e Twinning star
e Twinning stare Twinning star
e Twinning star
 
Historia Procesorów
Historia ProcesorówHistoria Procesorów
Historia Procesorów
 
Cmat powerpoint presentation
Cmat powerpoint presentationCmat powerpoint presentation
Cmat powerpoint presentation
 
Global References index to Biodiversity (GRIB), a bibliographic index of EDIT...
Global References index to Biodiversity (GRIB), a bibliographic index of EDIT...Global References index to Biodiversity (GRIB), a bibliographic index of EDIT...
Global References index to Biodiversity (GRIB), a bibliographic index of EDIT...
 
Optosem presentation
Optosem presentationOptosem presentation
Optosem presentation
 
ソーシャルテレビカンファレンス2013 基礎講座 深田パート
ソーシャルテレビカンファレンス2013 基礎講座 深田パートソーシャルテレビカンファレンス2013 基礎講座 深田パート
ソーシャルテレビカンファレンス2013 基礎講座 深田パート
 
Misconception of biology student
Misconception of biology studentMisconception of biology student
Misconception of biology student
 
Assessing the built environment's contribuition to sustainable development
Assessing the built environment's contribuition to sustainable developmentAssessing the built environment's contribuition to sustainable development
Assessing the built environment's contribuition to sustainable development
 

Último

➥🔝 7737669865 🔝▻ narsinghpur Call-girls in Women Seeking Men 🔝narsinghpur🔝 ...
➥🔝 7737669865 🔝▻ narsinghpur Call-girls in Women Seeking Men  🔝narsinghpur🔝  ...➥🔝 7737669865 🔝▻ narsinghpur Call-girls in Women Seeking Men  🔝narsinghpur🔝  ...
➥🔝 7737669865 🔝▻ narsinghpur Call-girls in Women Seeking Men 🔝narsinghpur🔝 ...
nirzagarg
 
Vip Mumbai Call Girls Mumbai Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Mumbai Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Mumbai Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Mumbai Call On 9920725232 With Body to body massage wit...
amitlee9823
 
Top Rated Call Girls South Mumbai : 9920725232 We offer Beautiful and sexy Ca...
Top Rated Call Girls South Mumbai : 9920725232 We offer Beautiful and sexy Ca...Top Rated Call Girls South Mumbai : 9920725232 We offer Beautiful and sexy Ca...
Top Rated Call Girls South Mumbai : 9920725232 We offer Beautiful and sexy Ca...
amitlee9823
 
Vip Mumbai Call Girls Mira Road Call On 9920725232 With Body to body massage ...
Vip Mumbai Call Girls Mira Road Call On 9920725232 With Body to body massage ...Vip Mumbai Call Girls Mira Road Call On 9920725232 With Body to body massage ...
Vip Mumbai Call Girls Mira Road Call On 9920725232 With Body to body massage ...
amitlee9823
 
Sanjay Nagar Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalor...
Sanjay Nagar Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalor...Sanjay Nagar Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalor...
Sanjay Nagar Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalor...
amitlee9823
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN ABUDHABI,DUBAI MA...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN ABUDHABI,DUBAI MA...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN ABUDHABI,DUBAI MA...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN ABUDHABI,DUBAI MA...
Health
 
ELECTRICITÉ TMT 55.pdf electrick diagram manitout
ELECTRICITÉ TMT 55.pdf electrick diagram manitoutELECTRICITÉ TMT 55.pdf electrick diagram manitout
ELECTRICITÉ TMT 55.pdf electrick diagram manitout
ssjews46
 
一比一原版(PU学位证书)普渡大学毕业证学历认证加急办理
一比一原版(PU学位证书)普渡大学毕业证学历认证加急办理一比一原版(PU学位证书)普渡大学毕业证学历认证加急办理
一比一原版(PU学位证书)普渡大学毕业证学历认证加急办理
ezgenuh
 
➥🔝 7737669865 🔝▻ pathankot Call-girls in Women Seeking Men 🔝pathankot🔝 Esc...
➥🔝 7737669865 🔝▻ pathankot Call-girls in Women Seeking Men  🔝pathankot🔝   Esc...➥🔝 7737669865 🔝▻ pathankot Call-girls in Women Seeking Men  🔝pathankot🔝   Esc...
➥🔝 7737669865 🔝▻ pathankot Call-girls in Women Seeking Men 🔝pathankot🔝 Esc...
nirzagarg
 
Top Rated Call Girls Mumbai Central : 9920725232 We offer Beautiful and sexy ...
Top Rated Call Girls Mumbai Central : 9920725232 We offer Beautiful and sexy ...Top Rated Call Girls Mumbai Central : 9920725232 We offer Beautiful and sexy ...
Top Rated Call Girls Mumbai Central : 9920725232 We offer Beautiful and sexy ...
amitlee9823
 
Top Rated Call Girls Vashi : 9920725232 We offer Beautiful and sexy Call Girl...
Top Rated Call Girls Vashi : 9920725232 We offer Beautiful and sexy Call Girl...Top Rated Call Girls Vashi : 9920725232 We offer Beautiful and sexy Call Girl...
Top Rated Call Girls Vashi : 9920725232 We offer Beautiful and sexy Call Girl...
amitlee9823
 
➥🔝 7737669865 🔝▻ Asansol Call-girls in Women Seeking Men 🔝Asansol🔝 Escorts...
➥🔝 7737669865 🔝▻ Asansol Call-girls in Women Seeking Men  🔝Asansol🔝   Escorts...➥🔝 7737669865 🔝▻ Asansol Call-girls in Women Seeking Men  🔝Asansol🔝   Escorts...
➥🔝 7737669865 🔝▻ Asansol Call-girls in Women Seeking Men 🔝Asansol🔝 Escorts...
amitlee9823
 
Vip Hot Call Girls 🫤 Mahipalpur ➡️ 9711199171 ➡️ Delhi 🫦 Whatsapp Number
Vip Hot Call Girls 🫤 Mahipalpur ➡️ 9711199171 ➡️ Delhi 🫦 Whatsapp NumberVip Hot Call Girls 🫤 Mahipalpur ➡️ 9711199171 ➡️ Delhi 🫦 Whatsapp Number
Vip Hot Call Girls 🫤 Mahipalpur ➡️ 9711199171 ➡️ Delhi 🫦 Whatsapp Number
kumarajju5765
 

Último (20)

➥🔝 7737669865 🔝▻ narsinghpur Call-girls in Women Seeking Men 🔝narsinghpur🔝 ...
➥🔝 7737669865 🔝▻ narsinghpur Call-girls in Women Seeking Men  🔝narsinghpur🔝  ...➥🔝 7737669865 🔝▻ narsinghpur Call-girls in Women Seeking Men  🔝narsinghpur🔝  ...
➥🔝 7737669865 🔝▻ narsinghpur Call-girls in Women Seeking Men 🔝narsinghpur🔝 ...
 
How To Fix Mercedes Benz Anti-Theft Protection Activation Issue
How To Fix Mercedes Benz Anti-Theft Protection Activation IssueHow To Fix Mercedes Benz Anti-Theft Protection Activation Issue
How To Fix Mercedes Benz Anti-Theft Protection Activation Issue
 
Vip Mumbai Call Girls Mumbai Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Mumbai Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Mumbai Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Mumbai Call On 9920725232 With Body to body massage wit...
 
Top Rated Call Girls South Mumbai : 9920725232 We offer Beautiful and sexy Ca...
Top Rated Call Girls South Mumbai : 9920725232 We offer Beautiful and sexy Ca...Top Rated Call Girls South Mumbai : 9920725232 We offer Beautiful and sexy Ca...
Top Rated Call Girls South Mumbai : 9920725232 We offer Beautiful and sexy Ca...
 
Vip Mumbai Call Girls Mira Road Call On 9920725232 With Body to body massage ...
Vip Mumbai Call Girls Mira Road Call On 9920725232 With Body to body massage ...Vip Mumbai Call Girls Mira Road Call On 9920725232 With Body to body massage ...
Vip Mumbai Call Girls Mira Road Call On 9920725232 With Body to body massage ...
 
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verifiedConnaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
Connaught Place, Delhi Call girls :8448380779 Model Escorts | 100% verified
 
Sanjay Nagar Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalor...
Sanjay Nagar Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalor...Sanjay Nagar Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalor...
Sanjay Nagar Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalor...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN ABUDHABI,DUBAI MA...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN ABUDHABI,DUBAI MA...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN ABUDHABI,DUBAI MA...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN ABUDHABI,DUBAI MA...
 
Workplace-Hazards TLE EIM 10 QUARTER3 W2
Workplace-Hazards TLE EIM 10 QUARTER3 W2Workplace-Hazards TLE EIM 10 QUARTER3 W2
Workplace-Hazards TLE EIM 10 QUARTER3 W2
 
ELECTRICITÉ TMT 55.pdf electrick diagram manitout
ELECTRICITÉ TMT 55.pdf electrick diagram manitoutELECTRICITÉ TMT 55.pdf electrick diagram manitout
ELECTRICITÉ TMT 55.pdf electrick diagram manitout
 
John deere 425 445 455 Maitenance Manual
John deere 425 445 455 Maitenance ManualJohn deere 425 445 455 Maitenance Manual
John deere 425 445 455 Maitenance Manual
 
What Does The Engine Malfunction Reduced Power Message Mean For Your BMW X5
What Does The Engine Malfunction Reduced Power Message Mean For Your BMW X5What Does The Engine Malfunction Reduced Power Message Mean For Your BMW X5
What Does The Engine Malfunction Reduced Power Message Mean For Your BMW X5
 
一比一原版(PU学位证书)普渡大学毕业证学历认证加急办理
一比一原版(PU学位证书)普渡大学毕业证学历认证加急办理一比一原版(PU学位证书)普渡大学毕业证学历认证加急办理
一比一原版(PU学位证书)普渡大学毕业证学历认证加急办理
 
(ISHITA) Call Girls Service Jammu Call Now 8617697112 Jammu Escorts 24x7
(ISHITA) Call Girls Service Jammu Call Now 8617697112 Jammu Escorts 24x7(ISHITA) Call Girls Service Jammu Call Now 8617697112 Jammu Escorts 24x7
(ISHITA) Call Girls Service Jammu Call Now 8617697112 Jammu Escorts 24x7
 
➥🔝 7737669865 🔝▻ pathankot Call-girls in Women Seeking Men 🔝pathankot🔝 Esc...
➥🔝 7737669865 🔝▻ pathankot Call-girls in Women Seeking Men  🔝pathankot🔝   Esc...➥🔝 7737669865 🔝▻ pathankot Call-girls in Women Seeking Men  🔝pathankot🔝   Esc...
➥🔝 7737669865 🔝▻ pathankot Call-girls in Women Seeking Men 🔝pathankot🔝 Esc...
 
8377087607, Door Step Call Girls In Majnu Ka Tilla (Delhi) 24/7 Available
8377087607, Door Step Call Girls In Majnu Ka Tilla (Delhi) 24/7 Available8377087607, Door Step Call Girls In Majnu Ka Tilla (Delhi) 24/7 Available
8377087607, Door Step Call Girls In Majnu Ka Tilla (Delhi) 24/7 Available
 
Top Rated Call Girls Mumbai Central : 9920725232 We offer Beautiful and sexy ...
Top Rated Call Girls Mumbai Central : 9920725232 We offer Beautiful and sexy ...Top Rated Call Girls Mumbai Central : 9920725232 We offer Beautiful and sexy ...
Top Rated Call Girls Mumbai Central : 9920725232 We offer Beautiful and sexy ...
 
Top Rated Call Girls Vashi : 9920725232 We offer Beautiful and sexy Call Girl...
Top Rated Call Girls Vashi : 9920725232 We offer Beautiful and sexy Call Girl...Top Rated Call Girls Vashi : 9920725232 We offer Beautiful and sexy Call Girl...
Top Rated Call Girls Vashi : 9920725232 We offer Beautiful and sexy Call Girl...
 
➥🔝 7737669865 🔝▻ Asansol Call-girls in Women Seeking Men 🔝Asansol🔝 Escorts...
➥🔝 7737669865 🔝▻ Asansol Call-girls in Women Seeking Men  🔝Asansol🔝   Escorts...➥🔝 7737669865 🔝▻ Asansol Call-girls in Women Seeking Men  🔝Asansol🔝   Escorts...
➥🔝 7737669865 🔝▻ Asansol Call-girls in Women Seeking Men 🔝Asansol🔝 Escorts...
 
Vip Hot Call Girls 🫤 Mahipalpur ➡️ 9711199171 ➡️ Delhi 🫦 Whatsapp Number
Vip Hot Call Girls 🫤 Mahipalpur ➡️ 9711199171 ➡️ Delhi 🫦 Whatsapp NumberVip Hot Call Girls 🫤 Mahipalpur ➡️ 9711199171 ➡️ Delhi 🫦 Whatsapp Number
Vip Hot Call Girls 🫤 Mahipalpur ➡️ 9711199171 ➡️ Delhi 🫦 Whatsapp Number
 

Continuous Deployment of Clojure Web Applications

  • 1. Continuous Deployment of Clojure Web Applications Chas Emerick @cemerick, http://cemerick.com
  • 2. ego I am: • A Clojure programmer of > 2.5 years • Coauthor of the forthcoming “Clojure Programming” book from O’Reilly • Architect of Docuharvest • Founder of Snowtide Informatics (first (clojure-conj))
  • 3. first principles ⚛ ☺ Your Powerful Beauty Your Customers Anything that gets in the way of this happy union is the enemy. (first (clojure-conj))
  • 4. definitional bits & minor opinions • We’re focusing on small- to medium-size deployments today. • You’re (probably) not a special snowflake. Stay close to the herd, and stick to your knitting. • Application deployment is (always?) a people and process problem, not a technology problem. (first (clojure-conj))
  • 5. choosing a path “system administration” Unrepeatable, manual, undocumented; the high priesthoods oh god no (first (clojure-conj))
  • 6. choosing a path (“roll your own”) Even the most clever spike is not a solution. “Emacs + SLIME + Clojure running in GNU Screen; all requests handled by Apache; mod_proxy sends them to the appropriate Jetty instance / servlet.” – Brian Carper @ http://briancarper.net/blog/510/deploying- clojure-websites “Feel free to say: ‘duct tape and string’ and ‘You're doing it wrong’.” – Brian Carper (private email) (first (clojure-conj))
  • 7. obligatory yak photo (first (clojure-conj))
  • 8. choosing a path community? ⇒ standards ⇒ sanity • The Platonic ideal: vertically-integrated platforms, e.g. GAE, Heroku, Azure, VMWare/SpringSource platform • Dominant tools: Chef, Puppet, et al. • Clojure-centric tools: – jclouds: generic “cloud” API, provisioning – Pallet: declarative, composable configuration definition & management (first (clojure-conj))
  • 9. interlude: deployment existentialism The complexity that is visited upon us when writing software is enough; in an ideal world, we shouldn’t have to develop all this extraneous expertise in how to build, package, and deploy that software as well. There are a few things in software that I know how to do really well that make me slightly unique, and I wish I could concentrate on those rather than becoming a generalist in this, yet another vector, which is fundamentally a means to an end. History and circumstance seem to be stacked against me at the moment, though. – “…wherein I feel the pain of being a generalist” http://cemerick.com/2010/09/22/ (first (clojure-conj))
  • 10. hey jclouds! • Meatspace: e.g. compute nodes, storage (local & EBS/SAN), network routing & security, IP allocation, etc • If you had an API to this infrastructurey stuff, you could make it do your bidding • Luckily: jclouds provides exactly this, for multiple cloud providers (first (clojure-conj))
  • 11. howdy pallet! • Pallet:crates :: chef:recipes • Include recipes via chef-solo if you like • Beautiful declarative expression of provisioning and configuration operations • Simple, flexible model: lift/converge/phases/tags/prefix (first (clojure-conj))
  • 12. pallet “Hello World” (def service (jcompute/compute-service "ec2” “AWS_ID” “AWS_SECRET_KEY” :ssh :log4j)) (pallet.core/defnode appserver {:os-family :ubuntu :os-description-matches "10.10" :min-ram 1024 :inbound-ports [22 8080]} :bootstrap (pallet.resource/phase (admin/automated-admin-user)) :configure (pallet.resource/phase (pallet.crate.java/java :openjdk) (tomcat/tomcat)) :deploy (pallet.resource/phase (web-deploy warfile-path :port 8080))) (pallet.core/converge {appserver 1} :compute service :prefix “demo” :phase [:deploy]) (first (clojure-conj))
  • 13. get thee a .war file • Allows you to deploy to any Java app server & platforms like Google App Engine and the Spring/VMWare platform • Seriously, it’s not difficult: – Maven: baked in war packaging – Leiningen/Cake: leiningen-war plugin – Gradle, Buildr, rake: Surely simple enough (first (clojure-conj))
  • 15. embedded Jetty/Grizzly • Great for experimentation and throughout development, e.g. jetty directly supported in ring/compojure • In production environments: roll-your-own that buys you nothing, therefore unnecessarily evil. (first (clojure-conj))
  • 16. Tomcat, JBoss, Glassfish et al. • Huge communities guarantee: • tool integration (e.g. profilers) • tons of experienced devs • books • monitoring and management support • resource management (e.g. DB connection pools) • clustering (e.g. Shoal) • commercial/paid support • You will eventually need these; give yourself the chance to take advantage of these resources (first (clojure-conj))
  • 17. now for the (continuous) part Craft more power & beauty git push Hudson pulls <build process here> provision / configure (first (clojure-conj))
  • 18. automate or die Craft more power & beauty git push Hudson pulls <build process here> provision / configure (first (clojure-conj))
  • 19. links Resources that will eventually be available: Slides: linked from my blog @ http://cemerick.com Code: http://github.com/cemerick/clojure-web-deploy-conj Credits: • Hugo Duncan et al. http://github.com/hugoduncan/pallet • Adrian Cole et al. http://code.google.com/p/jclouds • ClojureNYC and Western Mass Dev Group attendees that suffered through earlier revs of this talk (first (clojure-conj))
  • 20. Thank You! I too am not a bit tamed—I too am untranslatable; I sound my barbaric yawp over the roofs of the world. The last scud of day holds back for me; It flings my likeness after the rest, and true as any, on the shadow’d wilds; It coaxes me to the vapor and the dusk. I depart as air—I shake my white locks at the runaway sun; I effuse my flesh in eddies, and drift it in lacy jags. I bequeathe myself to the dirt, to grow from the grass I love; If you want me again, look for me under your boot-soles. You will hardly know who I am, or what I mean; But I shall be good health to you nevertheless, And filter and fibre your blood. Failing to fetch me at first, keep encouraged; Missing me one place, search another; I stop somewhere, waiting for you. — Walt Whitman, Leaves of Grass (first (clojure-conj))