Using Chef cookbook with Omnibus

I have the Chef cookbook to install the tomcat and deploy war. Is it possible to combine the tomcat cookbook with the Omnibus. It would be better if there are any sample tutorials or link to do it.

There isn’t a quick How To for what you are after as I indicated on the other thread. Omnibus takes care of packaging, config management like Chef takes care of configuration. These are entirely separate things.

Omnibus has it’s own DSL that can be used to do “configuration like” things but again it’s specifically geared toward producing packages of the DEB/RPM/MSI variety. That is to say, you can probably do much of what the cookbook you have does inside an Omnibus definition but there is no integration so to speak, these tools have very different design goals. For example, chef-client is an omnibus package but we still have a chef-client cookbook to manage the config files and such. How much you want to blur the separation of concerns is up to you here but there isn’t really much written along doing what you’re after specifically.

From your input, to build the installer, i have created following DSL under the software directory of config. The content of the .rb file is as below.This code will extract the .tar file in local directory and start the tomcat services. I think i need to add a dependency for Java which can be done using dependency function.
is there anything needs to be added further to create .rpm file that will install tomcat and start services.
name "streamc"
source path: '/home/testuser/apache-tomcat-7.0.82.tar.gz’
install_dir “/home/testuser/streamc"
default_version “1.9.2-p290"
build do
env = with_standard_compiler_flags(with_embedded_path)
command “sh startup.sh
" --prefix=#{install_dir}/apache-tomcat-7.0.82/bin”
" --verbose”, env: env
end