Omnibus cookbook to create rpm for a Java application


I have written following omnibus cookbook to install apache tomcat from local directory, copy the .war file to tomcat directory and start the tomcat service. Unfortunately i could not execute the below code as I don’t have sufficient access to execute the .rb file. I searched internet couldn’t find any related cookbook. Based on the DSL documentation I have created below code. It would be better, if anything is missed in the below code.

    name "streamc"
    source path: '/home/testuser/apache-tomcat-7.0.82.tar.gz'
    # source url: ''

    install_dir     "/home/testuser/streamc"
    default_version "1.9.2-p290"

    build do
      copy /home/testuser/streamc.war /home/testuser/streamc/apache-tomcat-7.0.82/webapps" #copy the war file
      command "sh /home/testuser/streamc/apache-tomcat-7.0.82/bin/ " #start the tomcat service