Chef Application Cookbook Showcase

This Vagrant project on github ( https://github.com/iteh/vagrant-demos/ ) showcases the application cookbook for chef

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.

Chef-Solo Tweaks

Databags and Chef-Search are ment to be used with chef client. The application cookbook makes heavy use of this chef features. To be able to use it in a vagrant/chef-solo environment some tweaks are necessary.

To tell Vagrant about the databags we have have to add this monkeypatch: Vagrant_monkeypatch.rb Chef solo still does not know how to read the databags from file and how to search and save without a server. This is done with cookbooks/vagrant/libraries/chef_solo_databag_patch.rb which is extended from chef_solo_patch.rb

save does nothing at the moment. It “works” for demonstration/development purposes. search is rather dumb at the moment.

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

blog comments powered by Disqus

related Articles:

Deployment of Java Web Applications with Chef from Opscode

There is a rework of the data driven deployment of java web applications. This Vagrant project on github ( https://github.com/iteh/vagrant-demos/ ) showcases the application cookbook for chef with a reworked application definition and LWRP for...

Links der Woche vom 2011-05-23 bis 2011-05-29

Diese Woche Links zu den Themen Windows, Ruby, opscode, JavaScript, maps, Leaflet, WordPress, Chef, windows, powershell, opschef, ios, ruby, devops, sysadmin, monitoringsucks

Links der Woche vom 2011-05-16 bis 2011-05-22

Diese Woche Links zu den Themen coffeebeans, Rails, CoffeeScript, Array, Ruby, Chef, Django, zo, devops, sysadmin, git, chef, CSS3, HTML5, WordPress, nipplegate, MongoDB, rails, rails3, asciicast, test, Android, opschef, Gem, aws, slim, Haml, ruby

Links der Woche vom 2011-05-09 bis 2011-05-15

Diese Woche Links zu den Themen wi, opschef, ActiveAdmin, rails, ror, ruby, HTML5, Chef, cnet, MongoDB, Sinatra, Rack, apple, git, aws, chef, opscode, sysadmin, Ksplice, noSQL, RubyTutorials, CSS3, EC2, AWS, MacRuby, iOS, m

Links der Woche vom 2011-04-11 bis 2011-04-17

Diese Woche Links zu den Themen ipad, iphone, opschef, ruby, OpenCV, detection, image, Weinberg, Ohai, automation, pr, test, gem, cloudfoundry, devops, cfoundry

Links der Woche vom 2011-04-04 bis 2011-04-10

Diese Woche Links zu den Themen Pow, Rack, ActiveRecord, Rails, Algorithms, Ruby, rails, optimize, CSS3, railscasts, chat, macbook, opschef, ruby

Links der Woche vom 2011-03-28 bis 2011-04-03

Diese Woche Links zu den Themen design, utilities, rails, asciicast, gem, ux, Awesome, jQuery, devops, Git, radiantcms, rvm, opschef, osx, MacRuby, chef, opscode, Rails, i18n, java, Vagrant, automation, Typography, Type

Links der Woche vom 2011-03-21 bis 2011-03-27

Diese Woche Links zu den Themen MacRuby, Java, Ruby, Mirah, CSS, refreshtoplayagain, gainsboro, photo, Design, mechanize, capybara, PHP, Rails, html5, webdesign, XCode, iPads, WordPress, Vagrant, Opscode, RUBY, Selenium, php, opschef, osx, devops,...

Links der Woche vom 2011-03-14 bis 2011-03-20

Diese Woche Links zu den Themen opschef, chef, mwrc, saas, Subscription, Billing, git, ruby, HTTP, Rails, Caching, devops, vagrant, opscode, Wordpress

Wordpress über JSON Api mit Facebook Page oder Tumblr befüllen

In diesem Beispiel zeigen wir die Installation von Wordpress in einem Ubuntu LAMP Stack. Weiters wird das JSON-Api Plugin für Wordpress und ein Theme installiert. Danach wird mit Mechanize der Wordpress Blog automatisch installiert und...