You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
こんにちは。 タイトルの通りなんですが、Capistrano みんなつかってるよねー。 ってことで独自のデプロイシステムをもってなくてさすがにFTPでUPはしてませんって人は結構使ってるもんだと思ってるんですけど、Capistrano ってなんかデフォルト各サーバで vcs の update 的なことをするか、ローカルにソースツリーを用意してやる場合に使えるのは scp で、なんかエコじゃないよねと言う話で、いちいちソースツリー全部配布されてたら転送量も時間もかかってしょうがないので、まーrsyncがいいんだよね、ということで、そんな時は capistrano_rsync_with_remote_cache (なげえよ) を使えばいいよね!ってお話です。 *1 luisparravicini/capistrano_rsync_with_remote_cache · GitHub このご時世
I don't have time to read and I want to jump immediately to the solution. The problem From the day I started using DelayedJob in combination with God, I faced the problem to restart the god group every time I deployed a new application release. In fact, when a rake task (God runs DelayedJob using the rake jobs:work task, here's the config) is started, it loads the entire Rails environment and keep
はじめに rails3でもcapistrano使いたいですよね。 でもそのままだとbundlerが動かないので、わざわざ本番環境でbundle installとかやらなきゃいけない。 しかもwindows環境で作られたGemfile.lockが邪魔で、削除してから、本番環境用のGemfile.lockを作らないといけない。 なんとかならないかなぁと、思って四苦八苦したメモ。 失敗すると、こうなります。 結論 Windows開発環境で作られたGemfile.lockはあくまでWindows環境のもの。 Ubuntu(その他の)環境では使えませんよね(だからbundle_flags --deploymentはダメですよ) その環境用にGemfile.lockつくるようなcapistranoのdeploy.rbを書きましょう deploy.rb # デフォルトで設定されている --deploym
デプロイしたけど何かおかしい? 先日、Unicornを採用しているウェブアプリで問題が発生しました。デプロイした最新のコードが実行されているように見えますが、時々古いコードの挙動を見せるのです。 今回はそのトラブルシューティングの一部始終を紹介しながら、Unicornのホットデプロイ(ダウンタイムなしでアプリケーションを更新すること)の仕組みをおさらいします。担当は私、去年KRAYに入社しました@irohirokiです。よろしくお願いします。 問題 まずはデプロイ先のサーバにSSHして、Unicornのプロセスを調べてみました。 $ ps ax -H PID TTY STAT TIME COMMAND 3159 ? Sl 0:00 unicorn master (old) -c unicorn.conf -D 3162 ? Sl 0:00 unicorn worker[0] -c unic
ちょっとした気まぐれでUnicornを使ってみた。 初Unicorn。 ということでUnicorn用のCapistranoのタスクをdeploy.rbに書いた。 内容はだいたい以下の受け売り。 Capistrano tasks for starting unicorn — Gist Twiwt:Blog / jugyo : Capistrano によるデプロイ時に Unicorn の再起動に失敗することがある問題への対処 namespace :deploy do task :start, :roles => :app, :except => { :no_release => true } do run "cd #{current_path} && BUNDLE_GEMFILE=#{current_path}/Gemfile bundle exec unicorn_rails -c #{cu
I have a basic Rails 3 app working locally on my development box, but want to test out deploying early on to make sure everything works. I'm using Capistrano to deploy. When I run cap deploy (after all the other necessary setup), it breaks on this command with this error: [...] * executing 'bundle:install' * executing "bundle install --gemfile /var/www/trex/releases/20100917172521/Gemfile --path /
昨日の続き。 Whenever標準でCapistranoのタスクが用意されているので、簡単に組み合わせることができる。 deploy.rbの編集 以下の行を適当な場所に挿入。例えばロールを定義している下あたりとか。 set :whenever_command, "bundle exec whenever" require "whenever/capistrano" これだけでもうcap deployすればconfig/schedule.rbの内容がCrontabに反映されるようになる。 ロールの設定 Wheneverの対象となるデフォルトのロールは:dbになっている。 必要ならば:appに変更したり、適当に:batchなどのロールを作ってdeploy.rbに書く。 set :whenever_roles, { :batch } 複数サーバーで実行されると負荷などが面倒になりそうな処理を実行
Introduction Capistrano is a Ruby program that gives you a set of advanced tools to deploy web applications to your servers. In its simplest form, Capistrano allows you to copy code from your source control repository (SVN or Git) to your server via SSH, and perform pre and post-deploy functions like restarting a webserver, busting cache, renaming files, running database migrations and so on. With
基本設定、開発環境設定に引き続き、今回はCapistranoを導入して自動デプロイできるように設定。unicorn+nginx周りの設定も変更して快適にデプロイできるようになりました。 リモートリポジトリの作成 リモートサーバーにリポジトリを作成します。 今回は全て同じサーバーでやるので、自分のホームディレクトリ直下に作りました。 $ mkdir -p /home/ntaku/git/sample $ cd ~/git/sample $ git --bare init 後からcapistranoでアプリを配置するためのディレクトリも作成しておきます。 # mkdir /var/www プロジェクト作成 ここからはローカルで。 新規プロジェクトを作成して、テスト用のコントローラーを追加します。 $ rails new sample -d mysql $ cd sample $ rails g
デプロイを行う 初めてデプロイする場合は以下のコマンドを実行します。 $ cap deploy:cold 上記コマンドを実行することで、大まかには以下の処理が実行されます。 SSHでデプロイ先にログイン subversionから最新のソースコードを取得 最新のソースコードを配置(同時にバックアップを行う) migrationを実行 deploy:startタスクの実行(Apacheの起動、再起動) これで、/home/okitsu/www/moonlinx/currentに最新のアプリケーションが配置されます。 このcurrentディレクトリはdeploy:coldを実行したタイミングで作成されるのですが、releasesに配置されたディレクトリへのシンボリックリンクになります。 (例) current -> /home/okitsu/www/moonlinx/releases/20090
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く