Apache::Deploy

联合创作 · 2023-10-01 16:11

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,
   };   
};
浏览 6
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报