rubystack: the easiest way to deploy ruby on rails

30
    RubyStack: the easiest way to deploy Ruby on Rails

Upload: elliando-dias

Post on 26-May-2015

1.480 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: RubyStack: the easiest way to deploy Ruby on Rails

 

 

 

 

RubyStack: the easiest way to deploy Ruby on Rails

Page 2: RubyStack: the easiest way to deploy Ruby on Rails

  

Who is danoo ... ?• Daniel Liszka, Polish• started with Linux: 10 years ago• Linux security labs, Linux Security final project in high 

school• studied at Silesian University of Technology, Gliwice• organized conference Open Source in Organization – 

Interinfo_2004, Gliwice

Page 3: RubyStack: the easiest way to deploy Ruby on Rails

  

I met www.BitRock.com

And  everything really started ...

Page 4: RubyStack: the easiest way to deploy Ruby on Rails

  

Meet BitRock          • Founded in 2003, privately held with offices in Seville, Spain and 

San Francisco, USA

• Develops packaging, installation and update tools to provide a complete Open Source Application Deployment solution 

• Clients span the globe, and include Fortune 100 corporations, governments, educational institutions, and the leading open source companies 

• Recent honors include Red Herring 100 Winner and Red Herring Open Source 20 Winner

OPEN SOURCE 20

Page 5: RubyStack: the easiest way to deploy Ruby on Rails

  

www.BitRock.com

• BitRock makes open source software easier to use by providing a complete automated solution for Open Source Application Deployment.

• Makes it fun• brings it to people 

Page 6: RubyStack: the easiest way to deploy Ruby on Rails

  

Ruby• “Ruby is a dynamic, object­oriented programming 

language. It combines syntax inspired by Perl with Smalltalk­like object­oriented features, and also shares some features with Python, Lisp, Dylan, and CLU. Its official implementation is free software written in C.”

• Beautiful• FUN !!!

Page 7: RubyStack: the easiest way to deploy Ruby on Rails

  

Ruby# In an object instance variable (denoted with '@'), 

remember a block.

def remember(&a_block)

        @block = a_block

end

 

# Invoke the above method, giving it a block that takes a name.

remember {|name| puts "Hello, #{name}!"}

 

# When the time is right (for the object) ­­ call the closure!

@block.call("Jon")

# => "Hello, Jon!"

Page 8: RubyStack: the easiest way to deploy Ruby on Rails

  

Ruby on Rails• “web application framework that aims to increase the 

speed and ease with which database­driven web sites can be created and offers skeleton code frameworks (scaffolding) from the outset. Often shortened to Rails, or RoR, Ruby on Rails is an open source project written in the Ruby programming language and applications using the Rails framework are developed using the Model­View­Controller design pattern”

• Beautifull• FUN !!!

Page 9: RubyStack: the easiest way to deploy Ruby on Rails

  

It is my story• We decided to start with RoR• Lovely !• me as a developer, I need development environment• My team needs development environment – it would 

be cool if both are the same • My graphics designer needs it as well • They have different operating systems, different 

requirements (GUI,text mode,...) and skills • I want to use several environments on one machine 

Page 10: RubyStack: the easiest way to deploy Ruby on Rails

  

It is my story• DEMO day is coming !!!• deployment• scale your application ­ > several servers• deployment on many servers 

– chroot– Vmware, XEN– Solaris Zones– Amazon EC2

Page 11: RubyStack: the easiest way to deploy Ruby on Rails

  

We need• Ruby and Ruby Gems• RoR• MySQL, SQLite• Apache• Subversion• libraries

Page 12: RubyStack: the easiest way to deploy Ruby on Rails

  

We need at least that . . . (RubyStack Features)

• completely self­contained• re­locatable• not interfere with existing software• works on different operating systems • easy to install

Page 13: RubyStack: the easiest way to deploy Ruby on Rails

  

TOOLS

Page 14: RubyStack: the easiest way to deploy Ruby on Rails

  

RubyStack Installer• created using BitRock InstallBuilder• easy to use• multiplatform • native look and feel• GUI, text and unattended modes• Platforms: Linux, Mac OS X, Windows, Solaris, ...• No External Dependencies

Page 15: RubyStack: the easiest way to deploy Ruby on Rails

  

Apart from that ....• Desktop Integration• RPM and DEB generation (beta)• Optimized : BitRock installers are optimized in size and 

