[chef] Trying to start/stop tomcat from my own cookbook


Chronological Thread 
  • From: Chandan Maheshwari < >
  • To: chef < >
  • Subject: [chef] Trying to start/stop tomcat from my own cookbook
  • Date: Fri, 10 May 2013 23:00:01 +0530


Hi All,

This may be a stupid or a silly question. But I am finding issues in getting it done.

Basically I have wrote a cookbook, where I am simply downloading a tar file of tomcat with other stuff related to my app from some location.

Then I am using some resources to untar it to define a specific folder structure onto my new instance created using knife ec2 plugin. (to be specific ubuntu)

Now I have one shell script which basically stops the tomcat, extracts my application war in particular location, removes some unwanted files from the extracted war and then starts the tomcat back.

I am executing this script using "execute" and in command passing the full path of the script. The script does everything (extracts my application war in particular location, removes some unwanted files from the extracted war), but it do not stops the tomcat and then starts it back.

The chef-client runs successfully.

Now when I login to the newly created instance, I can't see any tomcat logs. Moreover when I run the shell script manually (which I ran with cookbook also), it does everything and I can hit the URL to access my app.

Any help is greatly appreciated.

I don't want to use the existing tomcat cookbook, as I want to try it from my location(where I have kept the tomcat.tar) also I want to use tomcat7.

--
Thanks and Regards,
Chandan



Archive powered by MHonArc 2.6.16.

§