Removing sprinkle
This commit is contained in:
parent
b54164cef8
commit
63a7496c8b
9 changed files with 0 additions and 302 deletions
|
|
@ -1,15 +0,0 @@
|
||||||
= Example Rails Sprinkle Deployment Script
|
|
||||||
|
|
||||||
The following example shows how you can provision Rails and associated packages onto a remote server (or set of servers).
|
|
||||||
|
|
||||||
== Usage:
|
|
||||||
|
|
||||||
$> sprinkle -s rails.rb
|
|
||||||
|
|
||||||
or in test mode:
|
|
||||||
|
|
||||||
$> sprinkle -t -s rails.rb
|
|
||||||
|
|
||||||
== Information
|
|
||||||
|
|
||||||
For more information, please see: http://github.com/crafterm/sprinkle/tree/master/README.markdown
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
# Copyright (c) 2010, Diaspora Inc. This file is
|
|
||||||
# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
# the COPYRIGHT file.
|
|
||||||
|
|
||||||
worker_processes 1;
|
|
||||||
pid /tmp/pids/nginx.pid;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 8192;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
|
|
||||||
include mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] '
|
|
||||||
'"$request" $status $body_bytes_sent "$http_referer" '
|
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
||||||
|
|
||||||
sendfile on;
|
|
||||||
|
|
||||||
keepalive_timeout 65;
|
|
||||||
|
|
||||||
gzip on;
|
|
||||||
gzip_http_version 1.0;
|
|
||||||
gzip_comp_level 2;
|
|
||||||
gzip_proxied any;
|
|
||||||
gzip_buffers 16 8k;
|
|
||||||
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
|
||||||
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
|
||||||
|
|
||||||
upstream thin_cluster {
|
|
||||||
server unix:/tmp/thin.0.sock;
|
|
||||||
server unix:/tmp/thin.1.sock;
|
|
||||||
server unix:/tmp/thin.2.sock;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
|
|
||||||
listen 80;
|
|
||||||
server_name pivots.joindiaspora.com www.pivots.joindiaspora.com;
|
|
||||||
root /usr/local/app/diaspora/current;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
proxy_redirect off;
|
|
||||||
|
|
||||||
if (-f $request_filename/index.html) {
|
|
||||||
rewrite (.*) $1/index.html break;
|
|
||||||
}
|
|
||||||
if (-f $request_filename.html) {
|
|
||||||
rewrite (.*) $1.html break;
|
|
||||||
}
|
|
||||||
if (!-f $request_filename) {
|
|
||||||
proxy_pass http://thin_cluster;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
location = /50x.html {
|
|
||||||
root html;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
# Copyright (c) 2010, Diaspora Inc. This file is
|
|
||||||
# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
# the COPYRIGHT file.
|
|
||||||
|
|
||||||
#package :mongo, :provides => :database do
|
|
||||||
# description 'Mongodb'
|
|
||||||
# version '1.4.3'
|
|
||||||
# source "http://downloads.mongodb.org/src/mongodb-src-r#{version}.tar.gz"
|
|
||||||
#end
|
|
||||||
|
|
||||||
package :mongodb, :provides => :database do
|
|
||||||
description 'Mongodb binary.'
|
|
||||||
version '1.6.3'
|
|
||||||
binary "http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-static-legacy-#{version}.tgz" do
|
|
||||||
post :install, "ln -s -f /usr/local/bin/mongodb-linux-x86_64-static-#{version}/bin/mongod /usr/bin/mongod"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
package :mongo_driver do
|
|
||||||
description 'Ruby mongo database driver'
|
|
||||||
gem 'mongo'
|
|
||||||
gem 'bson'
|
|
||||||
gem 'bson_ext'
|
|
||||||
requires :rubygems
|
|
||||||
end
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
# Copyright (c) 2010, Diaspora Inc. This file is
|
|
||||||
# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
# the COPYRIGHT file.
|
|
||||||
|
|
||||||
## Special package, anything that defines a 'source' package means build-essential should be installed for Ubuntu
|
|
||||||
|
|
||||||
package :build_essential do
|
|
||||||
description 'Build tools'
|
|
||||||
apt 'build-essential' do
|
|
||||||
# Update the sources and upgrade the lists before we build essentials
|
|
||||||
pre :install, 'apt-get update'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
package :tools do
|
|
||||||
description 'Useful tools'
|
|
||||||
apt 'psmisc htop elinks screen'
|
|
||||||
end
|
|
||||||
|
|
||||||
package :vim do
|
|
||||||
apt 'vim' do
|
|
||||||
post :install, run("rm -r -f /root/vim-files")
|
|
||||||
end
|
|
||||||
apt 'vim' do
|
|
||||||
post :install, run("git clone git://github.com/zhitomirskiyi/vim-files.git /root/vim-files")
|
|
||||||
end
|
|
||||||
apt 'vim' do
|
|
||||||
post :install, run("ln -s -f /root/vim-files/vimrc /root/.vimrc")
|
|
||||||
end
|
|
||||||
apt 'vim' do
|
|
||||||
post :install, run("ln -s -f -T /root/vim-files /root/.vim")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
# Copyright (c) 2010, Diaspora Inc. This file is
|
|
||||||
# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
# the COPYRIGHT file.
|
|
||||||
|
|
||||||
## Defines available packages
|
|
||||||
|
|
||||||
package :ruby do
|
|
||||||
description 'Ruby Virtual Machine'
|
|
||||||
version '1.9.2'
|
|
||||||
patchlevel '0'
|
|
||||||
source "ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-#{version}-p#{patchlevel}.tar.gz"
|
|
||||||
requires :ruby_dependencies
|
|
||||||
end
|
|
||||||
|
|
||||||
package :ruby_dependencies do
|
|
||||||
description 'Ruby Virtual Machine Build Dependencies'
|
|
||||||
apt %w( bison zlib1g-dev libssl-dev libreadline5-dev libncurses5-dev file )
|
|
||||||
end
|
|
||||||
|
|
||||||
package :rubygems do
|
|
||||||
description 'Ruby Gems Package Management System'
|
|
||||||
version '1.3.7'
|
|
||||||
source "http://production.cf.rubygems.org/rubygems/rubygems-#{version}.tgz" do
|
|
||||||
custom_install 'ruby setup.rb'
|
|
||||||
end
|
|
||||||
run( "PATH=$PATH:/var/lib/gems/1.9/bin")
|
|
||||||
run( "export PATH")
|
|
||||||
requires :ruby
|
|
||||||
end
|
|
||||||
|
|
||||||
package :bundler do
|
|
||||||
description 'bundler'
|
|
||||||
version '1.0.0'
|
|
||||||
gem 'bundler'
|
|
||||||
requires :rubygems
|
|
||||||
end
|
|
||||||
|
|
||||||
package :diaspora_dependencies do
|
|
||||||
description 'random dependencies'
|
|
||||||
apt %w(libxslt1.1 libxslt1-dev libxml2 imagemagick libmagick9-dev)
|
|
||||||
end
|
|
||||||
#package :diaspora do
|
|
||||||
# description 'Diaspora'
|
|
||||||
|
|
||||||
=begin
|
|
||||||
package :rails do
|
|
||||||
description 'Ruby on Rails'
|
|
||||||
gem 'rails'
|
|
||||||
version '>=3.0.0b4'
|
|
||||||
end
|
|
||||||
=end
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
# Copyright (c) 2010, Diaspora Inc. This file is
|
|
||||||
# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
# the COPYRIGHT file.
|
|
||||||
|
|
||||||
package :git, :provides => :scm do
|
|
||||||
description 'Git Distributed Version Control'
|
|
||||||
apt %w( git-core )
|
|
||||||
requires :pubkey
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
package :privkey do
|
|
||||||
description 'checkout from github with it'
|
|
||||||
transfer "#{File.dirname(__FILE__)}/../deploy_key/id_rsa", '/root/.ssh/id_rsa', :render => false do
|
|
||||||
pre :install, "rm -rf /root/.ssh/ && mkdir -p /root/.ssh/"
|
|
||||||
post :install, "chmod go-rwx /root/.ssh/id_rsa"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
package :pubkey do
|
|
||||||
transfer "#{File.dirname(__FILE__)}/../deploy_key/id_rsa.pub", '/root/.ssh/id_rsa.pub', :render => false
|
|
||||||
requires :privkey
|
|
||||||
requires :known_hosts
|
|
||||||
end
|
|
||||||
|
|
||||||
package :known_hosts do
|
|
||||||
transfer "#{File.dirname(__FILE__)}/../deploy_key/known_hosts", '/root/.ssh/known_hosts', :render => false
|
|
||||||
end
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
# Copyright (c) 2010, Diaspora Inc. This file is
|
|
||||||
# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
# the COPYRIGHT file.
|
|
||||||
|
|
||||||
package :nginx, :provides=> :webserver do
|
|
||||||
description 'Nginx HTTP server'
|
|
||||||
version '0.7.67'
|
|
||||||
source "http://nginx.org/download/nginx-#{version}.tar.gz"
|
|
||||||
requires :nginx_dependencies
|
|
||||||
end
|
|
||||||
|
|
||||||
package :nginx_conf do
|
|
||||||
description 'Nginx conf file'
|
|
||||||
transfer "#{File.dirname(__FILE__)}/../conf/nginx.conf", '/usr/local/conf/nginx.conf', :render => true do
|
|
||||||
pre :install, "mkdir -p /usr/local/sbin/conf/"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
package :nginx_dependencies do
|
|
||||||
description 'Nginx build dependencies'
|
|
||||||
apt %w( libc6 libpcre3 libpcre3-dev libssl0.9.8)
|
|
||||||
source "http://zlib.net/zlib-1.2.5.tar.gz"
|
|
||||||
end
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
# Copyright (c) 2010, Diaspora Inc. This file is
|
|
||||||
# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
# the COPYRIGHT file.
|
|
||||||
|
|
||||||
#Fix dreamhost
|
|
||||||
#
|
|
||||||
|
|
||||||
package :clean_dreamhost do
|
|
||||||
description 'removes roadblocks in the standard DH PS image'
|
|
||||||
run 'apt-get -fy install'
|
|
||||||
run 'apt-get -y remove ruby'
|
|
||||||
run 'apt-get -y remove ruby1.8 --purge'
|
|
||||||
end
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2010, Diaspora Inc. This file is
|
|
||||||
# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
# the COPYRIGHT file.
|
|
||||||
|
|
||||||
require '#{File.dirname(__FILE__)}/packages/essential'
|
|
||||||
require '#{File.dirname(__FILE__)}/packages/database'
|
|
||||||
require '#{File.dirname(__FILE__)}/packages/server'
|
|
||||||
require '#{File.dirname(__FILE__)}/packages/scm'
|
|
||||||
require '#{File.dirname(__FILE__)}/packages/ruby'
|
|
||||||
|
|
||||||
policy :diaspora, :roles => [:pivots] do
|
|
||||||
# requires :clean_dreamhost
|
|
||||||
requires :tools
|
|
||||||
requires :rubygems
|
|
||||||
requires :bundler
|
|
||||||
requires :diaspora_dependencies
|
|
||||||
requires :database
|
|
||||||
requires :webserver
|
|
||||||
requires :scm
|
|
||||||
requires :vim
|
|
||||||
requires :nginx_conf
|
|
||||||
end
|
|
||||||
|
|
||||||
deployment do
|
|
||||||
|
|
||||||
# mechanism for deployment
|
|
||||||
delivery :capistrano do
|
|
||||||
recipes "#{File.dirname(__FILE__)}/../deploy"
|
|
||||||
end
|
|
||||||
|
|
||||||
# source based package installer defaults
|
|
||||||
source do
|
|
||||||
prefix '/usr/local'
|
|
||||||
archives '/usr/local/sources'
|
|
||||||
builds '/usr/local/build'
|
|
||||||
end
|
|
||||||
binary do
|
|
||||||
prefix '/usr/local/bin'
|
|
||||||
archives '/usr/local/sources'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Loading…
Reference in a new issue