Apache::Deploy
Apache::Deploy 是一个 (R)?ex 的模块,用来快速发布网站到 Apache 和 WAR 文件到 Tomcat. 简化了多服务器应用的发布过程。
一段发布应用到 Tomcat 的脚本:
use Rex::Apache::Deploy Tomcat; # Version of the application my $VERSION = "1.0"; user "deploy"; public_key "/home/deploy/.ssh/id_rsa.pub"; private_key "/home/deploy/.ssh/id_rsa"; group "tomcat" => "tomcat[01..04]"; parallelism 4; context_path "/myapp"; desc "Deploy Application"; task "deploy", group => "tomcat", sub { deploy "myapp-$VERSION.war", { username => "manager-user", password => "manager-password", port => 8080, }; };
评论