Example build files are available at http://mark.gruden.com/masters-of-war-build-files.zip
Mark walks though how to create a scalable and automated deployment process for Coldfusion apps using Ant. Starting with some reverse engineering of CF's built-in WAR deployment process, we'll then be working through to the separation of application code, the CF runtime and CF's configuration files into distinct elements that can be versioned independently and finally looking at how these assets can be deployed selectively to a number of servers and put back together into running applications.
23. Web Application
aRchives
“JAR file used to distribute a collection of JavaServer
Pages, servlets, Java classes, XML files, tag libraries
and static Web pages (HTML and related files) that
together constitute a Web application.”
http://en.wikipedia.org/wiki/WAR_(Sun_file_format)
38. Mixed Purpose
Mango A B Mango A B Sites
JRun Management
Blog Apps Blog Apps WAR/EAR Applications
Console
staging production admin J2EE Server
Jrun Installation
39. Memory Allocation
Mango A B Mango A B Sites
JRun Management
Blog Apps Blog Apps WAR/EAR Applications
Console
staging production admin J2EE Server
500MB 1GB 200MB
Jrun Installation
40. JRun Architecture
Mango A B Mango A B Apache Virtuals
JRun Management
Blog Apps Blog Apps Instances of Coldfusion
Console
staging production admin JVM instances
500MB 1GB 200MB
Jrun Installation
41. JRun Architecture
Mango A B Mango A B
jrun-web.xml
JRun Management
Blog Apps Blog Apps license.properies
Console
neo-*.xml
jvm.config
staging production admin jrun.xml
jndi.properties
500MB 1GB 200MB
Jrun Installation servers.xml
53. Application
Configuration
• {app-name}/WEB-INF/jrun-web.xml
• <context-root>/</context-root> is missing
by default
• Applications run under /{app-name}
75. Recap
• Created empty JRun server
• Created WAR containing empty CF instance
76. Recap
• Created empty JRun server
• Created WAR containing empty CF instance
• Integrated with Ant build
77. Recap
• Created empty JRun server
• Created WAR containing empty CF instance
• Integrated with Ant build
• Deployed WAR into JRun server along with
CF code
90. Other uses for Ant
• Checkout from version control / Tag revision
91. Other uses for Ant
• Checkout from version control / Tag revision
• Minify & combine JS
92. Other uses for Ant
• Checkout from version control / Tag revision
• Minify & combine JS
• Run database update scripts
93. Other uses for Ant
• Checkout from version control / Tag revision
• Minify & combine JS
• Run database update scripts
• Run unit tests
94. Other uses for Ant
• Checkout from version control / Tag revision
• Minify & combine JS
• Run database update scripts
• Run unit tests
• Send notification email/SMS
95. Other uses for Ant
• Checkout from version control / Tag revision
• Minify & combine JS
• Run database update scripts
• Run unit tests
• Send notification email/SMS
• Continuous integration / scheduled builds