Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: sebastian-ci/sebastian-ci
base: 05b7309852
...
head fork: sebastian-ci/sebastian-ci
compare: 5e695f3faa
  • 5 commits
  • 20 files changed
  • 0 commit comments
  • 1 contributor
View
3  .gitignore
@@ -4,4 +4,5 @@
/tmp
/db/*.sqlite3
/.chef
-chef/cookbooks
+/chef/cookbooks
+/.vagrant
View
6 Cheffile
@@ -4,6 +4,8 @@
site 'http://community.opscode.com/api/v1'
cookbook 'apt'
+cookbook 'build-essential'
cookbook 'git'
-cookbook 'chef-client'
-cookbook 'application'
+cookbook 'percona-install'
+cookbook 'redisio'
+cookbook 'rvm', :git => 'git://github.com/fnichol/chef-rvm.git', :ref => 'v0.9.0'
View
53 Cheffile.lock
@@ -1,52 +1,33 @@
SITE
remote: http://community.opscode.com/api/v1
specs:
- apache2 (1.1.16)
- application (1.0.2)
- apache2 (>= 0.0.0)
- gunicorn (>= 0.0.0)
- passenger_apache2 (>= 0.0.0)
- php (>= 0.0.0)
- python (>= 1.0.6)
- runit (>= 0.0.0)
- tomcat (>= 0.0.0)
- unicorn (>= 0.0.0)
- apt (1.4.8)
- build-essential (1.1.2)
- chef-client (1.2.0)
+ apt (1.5.0)
+ build-essential (1.2.0)
dmg (1.0.0)
git (1.0.2)
build-essential (>= 0.0.0)
dmg (>= 0.0.0)
runit (>= 0.0.0)
yum (>= 0.0.0)
- gunicorn (1.1.0)
- python (>= 0.0.0)
- java (1.6.0)
- mysql (1.3.0)
- build-essential (>= 0.0.0)
- openssl (>= 0.0.0)
- openssl (1.0.0)
- passenger_apache2 (1.0.0)
- apache2 (>= 1.0.4)
- build-essential (>= 0.0.0)
- php (1.1.0)
- build-essential (>= 0.0.0)
- mysql (>= 0.0.0)
- xml (>= 0.0.0)
- python (1.0.8)
- build-essential (>= 0.0.0)
- yum (>= 0.0.0)
+ percona-install (0.1.4)
+ redisio (1.1.0)
runit (0.15.0)
- tomcat (0.11.0)
- java (>= 0.0.0)
- unicorn (1.1.0)
- xml (1.0.4)
+ users (1.1.4)
yum (1.0.0)
+GIT
+ remote: git://github.com/fnichol/chef-rvm.git
+ ref: v0.9.0
+ sha: 4a408e5d6c5a52c37388a799c516430263339849
+ specs:
+ rvm (0.9.0)
+
DEPENDENCIES
- application (>= 0)
apt (>= 0)
- chef-client (>= 0)
+ build-essential (>= 0)
git (>= 0)
+ percona-install (>= 0)
+ redisio (>= 0)
+ rvm (>= 0)
+ users (>= 0)
View
5 Vagrantfile
@@ -6,10 +6,9 @@ Vagrant::Config.run do |config|
chef.roles_path = 'chef/roles'
chef.data_bags_path = 'chef/data_bags'
- chef.add_role 'sebastian'
- chef.add_role 'sebastian_run_migrations'
+ chef.add_role 'worker'
# You may also specify custom JSON attributes:
- chef.json = { :mysql_password => "foo" }
+ # chef.json = { :mysql_password => "foo" }
end
end
View
22 chef/cookbooks-custom/rvm/attributes/default.rb
@@ -1,22 +0,0 @@
-# Default to mainline Ruby, available are:
-# [ 'ruby', 'jruby', 'rbx', 'ree', 'macruby',
-# 'maglev', 'ironruby', 'mput', 'system' ]
-#
-# see:
-# http://rvm.beginrescueend.com/interpreters/
-# default[:rvm][:ruby][:implementation] = 'ruby'
-# most people default to 1.8.7 still
-# even if I prefer 1.9.2.
-# default[:rvm][:ruby][:version] = '1.8.7'
-# set the default patch level
-# default[:rvm][:ruby][:patch_level] = 'p302'
-
-# Use either :stable or :head versions of
-# RVM.
-default[:rvm][:version] = :stable
-# Keep track of updates to RVM.
-# note: this will effectively inhibit
-# installation of :head.
-default[:rvm][:track_updates] = false
-
-
View
1  chef/cookbooks-custom/rvm/attributes/install.rb
@@ -1 +0,0 @@
-default[:rvm][:ruby][:default] = true
View
2  chef/cookbooks-custom/rvm/attributes/ruby_192.rb
@@ -1,2 +0,0 @@
-default[:rvm][:ruby][:implementation] = 'ruby'
-default[:rvm][:ruby][:version] = '1.9.2'
View
2  chef/cookbooks-custom/rvm/files/default/rvm-gem.sh
@@ -1,2 +0,0 @@
-#!/bin/sh
-exec /usr/local/rvm/bin/rvm all do gem $*
View
3  chef/cookbooks-custom/rvm/files/default/rvm.sh
@@ -1,3 +0,0 @@
-# this doesn't work for me!
-# [[ -s "/usr/local/lib/rvm" ]] && . "/usr/local/lib/rvm" # This loads RVM into a shell session.
-source /usr/local/lib/rvm
View
16 chef/cookbooks-custom/rvm/libraries/find_ruby.rb
@@ -1,16 +0,0 @@
-# figure out where ruby is. We have this kind of cumbersome thing
-# since rvm may or may not be installed.
-
-class Chef
- class Recipe
- def find_ruby
-
-
- if File.exists?("/usr/local/rvm/bin/rvm")
- return `/usr/local/rvm/bin/rvm default exec which ruby`.chomp
- else
- return "/usr/bin/ruby"
- end
- end
- end
-end
View
40 chef/cookbooks-custom/rvm/metadata.json
@@ -1,40 +0,0 @@
-{
- "name": "rvm",
- "description": "Installs and configures RVM, optionally keeping it updated.",
- "long_description": "",
- "maintainer": "James Harton, Sociable Limited.",
- "maintainer_email": "james@sociable.co.nz",
- "license": "MIT",
- "platforms": {
- },
- "dependencies": {
- "apt": [
-
- ],
- "build-essential": [
-
- ]
- },
- "recommendations": {
- },
- "suggestions": {
- },
- "conflicting": {
- },
- "providing": {
- },
- "replacing": {
- },
- "attributes": {
- },
- "groupings": {
- },
- "recipes": {
- "rvm": "Install system-wide RVM",
- "rvm::install": "Install a ruby implementation based on attributes",
- "rvm::ruby_192": "Helper recipe to install ruby 1.9.2",
- "rvm::ruby_187": "Helper recipe to install ruby 1.8.7",
- "rvm::ree": "Helper recipe to install ruby enterprise edition"
- },
- "version": "0.0.4"
-}
View
29 chef/cookbooks-custom/rvm/metadata.rb
@@ -1,29 +0,0 @@
-maintainer "James Harton, Sociable Limited."
-maintainer_email "james@sociable.co.nz"
-license "MIT"
-description "Installs and configures RVM, optionally keeping it updated."
-version "0.0.4"
-
-# The rvm recipe only installs rvm
-# and doesn't do anything else.
-recipe "rvm", "Install system-wide RVM"
-
-# the rvm:install recipe installs
-# a ruby implementation based on
-# node attributes.
-recipe "rvm::install", "Install a ruby implementation based on attributes"
-
-# these are just quick helpers
-# for common implementations for
-# people who can't/won't set
-# node attributes for themselves.
-recipe "rvm::ruby_192", "Helper recipe to install ruby 1.9.2"
-recipe "rvm::ruby_187", "Helper recipe to install ruby 1.8.7"
-recipe "rvm::ree", "Helper recipe to install ruby enterprise edition"
-
-depends "apt"
-depends "build-essential"
-
-%w{debian ubuntu}.each do |os|
- supports os
-end
View
58 chef/cookbooks-custom/rvm/recipes/default.rb
@@ -1,58 +0,0 @@
-#
-# Cookbook Name:: rvm
-# Recipe:: default
-
-# Make sure that the package list is up to date on Ubuntu/Debian.
-include_recipe "apt" if [ 'debian', 'ubuntu' ].member? node[:platform]
-
-# Make sure we have all we need to compile ruby implementations:
-package "curl"
-package "git-core"
-include_recipe "build-essential"
-
-%w(libreadline-dev zlib1g-dev libssl-dev libxml2-dev libxslt1-dev libtool).each do |pkg|
- package pkg
-end
-
-# clean up rvm stuff
-# This is mostly to save inode space
-execute "rvm-cleanup" do
- user "root"
- command "/usr/local/rvm/bin/rvm cleanup sources"
- action :nothing
-end
-
-bash "installing system-wide RVM stable" do
- user "root"
- code "bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)"
- not_if "test -e /usr/local/rvm/bin/rvm"
-end
-
-bash "upgrading to RVM head" do
- user "root"
- code "/usr/local/rvm/bin/rvm update --head ; /usr/local/rvm/bin/rvm reload"
- only_if { node[:rvm][:version] == :head }
- only_if { node[:rvm][:track_updates] }
-end
-
-bash "upgrading RVM stable" do
- user "root"
- code "/usr/local/rvm/bin/rvm update ; /usr/local/rvm/bin/rvm reload"
- only_if { node[:rvm][:track_updates] }
-end
-
-#cookbook_file "/etc/profile.d/rvm.sh" do
-# owner "root"
-# group "root"
-# mode 0755
-#end
-
-cookbook_file "/usr/local/rvm/bin/rvm-gem.sh" do
- owner "root"
- group "root"
- mode 0755
-end
-
-# set this for compatibilty with other people's recipes
-node.default[:languages][:ruby][:ruby_bin] = find_ruby
-
View
41 chef/cookbooks-custom/rvm/recipes/install.rb
@@ -1,41 +0,0 @@
-#
-# Cookbook Name:: rvm
-# Recipe:: install
-
-ruby_version = [].tap do |v|
- v << node[:rvm][:ruby][:implementation] if node[:rvm][:ruby][:implementation]
- v << node[:rvm][:ruby][:version] if node[:rvm][:ruby][:version]
- v << node[:rvm][:ruby][:patch_level] if node[:rvm][:ruby][:patch_level]
-end * '-'
-
-include_recipe "rvm::default"
-
-bash "installing #{ruby_version}" do
- user "root"
- code "/usr/local/rvm/bin/rvm install #{ruby_version}"
- not_if "/usr/local/rvm/bin/rvm list | grep #{ruby_version}"
-end
-
-bash "make #{ruby_version} the default ruby" do
- user "root"
- code "/usr/local/rvm/bin/rvm --default #{ruby_version}"
- not_if "/usr/local/rvm/bin/rvm list | grep '=> #{ruby_version}'"
- only_if { node[:rvm][:ruby][:default] }
-# notifies :restart, "service[chef-client]"
- notifies :run, resources(:execute => "rvm-cleanup")
-end
-
-
-
-# set this for compatibilty with other people's recipes
-node.default[:languages][:ruby][:ruby_bin] = find_ruby
-
-gem_package "chef" do
- gem_binary "/usr/local/rvm/bin/rvm-gem.sh"
- only_if "test -e /usr/local/rvm/bin/rvm-gem.sh"
- # re-install the chef gem into rvm to enable subsequent chef-client run
-end
-
-# Needed so that chef doesn't freak out if the chef-client service
-# isn't present
-#service "chef-client"
View
12 chef/cookbooks-custom/rvm/recipes/ruby_193.rb
@@ -1,12 +0,0 @@
-#
-# Cookbook Name:: rvm
-# Recipe:: ruby_193
-
-# Install deps as listed by recent revisions of RVM.
-%w(build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev autoconf libc6-dev libncurses5-dev automake libtool bison subversion).each do |pkg|
- package pkg
-end
-
-node.default[:rvm][:ruby][:implementation] = 'ruby'
-node.default[:rvm][:ruby][:version] = '1.9.3'
-include_recipe "rvm::install"
View
43 chef/data_bags/apps/sebastian.json
@@ -1,43 +0,0 @@
-{
- "id": "sebastian",
- "server_roles": [
- "sebastian"
- ],
- "type": {
- "sebastian": [
- "rails",
- "unicorn"
- ]
- },
- "packages": {
- "libsqlite3-dev": "",
- "virtualbox": "",
- "virtualbox-guest-utils": "",
- "dkms": ""
- },
- "gems": {
- "bundler": ""
- },
- "migration_command": "rake db:migrate",
- "repository": "git@github.com:railsrumble/r12-team-110.git",
- "deploy_to": "/srv/sebastian",
- "deploy_key": "",
- "databases": {
- "_default": {
- "adapter": "sqlite3",
- "database": "db/production.sqlite3"
- }
- },
- "database_master_role": ["sebastian"],
- "revision": {
- "_default": "0.0.3"
- },
- "owner": "root",
- "group": "root",
- "force": {
- "_default": false
- },
- "migrate": {
- "_default": true
- }
-}
View
16 chef/roles/sebastian.rb
@@ -1,16 +0,0 @@
-name "sebastian"
-
-description "Installs a Sebastian CI"
-
-run_list(
- "recipe[apt]",
- "recipe[git]",
- "recipe[chef-client::delete_validation]",
- "recipe[chef-client::cron]",
- "recipe[rvm::ruby_193]",
- "recipe[application]"
-)
-
-override_attributes(
- 'unicorn' => { 'port' => '80', 'worker_timeout' => 300 }
-)
View
3  chef/roles/sebastian_run_migrations.rb
@@ -1,3 +0,0 @@
-name "sebastian_run_migrations"
-description "Run db:migrate on demand for sebastian"
-override_attributes( "apps" => { "sebastian" => { "production" => { "run_migrations" => true } } })
View
24 chef/roles/worker.rb
@@ -4,11 +4,27 @@
run_list(
"recipe[apt]",
+ "recipe[build-essential]",
"recipe[git]",
- "recipe[rbenv]",
- "recipe[application]"
+ "recipe[percona-install]",
+ "recipe[percona-install::server]",
+ "recipe[redisio::install]",
+ "recipe[rvm::system]",
+ "recipe[rvm::gem_package]",
+ "recipe[rvm::vagrant]"
)
-override_attributes(
- 'unicorn' => { 'port' => '80', 'worker_timeout' => 300 }
+default_attributes(
+ 'rvm' => {
+ 'default_ruby' => 'ruby-1.9.3-p286',
+ 'rubies' => ['ruby-1.9.3-p286'],
+
+ 'version' => '1.16.16', # rvm 1.16.17 is broken - https://github.com/fnichol/chef-rvm/issues/133
+ 'branch' => 'none'
+ },
+ 'authorization' => {
+ 'sudo' => {
+ 'users' => ['vagrant']
+ }
+ }
)
View
5 config/initializers/devise.rb
@@ -10,10 +10,7 @@
config.reset_password_within = 0
config.case_insensitive_keys = []
- # config.omniauth :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET'], scope: "user,repo"
-
- # for demo purposes, let's make it public only
- config.omniauth :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET']
+ config.omniauth :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET'], scope: "user,repo"
config.warden do |manager|
manager.failure_app = Sebastian::FailureApp

No commit comments for this range

Something went wrong with that request. Please try again.