diff --git a/Capfile b/Capfile new file mode 100644 index 00000000..42dd3a47 --- /dev/null +++ b/Capfile @@ -0,0 +1,38 @@ +# Load DSL and set up stages +require "capistrano/setup" + +# Include default deployment tasks +require "capistrano/deploy" + +# Load the SCM plugin appropriate to your project: +# +# require "capistrano/scm/hg" +# install_plugin Capistrano::SCM::Hg +# or +# require "capistrano/scm/svn" +# install_plugin Capistrano::SCM::Svn +# or +require "capistrano/scm/git" +install_plugin Capistrano::SCM::Git + +# Include tasks from other gems included in your Gemfile +# +# For documentation on these, see for example: +# +# https://github.com/capistrano/rvm +# https://github.com/capistrano/rbenv +# https://github.com/capistrano/chruby +# https://github.com/capistrano/bundler +# https://github.com/capistrano/rails +# https://github.com/capistrano/passenger +# +# require "capistrano/rvm" +# require "capistrano/rbenv" +# require "capistrano/chruby" +# require "capistrano/bundler" +# require "capistrano/rails/assets" +# require "capistrano/rails/migrations" +# require "capistrano/passenger" + +# Load custom tasks from `lib/capistrano/tasks` if you have any defined +Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r } diff --git a/Gemfile.lock b/Gemfile.lock index 515f26fd..0d86a30f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -284,8 +284,15 @@ PLATFORMS x86_64-linux DEPENDENCIES + activesupport (~> 3.2) + bcrypt_pbkdf (>= 1.0, < 2.0) binding_of_caller (~> 1.0) + capistrano (~> 3) + capistrano-bundler + capistrano-locally + capistrano-rbenv cube-ruby + ed25519 (>= 1.2, < 2.0) email_spec ffi goo! diff --git a/config/deploy.rb b/config/deploy.rb new file mode 100644 index 00000000..14605071 --- /dev/null +++ b/config/deploy.rb @@ -0,0 +1,27 @@ +set :repo_url, "git@github.com:biodivportal/ncbo_cron.git" +set :user, 'ontoportal' + +set :deploy_to, '/srv/ontoportal/ncbo_cron_deployments' + + +set :stages, %w[appliance] +set :default_stage, 'appliance' +set :stage, 'appliance' +set :application, 'cron' + +# SSH parameters +set :ssh_port, 22 +set :pty, true + +# Source code +set :repository_cache, "git_cache" +set :deploy_via, :remote_cache +set :ssh_options, { :forward_agent => true } + +# Linked files and directories +append :linked_files, "config/config.rb" +append :linked_dirs, 'logs', '.bundle' +append :linked_files, "config/site_config.rb" +set :keep_releases, 2 + + diff --git a/config/deploy/production.rb b/config/deploy/production.rb new file mode 100644 index 00000000..40c7047f --- /dev/null +++ b/config/deploy/production.rb @@ -0,0 +1,13 @@ +set :branch, 'master' +set :server, 'biodivportal.gfbio.org' + +server fetch(:server), user: fetch(:user), roles: %w{web app} + +set :ssh_options, { + user: 'ontoportal', + forward_agent: 'true', + #keys: %w(config/deploy_id_rsa), + #auth_methods: %w(publickey), + # use ssh proxy if UI servers are on a private network + #proxy: Net::SSH::Proxy::Command.new('ssh deployer@sshproxy.ontoportal.org -W %h:%p') +} diff --git a/config/deploy/test.rb b/config/deploy/test.rb new file mode 100644 index 00000000..8c8ad1d4 --- /dev/null +++ b/config/deploy/test.rb @@ -0,0 +1,13 @@ +set :branch, 'master' +set :server, 'biodivportal.gfbio.dev' + +server fetch(:server), user: fetch(:user), roles: %w{web app} + +set :ssh_options, { + user: 'ontoportal', + forward_agent: 'true', + #keys: %w(config/deploy_id_rsa), + #auth_methods: %w(publickey), + # use ssh proxy if UI servers are on a private network + #proxy: Net::SSH::Proxy::Command.new('ssh deployer@sshproxy.ontoportal.org -W %h:%p') +}