Deployment von Java Web Applikationen mit Chef von Opscode
Erstellt um 13:45 von DI Edmund HaselwanterThere 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 Tomcat.
Data Driven Java Application Deployment got better
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. In this rework we add a tomcat_context LWRP and move the application recipes to definitions.
Now we can use something like this:
app = JSON.parse(File.open( File.join( File.dirname(__FILE__), \
"../databags/jolokia.json")).read)
node.run_state[:current_app] = app
application_java_webapp “jolokia-java_webapp”
application_tomcat “jolokia-tomcat”
node.run_state.delete(:current_app)
The configuration is still the same and 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.
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-reworked” 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
Weitere Artikel die Sie interessieren könnten:
Links der Woche vom 2011-05-23 bis 2011-05-29Diese 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-22Diese 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-15Diese 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-25 bis 2011-05-01Diese Woche Links zu den Themen op, oschef, opscode, LWRP, Noah, chef, devops, opschef, rails, gem, railscast, Chef
Links der Woche vom 2011-04-18 bis 2011-04-24Diese Woche Links zu den Themen rails, gem, opscode, git, ec2, gluster
Links der Woche vom 2011-04-11 bis 2011-04-17Diese Woche Links zu den Themen ipad, iphone, opschef, ruby, OpenCV, detection, image, Weinberg, Ohai, automation, pr, test, gem, cloudfoundry, devops, cfoundry
Data Driven Deployment einer Java Web Application mit Chef SoloChef Application Cookbook Showcase Dieses Vagrant Projekt auf unserem Github Repository ( https://github.com/iteh/vagrant-demos/ ) zeigt die Verwendung des Application Cookbooks für Chef
Links der Woche vom 2011-04-04 bis 2011-04-10Diese 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-03Diese 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-27Diese 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,...


