Sha256: ed65e5c576716eb6d2111ca92b1cb7f909cb424fcbf07ff8c177710f343dcfdf

Contents?: true

Size: 1.83 KB

Versions: 7

Compression:

Stored size: 1.83 KB

Contents

package 'web' do
  # rvm/ruby install based on http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
  depends_on 'swap' # LATER # needed for deployment/asset building on < 1GB machines
  depends_on 'build-essential' # DONE
  depends_on 'git' # DONE
  depends_on 'rvm' # DONE
  depends_on 'no-rdoc' # DONE


  depends_on 'rvm-ruby' # DONE
  depends_on 'bundler' # DONE
  depends_on 'nginx' # DONE
  depends_on 'phusion-passenger' # DONE
  depends_on 'app-env'
  depends_on 'web-site-config'

  depends_on 'imagemagick' # TODO:  app specific--will need to make system to include extra packages
  depends_on 'libpq-dev' # for pg gem
  depends_on 'nodejs'
  depends_on 'monit-web'
end


package 'web-site-config' do
  depends_on 'web-get-passenger-ruby'
  file({
           :template => Pvcglue.template_file_name('web.sites-enabled.erb'),
           :destination => "/etc/nginx/sites-enabled/#{Pvcglue.cloud.app_and_stage_name}",
           :create_dirs => false,
           :permissions => 0644,
           :user => 'root',
           :group => 'root'
       }) { sudo('service nginx restart') }
end

package 'web-get-passenger-ruby' do
  apply do
    info = run("rvm use #{Pvcglue.configuration.ruby_version} && $(which passenger-config) --ruby-command")
    if info =~ /passenger_ruby (.*)/
      Pvcglue.cloud.passenger_ruby = $1
    else
      raise "'passenger_ruby' not found." unless Pvcglue.cloud.passenger_ruby
    end
  end
end

package 'phusion-passenger' do
  depends_on 'phusion-repository'
  depends_on 'passenger'
  validate do
    run('passenger -v') =~ /Phusion Passenger version 4/
  end

  file({
           :template => Pvcglue.template_file_name('web.nginx.conf.erb'),
           :destination => '/etc/nginx/nginx.conf',
           :permissions => 0644,
           :user => 'root',
           :group => 'root'
       }) { trigger 'nginx:restart' }
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pvcglue-0.9.6 lib/pvcglue/old_packages/role_web.rb
pvcglue-0.9.5 lib/pvcglue/old_packages/role_web.rb
pvcglue-0.9.4 lib/pvcglue/old_packages/role_web.rb
pvcglue-0.9.3 lib/pvcglue/old_packages/role_web.rb
pvcglue-0.9.2 lib/pvcglue/old_packages/role_web.rb
pvcglue-0.9.1 lib/pvcglue/old_packages/role_web.rb
pvcglue-0.9.0 lib/pvcglue/old_packages/role_web.rb