[chef] Re: Re: Re: Using `artifact` cookbook with Tomcat


Chronological Thread 
  • From: Tensibai < >
  • To:
  • Subject: [chef] Re: Re: Re: Using `artifact` cookbook with Tomcat
  • Date: Mon, 16 Feb 2015 09:25:40 +0100

Le 2015-02-15 23:43, Mark Nichols a écrit :

On Feb 15, 2015, at 4:32 PM, Mark Pimentel < "> > wrote: You could explode the war somewhere else and symlink the current folder into the webapps/foo where tomcat expects to find things.
I tried that, and it does work. However, I wasn't happy with the idea of having a "staging" area where the apps lived that Tomcat was symlinked to. We've gotten into binds in the past by having non-standard setups. 

The whole current symlink is already a departure (at least for Tomcat).

My hope is that I can use artifact to expand the app and somehow configure Tomcat to find the expanded war.

On the surface this seems to be what a context xml file was designed for. However I can't get past the appbase defined on the host. The error I get says:

WARNING: A docBase /var/lib/tomcat7/webapps/foo/current inside the host appBase has been specified, and will be ignored

This happens whether or not I have appbase set to nil ("") or webapps. Nor does it matter where I put the context: I've tried in server.xml and in a `foo.xml` file under `/etc/tomcat7/Catalina/localhost`

— Mark

If it can help we use artifact in a staging area, render log4j.xml template and some other and then call the manager deploy url giving the staging /current path to let tomcat deploy it in its appBase.

extract from it where app_infos['artifactId'] give use the application context root:

http_request "Call to Tomcat deploy API deploy_url" do
  action :get
  message "path=/#{app_infos['artifactId']}&update=true&war=file:#{deploy_tmp_dir}/#{app_infos['artifactId']}/current"
  url "http://localhost:8080/manager/text/deploy"
  headers({"AUTHORIZATION" => "Basic #{Base64.encode64("deploy_user:its_password")}"})
end

 

Hope it helps

 



Archive powered by MHonArc 2.6.16.

§