Chef Application Cookbook Showcase
Data Driven Java Application Deployment
The application cookbook helps to install a full application stack for java web applications. It abstracts the
installation of apache, tomcat and mysql to be modeled through a data driven concept.
At the core of this concept is the description of the application dependencies with json data. In this showcase we
deploy the application “probe” to a tomcat6 container behind a apache2 reverse_proxy.
the configuration can be found in databags/apps/java_app.json
It defines the server name and alias, the war and container context as well as the database to use.
h2. Run it
Download the archive or to a git clone. Ensure that you have a proper Vagrant environment installed.
Change to the “vagrant-java-application” directory and enter
$ vagrant up
This will download the lucid32 box (500 MB so this can take a while on the first download) and do the provisioning
after the chef-solo run you can access http://java_app.smackaho.st:4567/probe/ with the username “probe” and the password “probe”
this hits the application through apache. http://java_app.smackaho.st:4568/probe/ will hit tomcat directly.
To prove the jdbc connection go to http://java_app.smackaho.st:4567/probe/sql/datasourcetest.htm?webapp=/probe&resource=jdbc/java_app