如何在Chef的Tomcat 7食谱上上传WAR文件? [英] How to upload a WAR file on Tomcat 7 cookbook by Chef?

查看:77
本文介绍了如何在Chef的Tomcat 7食谱上上传WAR文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在CHEF食谱上安装的Tomcat 7上部署War文件。
但是,我在任何论坛上都找不到我的问题的单一答案。我不知道该怎么做!我正在使用Ubuntu服务器12.10。
我正在使用的配方是 https://github.com/solarvm/tomcat7-cookbook

I'm trying deploy a War file on my Tomcat 7 installed by a cookbook on CHEF. But, I can't find a single answer for my question at any forums. I don't have any idea how to do this! I'm using a Ubuntu server 12.10. The recipe that I'm using is https://github.com/solarvm/tomcat7-cookbook

推荐答案

简单的方法是使用服务资源以停止Tomcat,使用 bash 资源或文件资源复制WAR文件,然后使用服务资源以再次启动Tomcat。

The simple way to do is is to use the service resource to stop Tomcat, use the bash resource or a file resource to copy the WAR file, and then use the service resource to start Tomcat again.

您尝试使用的食谱不会进行WAR文件部署。但是我发现了一个- https://github.com/poise/application_java -可以做到

That cookbook you are trying to use doesn't do WAR file deployment. But I found this one - https://github.com/poise/application_java - that may do the job.

对于它的价值,我想您也可以找到更好的Tomcat安装指南。首先,Opscode社区食谱网站上有一个 tomcat食谱可以处理Tomcat 7。

And for what it is worth, I think you could find a better Tomcat installation cookbook too. For a start, there is a "tomcat" recipe on the Opscode Community Cookbooks site that can handle Tomcat 7.

(提示:不要只使用您在Google上找到的第一本食谱。进行Github搜索,并尝试评估食谱的功能和质量)

(Hint: don't just use the first cookbook you find with Google. Do a Github search, and try to assess the cookbooks functionality and quality)

这篇关于如何在Chef的Tomcat 7食谱上上传WAR文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