Capistrano
Capistrano(「カピストラーノ」あるいは「キャピストラーノ」)は、複数のサーバー上でスクリプトを実行するためのオ…
| 作者 | Ari Asulin |
|---|---|
| 最新版 |
3.19.2
/ 2024年11月7日[1] |
| リポジトリ | |
| プログラミング 言語 | Ruby |
| 対応OS | POSIX (Linux, OpenBSD, OS X) |
| 種別 | Deployment tool |
| ライセンス | MITライセンス |
| 公式サイト |
github |
Capistrano(「カピストラーノ」あるいは「キャピストラーノ」)は、複数のサーバー上でスクリプトを実行するためのオープンソースのツールであり、その主な用途は、ウェブアプリケーションのソフトウェアデプロイメントである。1つ以上のWebサーバ上のアプリケーションを新しいバージョンにする作業を自動化でき、データベースを変更するといった作業もできる。
CapistranoはRuby言語で書かれており、RubyGemsによって配布されている。これはRuby on Rails ウェブアプリケーションフレームワークの副産物だが、PHPといった、他のフレームワークを使用して書かれたウェブアプリケーションのソフトウェアデプロイメントに使うこともできる。
Capistranoは、主にBashのコマンドライン上で使用するように実装されている。Ruby on Railsフレームワークのユーザは、多くのCapistranoのレシピの中から選択することで、例えばウェブアプリケーションに現在の変更を展開したり、以前のソフトウェアデプロイメントの状態にロールバックするといったことができる。
もともとはSwitchTowerという名前だったが、競合する商標があったため、2006年3月にCapistranoに変更された。
原作者のJamis Buckは、2009年2月24日に、プロジェクトのメンテナンスをやめると表明した。[2] しかし直後にそれを嘆くスレッドがメーリングリスト(Google Group)上で始まり、 [3] GitHub上で開発が進められている。 [4]
内部
Capistranoは、SSH経由で、複数のリモートマシン上で並列にコマンドを実行するためのユーティリティおよびフレームワークである。ツールRakeの一部から借用した単純なドメイン固有言語を用いる。また、他のゲイトウェイ・マシン経由のトンネリング接続もサポートしているので、VPNやファイアウォール越しに操作を実行できる。
Capistranoはもともと分散環境へのウェブアプリケーションのソフトウェアデプロイメントを簡素化および自動化するために設計されており、Railsアプリケーションのソフトウェアデプロイメントをする一連のタスクがバンドルされていた。ソフトウェアデプロイメント・タスクが(Capistrano 2.0では)承諾されると、クライアントが明示的にレシピで「load 'deploy'」と置くよう要求する。
Capfileの例
task :xml_libs, :hosts => "www.capify.org" do
run "ls -x1 /usr/lib | grep -i xml"
end
これは「xml_libs」という名前の単一のタスクを定義し、唯一の「www.capify.org」ホスト上で実行されるべきであると設計されている。実行すると、名前に文字列 "xml"を含む/usr/lib内のすべてのファイルとサブディレクトリを表示する。capfileがカレント・ディレクトリにある場合は、以下のようにタスクを実行することができる:
cap xml_libs
脚注
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.