added initial capistrano files, and gem file

This commit is contained in:
Simon Tokumine 2011-06-30 13:06:23 +01:00
parent 481f76cffb
commit 9cdfeb4f52
7 changed files with 72 additions and 32 deletions

View File

@ -1,4 +1,2 @@
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks

4
Gemfile Normal file
View File

@ -0,0 +1,4 @@
source :gemcutter
gem 'capistrano', '2.6.0'
gem 'capistrano-gitflow', '1.4.3'

28
Gemfile.lock Normal file
View File

@ -0,0 +1,28 @@
GEM
remote: http://rubygems.org/
specs:
capistrano (2.6.0)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capistrano-gitflow (1.4.3)
capistrano
stringex
highline (1.6.2)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-sftp (2.0.5)
net-ssh (>= 2.0.9)
net-ssh (2.1.4)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
stringex (1.2.1)
PLATFORMS
ruby
DEPENDENCIES
capistrano (= 2.6.0)
capistrano-gitflow (= 1.4.3)

View File

@ -15,7 +15,6 @@ tests
make test
```
core requirements
-------------
* pg_bouncer
@ -27,8 +26,16 @@ node.js dependencies
---------------------
* npm
then to install dependencies from package.json:
To install dependencies from package.json:
``` npm install .```
``` npm install```
deployment
----------
* capistrano on ruby 1.9.2.
To install dependencies from Gemfile:
```bundle install```

View File

@ -1,11 +1,4 @@
Prioritized todo
-----------------
Acceptance tests - DONE
SSL - Do in NGINX
pg_bouncer/postgres pooling (test with Ab to get the errors below)
redis-pool
psql solve:
* postgres "could not create socket"
* http://people.planetpostgresql.org/andrew/index.php?/archives/44-max_files_per_process-and-OS-limits.html

View File

@ -1,22 +1,9 @@
set :application, "set your application name here"
set :repository, "set your repository location here"
set :spinner_user, nil #weird hack
set :stages, %w(staging production)
require 'capistrano/ext/multistage'
require 'capistrano/ext/monitor'
require "bundler/capistrano"
require 'capistrano/gitflow'
ssh_options[:keys] = [File.join("config", "deploy", "ssh", "id-vizzuality.pem")]
set :scm, :subversion
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
role :web, "your web-server here" # Your HTTP server, Apache/etc
role :app, "your app-server here" # This may be the same as your `Web` server
role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run
role :db, "your slave db-server here"
# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts
# If you are using Passenger mod_rails uncomment this:
# namespace :deploy do
# task :start do ; end
# task :stop do ; end
# task :restart, :roles => :app, :except => { :no_release => true } do
# run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
# end
# end

View File

@ -0,0 +1,23 @@
# node deploy config
# somehow we'll have to update this dynamically
set :host_1, "174.129.61.69"
role :app, [host_1]
# repository
set :application, "node-sql-api"
set :repository, "git@github.com:tokumine/cartodb-sql-api.git"
set :scm, :git
#set :deploy_via, :remote_cache
# deploy settings
set :node_file, "cluster.js"
set :deploy_to, "/home/ubuntu/www/#{application}"
set :user, "ubuntu"
set :runner, "ubuntu"
set :use_sudo, true
default_run_options[:pty] = true
#after "deploy:update_code", "deploy:link_production_db"
#after "deploy:symlink", "deploy:update_crontab"