Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Warbler
Nick Sieger
nsieger@engineyard.com
http://www.flickr.com/photos/19474221@N08/4380605668/
http://www.flickr.com/photos/emayoh/479260033/
new audience
Warbler is all about taking Ruby to new audiences
http://www.flickr.com/photos/tochis/3431207670/
go places
Going places where it hasn’t been
http://www.flickr.com/photos/ramdac/373881476/
and make it easy for you as well as others to operate the application.
http://www.flickr.com/photos/jpellgen/4376586751/
so if you are the operator and you’re used to having control
http://www.flickr.com/photos/richardholden/1161508160/
and you don’t need to throw a deployable over the wall to someone e...
http://www.flickr.com/photos/piratealice/3082374723/
then Warbler might not be for you.
http://www.flickr.com/photos/jamesjordan/2570457478/
Home Sweet JVM
However, if you’re willing to run wherever there’s a J...
http://duke.kenai.com/SunRIP/index.html
write once run
anywhere?
http://www.flickr.com/photos/bagalute/5075946007/
write cext compile
everywhere!
putting a c compiler on your production b...
Warbler Uses
Portable
Web applications
Ruby GUIs
Distribution without
source code
No control over
deployment
Simplify
deployment
package once, copy to all the machines where you need to deploy it.
no setting up ruby, gems
also can ...
http://www.flickr.com/photos/marioraffin/368414252/
Windows!
http://www.flickr.com/photos/epublicist/3546059144/
Warbler started as a square-peg-round-hole kind of problem.
rails_app
controllers
config
db
lib
images
test
vendor
app
helpers
models
views
public
javascripts
stylesheets
WEB-INF
webapp.war
images
javascripts
stylesheets
WEB-INF
controllers
config
app
helpers
models
views
lib
vendor
rails_app rails_app.war
class...
INSTALL gem install warbler
Getting Started
You don’t even have to have JRuby installed at this point.
$ warble
rm -f railsapp.war
Creating railsapp.war
That’s it!
Gemfile
Gem::Specification.new do |s|
s.name = %q{rake}
s.version = "0.8.7"
s.default_executable = %q{rake}
s.files = [ ... ]
s.re...
$ warble config
cp .../warble.rb config/warble.rb
# config/warble.rb
# Warbler web application assembly configuration file
Warbler::Config.new do |config|
# full documentat...
Warbler::Task.new("jar1",
Warbler::Config.new do |config|
config.jar_name = "jar1"
end)
Warbler::Task.new("jar2",
Warbler:...
Task
Config
Jar
Traits
War
Jar
Bundler
Gemspec
Rails
Rack
require 'warbler'
jar = Warbler::Jar.new
jar.files["directory"] = nil # directory entry
jar.files["inline.txt"] = StringIO...
$ unzip -l sample.jar
Archive: sample.jar
Length Date Time Name
-------- ---- ---- ----
0 11-11-10 13:17 directory/
9 11-1...
Features
warble executable compiled war
Demos!
SSID: NickSieger
http://vanguard.local/ringpiano.jar
Coming Soon
Unpacking/Caching
Choose web server:
Jetty or Winstone
(or ______ )
Summer of Code:
ruby_archive
java -jar railsapp.war
-S rake db:migrate
bugs + your feedback
Warbler 1.3.0
beta1 available now
INSTALL gem install warbler --pre
Upcoming SlideShare
Loading in …5
×

Warbler at RubyConf 2010

2,086 views

Published on

Published in: Technology, Sports
  • Be the first to comment

Warbler at RubyConf 2010

  1. 1. Warbler Nick Sieger nsieger@engineyard.com http://www.flickr.com/photos/19474221@N08/4380605668/
  2. 2. http://www.flickr.com/photos/emayoh/479260033/ new audience Warbler is all about taking Ruby to new audiences
  3. 3. http://www.flickr.com/photos/tochis/3431207670/ go places Going places where it hasn’t been
  4. 4. http://www.flickr.com/photos/ramdac/373881476/ and make it easy for you as well as others to operate the application.
  5. 5. http://www.flickr.com/photos/jpellgen/4376586751/ so if you are the operator and you’re used to having control
  6. 6. http://www.flickr.com/photos/richardholden/1161508160/ and you don’t need to throw a deployable over the wall to someone else
  7. 7. http://www.flickr.com/photos/piratealice/3082374723/ then Warbler might not be for you.
  8. 8. http://www.flickr.com/photos/jamesjordan/2570457478/ Home Sweet JVM However, if you’re willing to run wherever there’s a JVM, then we can do some interesting things.
  9. 9. http://duke.kenai.com/SunRIP/index.html write once run anywhere?
  10. 10. http://www.flickr.com/photos/bagalute/5075946007/ write cext compile everywhere! putting a c compiler on your production box always felt to me like repaving a road every time you start a new trip
  11. 11. Warbler Uses
  12. 12. Portable Web applications
  13. 13. Ruby GUIs
  14. 14. Distribution without source code
  15. 15. No control over deployment
  16. 16. Simplify deployment package once, copy to all the machines where you need to deploy it. no setting up ruby, gems also can version easily since JRuby is bundled in the war file.
  17. 17. http://www.flickr.com/photos/marioraffin/368414252/ Windows!
  18. 18. http://www.flickr.com/photos/epublicist/3546059144/ Warbler started as a square-peg-round-hole kind of problem.
  19. 19. rails_app controllers config db lib images test vendor app helpers models views public javascripts stylesheets
  20. 20. WEB-INF webapp.war
  21. 21. images javascripts stylesheets WEB-INF controllers config app helpers models views lib vendor rails_app rails_app.war classes controllers config db lib images test vendor app helpers models views public javascripts stylesheets
  22. 22. INSTALL gem install warbler Getting Started You don’t even have to have JRuby installed at this point.
  23. 23. $ warble rm -f railsapp.war Creating railsapp.war
  24. 24. That’s it!
  25. 25. Gemfile
  26. 26. Gem::Specification.new do |s| s.name = %q{rake} s.version = "0.8.7" s.default_executable = %q{rake} s.files = [ ... ] s.require_paths = ["lib"] # s.add_dependency 'lib', ["= VERS"] end
  27. 27. $ warble config cp .../warble.rb config/warble.rb
  28. 28. # config/warble.rb # Warbler web application assembly configuration file Warbler::Config.new do |config| # full documentation here end
  29. 29. Warbler::Task.new("jar1", Warbler::Config.new do |config| config.jar_name = "jar1" end) Warbler::Task.new("jar2", Warbler::Config.new do |config| config.jar_name = "jar2" end) require 'warbler' Warbler::Task.new
  30. 30. Task Config Jar Traits War Jar Bundler Gemspec Rails Rack
  31. 31. require 'warbler' jar = Warbler::Jar.new jar.files["directory"] = nil # directory entry jar.files["inline.txt"] = StringIO.new("in memory") jar.files["path/a.txt"] = "a.txt" # disk file jar.create("sample.jar")
  32. 32. $ unzip -l sample.jar Archive: sample.jar Length Date Time Name -------- ---- ---- ---- 0 11-11-10 13:17 directory/ 9 11-11-10 13:17 inline.txt 0 11-11-10 13:17 path/ 0 11-11-10 13:17 path/a.txt -------- ------- 9 4 files
  33. 33. Features warble executable compiled war
  34. 34. Demos!
  35. 35. SSID: NickSieger http://vanguard.local/ringpiano.jar
  36. 36. Coming Soon
  37. 37. Unpacking/Caching
  38. 38. Choose web server: Jetty or Winstone (or ______ )
  39. 39. Summer of Code: ruby_archive
  40. 40. java -jar railsapp.war -S rake db:migrate
  41. 41. bugs + your feedback
  42. 42. Warbler 1.3.0 beta1 available now INSTALL gem install warbler --pre

×