札幌のフリーランサーまいむぞうのブログ。Android関連、コンピュータビジョン、IoT、ロボティクスあたりをやっています。 EC2上でRailsを便利に扱うためのEC2onRailsというプラグインがあるみたい。 でも、日本語でのEC2onRailsの情報は少ないので、以下で解説しちゃいます。 まず、このプラグインはEC2のAMI+Capistranoの拡張プラグインとして配布されているもので、インスタンスへのデプロイや、インスタンス上のMySQLやログについて、S3にバックアップなどを自動的に行ってくれるみたい。 配布されているEC2onRailsのAMIはほとんどまっさら状態なので、このまっさらの状態のサーバから、必要なパッケージやgemをインストールし、必要なサービスを起動するところまでやってくれる。 その分、deploy.rbが複雑になっているので、日本からの初期設定として使いや
Hi, I have updated from Ruby on Rails 2.2.2 to 2.3.2. I have managed to run it both on my Mac OS X and Ubuntu server. (script/server -e production) But when I tried to run it using Capistrano, I got an error. (cap deploy:start). (I replaced my home directory name etc. with --- in the following): *** [err :: ---.org] /usr/local/lib/site_ruby/1.8/rubygems.rb:149:in `activate' *** [err :: ---.org] :
Welcome to easy deployment The Pitch. You lead a busy life. You don’t have the time to waste logging in and logging out of your servers all day, running tasks, installing software, keeping machines in sync, and trying to make sure it all happens correctly. Enter Capistrano. Let Capistrano do the heavy lifting for you. It is designed with repeatability in mind, letting you easily and reliably autom
DZone Snippets13279 users tagging and storing useful source code snippets Never been to DZone Snippets before? Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world These tasks should work with the default deploy.rb file. I assume you've at least read the Capistrano manual at ruby
まずはインストール # gem install capistrano railsアプリケーションに組み込んでみる $ cap --apply-to ~/project/garakuta 設定ファイルを眺め(LAN内の設定なのでサーバー名などは適当) $ emacs ~/project/garakuta/config/deploy.rb set :application, "garakuta" set :repository, "svn://vaio/var/svn/project/garakuta/trunk" role :web, "vaio" role :app, "vaio" role :db, "vaio", :primary => true set :deploy_to, "/home/garakuta/webapp" set :user, "garakuta" 公開用サーバーを
CapistranoはRailsと非常に親和性高いんですが、他の言語でも使えます。 例としてEthnaのプロジェクトを capistranize してみます。 1.Ethnaのプロジェクト作成 $ ethna.sh add-project test creating directory (/path/to/project/test) [y/n]: y 2.Rails環境の適用 $ rails rails-tmp $ cp rails-tmp/Rakefile test $ cp -a rails-tmp/config test $ cp rails-tmp/db db $ cp -a rails-tmp/test test $ cp -a rails-tmp/lib/* test/lib $ cp rails-tmp/vendor test/vendorこれでRails環境が動作するように
Posted by masuidrive Wed, 02 Aug 2006 17:54:00 GMT config/deploy.rbに下記の行を加える。 nobodyの所は適当なユーザにし、sudoの設定もしておくこと。 set :mongrel_user, "nobody" desc "Restart the web server" task :restart, :roles => :app do begin run "cd #{current_path} && sudo -u #{mongrel_user} /usr/local/ruby/bin/mongrel_rails restart" rescue RuntimeError => e puts e end end desc "Start the web server" task :spinner, :roles => :app
■ [Amazon][ruby] Rubyist Magazine 出張版 正しいRubyコードの書き方講座―RubyistのRubyistによる、Rubyistとそうでない人のための(青木 峰郎) Hikidoc の添削があるようなので Amazon でぽちっとな。なんか、コラムの執筆陣がやたらと豪華。 Rubyist Magazine 出張版 正しいRubyコードの書き方講座―RubyistのRubyistによる、Rubyistとそうでない人のための 青木 峰郎 毎日コミュニケーションズ ¥859 ■ [rails][ruby][capistrano]capistrano で遊ぶ ローカルでいじって遊んでいる バカが征く on Rails だけど、これを capistrano で管理できるように色々設定。 まずはインストール gem install capistrano ローカルのプロ
※ この資料について 2006年4月の勉強会資料をCapistranoのバージョンアップ(現時点では1.3.1になってました)による仕様変更などに合わせてちょっと修正したものです。 質疑応答の部分は当時のままなので最初の質問が初々しいです。 Capistranoって何なのさ デプロイツール デプロイ=配備 参考 : Capistrano: Automating Application Deployment 一言で言うと複数のサーバ上で同時に並行してコマンドを実行できるツール。 複数のサーバで動いているサービスのデプロイを楽に行うことができる。 Rails起源なのでRailsに特化した部分もあるが、ほかのアプリケーションでも使える。 昔はSwitchTowerと呼ばれていた。はてなでも使われてる。 何がいいのか 複数サーバへの作業が効率化、自動化できる 定義済みの標準タスクに沿った運用をする
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く