0

How can I correctly tell the tomcat chef recipes to use the version 8 of tomcat.

I try these lines in a attributes/default.rb file of a recipe depending on tomcat:

override['tomcat']['base_version'] = 8
default['tomcat']['base_version'] = 8
raise node['tomcat']['base_instance']

It displays

RuntimeError
------------
tomcat6

How can I get tomcat recipe using installing tomcat8?

Charles
  • 11,367
  • 10
  • 77
  • 114
  • 1
    See: https://github.com/opscode-cookbooks/tomcat/issues/129 It looks like you may need to use an additional wrapper recipe. Follow the links in the comments – Display Name is missing Jul 07 '15 at 23:16
  • You can add an [`include_attribute`](https://docs.chef.io/attributes.html#attribute-file-ordering) statement in your attribute file to force the reload of the tomcat attribute file with an overrided base_version (use force.default or override, staying at default would reset the base_version. – Tensibai Jul 08 '15 at 07:41
  • I added `include_attribute "tomcat"` after `override` but raise still displays tomcat6. – Charles Jul 08 '15 at 08:55
  • No luck in this case, you'll have to get the tomcat attribute file and redefine each attribute as shown in the ticket @DisplayNameismissing has linked in above comment. – Tensibai Jul 08 '15 at 09:03

1 Answers1

0

Why don't you specify the override using a role? For example:

How to customise a tomcat recipe in Chef

It's also worth noting that the java cookbook uses packages to install tomcat but "tomcat8" is currently not available yet in the Ubuntu repositories...

Hope this helps

Community
  • 1
  • 1
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185