Skip to content

Instantly share code, notes, and snippets.

@madAndroid
Forked from nathany/deploy.rb
Created February 13, 2013 07:40
Show Gist options
  • Select an option

  • Save madAndroid/4942929 to your computer and use it in GitHub Desktop.

Select an option

Save madAndroid/4942929 to your computer and use it in GitHub Desktop.

Revisions

  1. @nathany nathany revised this gist Mar 8, 2011. 1 changed file with 31 additions and 5 deletions.
    36 changes: 31 additions & 5 deletions install.rb
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,11 @@
    package :rvm do
    description 'Ruby Version Manager'
    runner 'curl -LsS http://bit.ly/rvm-install-system-wide > rvm-install-system-wide'
    runner 'bash < ./rvm-install-system-wide'
    runner ['curl -LsS http://bit.ly/rvm-install-system-wide > rvm-install-system-wide', 'bash < ./rvm-install-system-wide'] do
    post :install, "usermod -a -G rvm vagrant" # Capistrano fetch(:user) ?
    end

    push_text "[[ -s '/usr/local/lib/rvm' ]] && source '/usr/local/lib/rvm'", "~/.profile"

    requires :rvm_dependencies

    verify do
    @@ -10,13 +14,35 @@
    end

    package :rvm_dependencies do
    description 'Ruby Version Manager Build Dependencies'
    apt %w(curl bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev git-core)
    description 'Ruby Version Manager dependencies'
    apt %w(curl bison git-core)
    end


    package :ree, :provides => :ruby do
    description 'Ruby Enterprise Edition'
    version '1.8.7'

    push_text '--silent --show-error', '~/.curlrc' # want no progress bar!
    runner "rvm install ree-#{version}" do
    post :install, "rvm ree-#{version} --default"
    end

    requires :rvm, :ree_dependencies

    verify do
    has_executable_with_version 'ruby', 'Ruby Enterprise Edition'
    end
    end

    package :ree_dependencies do
    description 'Ruby Enterprise Edition dependencies'
    apt %w(build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev)
    end


    policy :vagrant, :roles => :app do
    requires :rvm
    requires :ruby
    end

    deployment do
  2. @nathany nathany renamed this gist Mar 7, 2011. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. @nathany nathany revised this gist Mar 7, 2011. 1 changed file with 30 additions and 0 deletions.
    30 changes: 30 additions & 0 deletions instal.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    package :rvm do
    description 'Ruby Version Manager'
    runner 'curl -LsS http://bit.ly/rvm-install-system-wide > rvm-install-system-wide'
    runner 'bash < ./rvm-install-system-wide'
    requires :rvm_dependencies

    verify do
    has_executable 'rvm'
    end
    end

    package :rvm_dependencies do
    description 'Ruby Version Manager Build Dependencies'
    apt %w(curl bison build-essential zlib1g-dev libssl-dev libreadline5-dev libxml2-dev git-core)
    end


    policy :vagrant, :roles => :app do
    requires :rvm
    end

    deployment do
    delivery :capistrano

    source do
    prefix '/usr/local'
    archives '/usr/local/sources'
    builds '/usr/local/build'
    end
    end
  4. @nathany nathany created this gist Mar 7, 2011.
    6 changes: 6 additions & 0 deletions deploy.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    set :user, 'vagrant'
    set :run_method, :sudo

    role :app, '33.33.33.10'

    ssh_options[:keys] = `vagrant ssh_config | grep IdentityFile`.split.last