speed• Ease of Development• Support for Qt® GUI Frontend• Uninstall Functionality• LZIP• Multiple Language Support

Page 16: RubyStack: the easiest way to deploy Ruby on Rails

  

InstallBuilder (RubyStack Installer)

Page 17: RubyStack: the easiest way to deploy Ruby on Rails

  

InstallBuilder (RubyStack Installer)

Page 18: RubyStack: the easiest way to deploy Ruby on Rails

  

InstallBuilder (RubyStack Installer)

Page 19: RubyStack: the easiest way to deploy Ruby on Rails

  

InstallBuilder (RubyStack Installer)

Page 20: RubyStack: the easiest way to deploy Ruby on Rails

  

Unattended modeMany different options:# rubystack­1.0­linux­installer.bin ­­mode unattended ­­

prefix /secure/tmp/ruby_unatended ­­rubystack_version production ­­apache_server_port 4568 ­­mysql_port 4321 ­­mysql_db_name blabla

Page 21: RubyStack: the easiest way to deploy Ruby on Rails

  

Take a look at Capistrano tool (capify.org)  desc "Install RubyStack"

  task :install do

    run "! test ­d #{rubystack_path}"

    install_string = "./#{rubystack_binary}

         ­­mode unattended

         ­­prefix #{rubystack_path}

         ­­rubystack_version production

         ­­apache_server_port #{rubystack_apache_port}

         ­­mysql_port #{rubystack_mysql_port}

         ­­mysql_db_name #{application}

         ­­mysql_db_username #{application}­user"

  if rubystack_apache_port < 1024

      sudo install_string

    else

      run install_string

    end

    run "echo \". #{rubystack_path}/scripts/setenv.sh\" >> ~/.bashrc"

  end

Page 22: RubyStack: the easiest way to deploy Ruby on Rails

  

Take a look at Capistrano tool (capify.org)• “Great for automating tasks via SSH on remote servers, 

like software installation, application deployment, configuration management, ad hoc server monitoring, and more.

• Ideal for system administrators, whether professional or incidental.

• Easy to customize.• Easy to extend. Capistrano is written in the Ruby”

Page 23: RubyStack: the easiest way to deploy Ruby on Rails

 

 

 

 

Conclusions (for the RubyStack Installer)

­ let's start demo

Page 24: RubyStack: the easiest way to deploy Ruby on Rails

 

 

 

 

It is not the end ­ do you remember the components we need ?

­ and very specific features ?(completely self­contained,re­locatable

not interfere with existing software)

Page 25: RubyStack: the easiest way to deploy Ruby on Rails

  

RubyStack Componentszlib version: 1.2.3

libiconv version: 1.9.2

openssl version: 0.9.7l

sqlite version: 3.3.6

httpd version: 2.2.4

mysql version: 5.0.45

libpng version: 1.2.10

jpegsrc version: v6b

freetype version: 2.3.4

libwmf version: 0.2.8.4

ghostscript version: 8.56

ImageMagick version: 6.3.4

expat version: 2.0.0

neon version: 0.25.5

subversion version: 1.4.4

ncurses version: 5.6

readline version: 5.2

ruby version: 1.8.6

rubygems version: 0.9.4

rake version: 0.7.3

rails version: 1.2.3

fastthread version: 1.0

mongrel version: 1.0.1

rmagick version: 1.15.6

mongrel_cluster version: 1.0.2

gruff version: 0.2.8

capistrano version: 2.0.0

Page 26: RubyStack: the easiest way to deploy Ruby on Rails

  

Lets take a look inside

• Building & testing system• Integration• logic inside XML files• Wrappers ?!?

Page 27: RubyStack: the easiest way to deploy Ruby on Rails

  

Lets take a look inside

• Examples: svn and ruby binaries and wrappers• Lets try to run them• LD_LIBRARY_PATH ­> wrappers• what about the shebang line• rubyconsole & rubystackctl.sh

Page 28: RubyStack: the easiest way to deploy Ruby on Rails

 

 

 

 

Conclusions­ RubyStack is great platform

­ not finished yet­ but already tested in production

Page 29: RubyStack: the easiest way to deploy Ruby on Rails

 

 

 

 

Questions ???

Page 30: RubyStack: the easiest way to deploy Ruby on Rails

 

 

 

 

Thank you !Daniel Liszka

[email protected]