Permalink
Browse files

Vagrant stuff

  • Loading branch information...
1 parent 2cc76ae commit 4d3df51af43fefbed30590e1eef05e03e88cf678 Joe Van Dyk committed Aug 19, 2010
Showing 755 changed files with 71,850 additions and 36 deletions.
View
@@ -1 +0,0 @@
-*
View
@@ -0,0 +1,4 @@
+---
+BUNDLE_DISABLE_SHARED_GEMS: "1"
+BUNDLE_BIN: bin
+BUNDLE_PATH: vendor
View
@@ -1,3 +1,2 @@
.*sw*
-vendor/gems/
-!vendor/gems/cache/
+.vagrant
View
@@ -1,6 +1,7 @@
# A sample Gemfile
source :gemcutter
-gem 'rack', '1.1.0'
-gem 'sinatra', '0.9.4'
-gem 'nokogiri', '1.4.1'
+gem 'sinatra'
+gem 'rack'
+gem 'nokogiri'
+gem 'unicorn'
View
@@ -1,25 +1,18 @@
----
-dependencies:
- rack:
- group:
- - :default
- version: = 1.1.0
- sinatra:
- group:
- - :default
- version: = 0.9.4
- nokogiri:
- group:
- - :default
- version: = 1.4.1
-specs:
-- rack:
- version: 1.1.0
-- sinatra:
- version: 0.9.4
-- nokogiri:
- version: 1.4.1
-hash: 004151f1dd8b55587933863c2e788bfec669a687
-sources:
-- Rubygems:
- uri: http://gemcutter.org
+GEM
+ remote: http://rubygems.org/
+ specs:
+ nokogiri (1.4.3.1)
+ rack (1.2.1)
+ sinatra (1.0)
+ rack (>= 1.0)
+ unicorn (1.1.2)
+ rack
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ nokogiri
+ rack
+ sinatra
+ unicorn
View
@@ -0,0 +1,12 @@
+# -*- ruby -*-
+
+Vagrant::Config.run do |config|
+ config.vm.box = "lucid32"
+ config.vm.network("192.168.10.35")
+ config.vm.forward_port("ssh", 22, 2319, :auto => true)
+ config.vm.share_folder("v-fixienews", "/apps/fixienews/shared-checkout", ".", :nfs => true)
+ config.vm.provisioner = :chef_solo
+ config.chef.cookbooks_path = ["config/cookbooks"]
+ config.chef.log_level = :debug
+end
+# vim: syntax=ruby
View
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'nokogiri' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('nokogiri', 'nokogiri')
View
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'rackup' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('rack', 'rackup')
View
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'unicorn' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('unicorn', 'unicorn')
View
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by Bundler.
+#
+# The application 'unicorn_rails' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", __FILE__)
+
+require 'rubygems'
+require 'bundler/setup'
+
+load Gem.bin_path('unicorn', 'unicorn_rails')
@@ -0,0 +1,53 @@
+= DESCRIPTION:
+
+Installs Ruby Enterprise Edition (REE) from Phusion.
+
+= REQUIREMENTS:
+
+Opscode's build-essential cookbook to get a compiler and associated files installed.
+
+= ATTRIBUTES:
+
+* ruby_enterprise[:install_path] - Location to install REE. Default /opt/ruby-enterprise
+* ruby_enterprise[:version] - Version-datestamp to use. Default 1.8.6-20090610. May lag behind latest REE release.
+* ruby_enterprise[:url] - URL to download. Default is from RubyForge, with the version specified. Note the download ID must be updated when there are new releases.
+
+= USAGE:
+
+Include the ruby_enterprise recipe to install REE.
+
+ include_recipe "ruby_enterprise"
+
+Or add it to your role, or directly to a node's recipes.
+
+Install RubyGems under REE with the ree_gem definition.
+
+ ree_gem "rails" do
+ source "http://gems.rubyforge.org"
+ version "2.3.4"
+ end
+
+The definition supports parameters for source and version, though they are optional.
+
+= LICENSE and AUTHOR:
+
+Author:: Joshua Timberman (<joshua@opscode.com>)
+Author:: Sean Cribbs (<seancribbs@gmail.com>)
+Author:: Michael Hale (<mikehale@gmail.com>)
+
+Copyright:: 2009-2010, Opscode, Inc.
+Copyright:: 2009, Sean Cribbs
+Copyright:: 2009, Michael Hale
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
@@ -0,0 +1,6 @@
+default[:ruby_enterprise][:install_path] = "/usr/local"
+default[:ruby_enterprise][:ruby_bin] = "/usr/local/bin/ruby"
+default[:ruby_enterprise][:gems_dir] = "#{ruby_enterprise[:install_path]}/lib/ruby/gems/1.8"
+default[:ruby_enterprise][:version] = '1.8.7-2010.02'
+default[:ruby_enterprise][:dpkg_url] = "http://fixieconsulting.com/ruby-enterprise_#{node[:ruby_enterprise][:version]}.deb"
+default[:ruby_enterprise][:dpkg_sha] = "d65d3491fac28"
@@ -0,0 +1,29 @@
+#
+# Cookbook Name:: ruby_enterprise
+# Recipe:: ree_gem
+#
+# Author:: Joshua Timberman (<joshua@opscode.com>)
+#
+# Copyright 2009, Opscode, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+define :ree_gem, :source => nil, :version => nil do
+ gem_package params[:name] do
+ gem_binary "#{node[:ruby_enterprise][:install_path]}/bin/gem"
+ source params[:source] if params[:source]
+ version params[:version] if params[:version]
+ options params[:options] if params[:options]
+ end
+end
@@ -0,0 +1,36 @@
+{
+ "providing": {
+ },
+ "attributes": {
+ },
+ "replacing": {
+ },
+ "dependencies": {
+ "build-essential": [
+
+ ]
+ },
+ "groupings": {
+ },
+ "recommendations": {
+ },
+ "platforms": {
+ "ubuntu": [
+
+ ]
+ },
+ "license": "Apache 2.0",
+ "version": "0.2.2",
+ "maintainer": "Opscode, Inc.",
+ "suggestions": {
+ },
+ "recipes": {
+ "ruby_enterprise": "Installs Ruby Enterprise Edition"
+ },
+ "maintainer_email": "ops@opscode.com",
+ "name": "ruby_enterprise",
+ "conflicting": {
+ },
+ "description": "Installs/Configures ruby-enterprise",
+ "long_description": "= DESCRIPTION:\n\nInstalls Ruby Enterprise Edition (REE) from Phusion.\n\n= REQUIREMENTS:\n\nOpscode's build-essential cookbook to get a compiler and associated files installed.\n\n= ATTRIBUTES: \n\n* ruby_enterprise[:install_path] - Location to install REE. Default /opt/ruby-enterprise\n* ruby_enterprise[:version] - Version-datestamp to use. Default 1.8.6-20090610. May lag behind latest REE release.\n* ruby_enterprise[:url] - URL to download. Default is from RubyForge, with the version specified. Note the download ID must be updated when there are new releases.\n\n= USAGE:\n\nInclude the ruby_enterprise recipe to install REE.\n\n include_recipe \"ruby_enterprise\"\n\nOr add it to your role, or directly to a node's recipes.\n\nInstall RubyGems under REE with the ree_gem definition.\n\n ree_gem \"rails\" do\n source \"http://gems.rubyforge.org\"\n version \"2.3.4\"\n end\n\nThe definition supports parameters for source and version, though they are optional.\n\n= LICENSE and AUTHOR:\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nAuthor:: Sean Cribbs (<seancribbs@gmail.com>)\nAuthor:: Michael Hale (<mikehale@gmail.com>)\n\nCopyright:: 2009-2010, Opscode, Inc.\nCopyright:: 2009, Sean Cribbs\nCopyright:: 2009, Michael Hale\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n"
+ }
@@ -0,0 +1,11 @@
+maintainer "Opscode, Inc."
+maintainer_email "ops@opscode.com"
+license "Apache 2.0"
+description "Installs/Configures ruby-enterprise"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.2.2"
+
+recipe "ruby_enterprise", "Installs Ruby Enterprise Edition"
+
+depends "build-essential"
+supports "ubuntu"
@@ -0,0 +1,8 @@
+remote_file "/root/ruby-enterprise.dpkg" do
+ source node[:ruby_enterprise][:dpkg_url]
+ checksum node[:ruby_enterprise][:dpkg_sha]
+end
+
+dpkg_package "ruby-enterprise" do
+ source "/root/ruby-enterprise.dpkg"
+end
@@ -0,0 +1,3 @@
+recipe "vagrant_main", "Installs base GG software"
+depends "build-essential"
+supports "ubuntu"
@@ -0,0 +1,51 @@
+# Install Ruby Enterprise Edition.
+require_recipe "ruby_enterprise"
+
+# Our favorite SCM,
+# and an XML package for nokogiri.
+%w( libxml2 libxslt1.1 git-core ).each do |pkg|
+ package pkg
+end
+
+# Set up the application directory
+%w( shared current ).each do |dir|
+ directory "/apps/fixienews/#{dir}" do
+ owner "vagrant"
+ group "vagrant"
+ recursive true
+ end
+end
+
+# Check out the source code to the application directory
+git "/apps/fixienews/current" do
+ repository "git://github.com/joevandyk/fixienews.git"
+ reference "master"
+ user "vagrant"
+ group "vagrant"
+ action :sync
+end
+
+# Install bundler (http://gembundler.com/v1.0/index.html)
+# We're using a pre-release version here.
+ree_gem "bundler" do
+ options "--pre"
+ version "1.0.0.rc.5"
+end
+
+
+# Create an Upstart Service file, so we can automatically
+file "fixienews" do
+ path "/etc/init/fixienews.conf"
+ content <<-EOF
+ start on startup
+ respawn
+ chdir /apps/fixienews/current
+ exec su vagrant -c "./bin/unicorn"
+ EOF
+end
+
+service "fixienews" do
+ service_name 'fixienews'
+ action :start
+ provider Chef::Provider::Service::Upstart
+end
View
@@ -1,5 +1,3 @@
-require File.expand_path(File.join(File.dirname(__FILE__), '.bundle/environment'))
-
require 'sinatra'
require 'open-uri'
require 'nokogiri'
View
@@ -1,3 +0,0 @@
-bin
-specifications
-doc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,19 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'nokogiri' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
+ version = $1
+ ARGV.shift
+end
+
+gem 'nokogiri', version
+load Gem.bin_path('nokogiri', 'nokogiri', version)
@@ -0,0 +1,19 @@
+#!/usr/bin/env ruby
+#
+# This file was generated by RubyGems.
+#
+# The application 'rack' is installed as part of a gem, and
+# this file is here to facilitate running it.
+#
+
+require 'rubygems'
+
+version = ">= 0"
+
+if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
+ version = $1
+ ARGV.shift
+end
+
+gem 'rack', version
+load Gem.bin_path('rack', 'rackup', version)
Oops, something went wrong.

0 comments on commit 4d3df51

Please sign in to comment.