Comments (8)
I have the same issue in Ubuntu 14.04, tried to override and still wants to install tomcat6 instead of 7.
from tomcat.
This cookbook does not appear to be "role/wrapper cookbook"-friendly. In my testing, I had to eschew my wrapper cookbook methodology only for Tomcat and instead set the version in my environment attributes file for Chef Zero. It's enough to make me consider writing my own super-basic Tomcat cookbook, unfortunately.
EDIT: The workaround is to re-declare every attribute that is dependent on the one you changed. For example, in change base_version
from 6 to 7 in a wrapper cookbook:
### Changed value(s):
default['tomcat']['base_version'] = '7'
### Unchanged values that rely on above being different:
suffix = node['tomcat']['base_version'].to_i < 7 ? node['tomcat']['base_version'] : ''
default['tomcat']['base_instance'] = "tomcat#{suffix}"
default['tomcat']['home'] = "/usr/share/tomcat#{suffix}"
default['tomcat']['base'] = "/usr/share/tomcat#{suffix}"
default['tomcat']['config_dir'] = "/etc/tomcat#{suffix}"
default['tomcat']['log_dir'] = "/var/log/tomcat#{suffix}"
default['tomcat']['tmp_dir'] = "/var/cache/tomcat#{suffix}/temp"
default['tomcat']['work_dir'] = "/var/cache/tomcat#{suffix}/work"
default['tomcat']['context_dir'] = "#{node['tomcat']['config_dir']}/Catalina/localhost"
default['tomcat']['webapp_dir'] = "/var/lib/tomcat#{suffix}/webapps"
default['tomcat']['lib_dir'] = "#{node['tomcat']['home']}/lib"
default['tomcat']['endorsed_dir'] = "#{node['tomcat']['lib_dir']}/endorsed"
default['tomcat']['packages'] = ["tomcat#{suffix}"]
default['tomcat']['deploy_manager_packages'] = ["tomcat#{suffix}-admin-webapps"]
from tomcat.
This sounds to me like an issue with the attribute precedence... It sounds like it could be resolved by setting your attribute in the wrapper cookbook with a higher precedence??
Could you try using normal
or override
instead of default
?
You can find more info on this here
from tomcat.
I did try the override. It just doesn't work :S I end up writing my own :)
Thanks!
from tomcat.
:)
I remember I was also struggling back when I first tried to use this (and other) cookbooks, but I can't say for sure what I'd tried...
It's now working for me with the override in an environment.
Not sure if that's suitable for your scenario?
EDIT:
p.s. this looks like a dup of #129 ?
from tomcat.
digging a little further into the issues, I see that this very same issue also appears in #102 - and it's actually very well documented there .
The problem / solutions are explained perfectly in this article.
I would argue there's not much we can do apart from clearly documenting this in the README.md , so that ppl know to use a role / environment vs. overriding the attributes (e.g. if you override base_version, which seems to be the most common case, you should make sure to override all the others deriving from it).
another option could be to replace usages of the derived attributes where we read the value, with:
- inlined value (i.e. instead
node['tomcat']['config_dir']
, use sth like"/etc/tomcat#{node['tomcat']['base_version']}"
) - a function that contains the logic, so it would compute the value every time
EDIT:
dup of #89 as well !!
from tomcat.
First off I'm very sorry that it's taken so long to get back to you on this issue. For a significant period of time there was no active Chef Software Inc. maintainer for this repository and things languished. We're now actively maintaining this cookbook again, and as part of that I've rewritten the cookbook with new custom resources for installing Tomcat from Apache Org sources. This will ship in an upcoming 2.0 release and then we'll remove the existing recipes and providers in a future 3.X release. With those new providers I believe the need for this change goes away so I'm going to close this out. I encourage you to give the new providers a try and let me know if we can tackle more Tomcat management without the attributes bloat the current code suffers from. They're on the master branch and once the documentation and testing improves a bit they'll be released as a 2.0 cookbook.
from tomcat.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from tomcat.
Related Issues (20)
- tomcat install directory permissions set to 0750 HOT 4
- CATALINA_BASE provided via env_vars is not properly processed. HOT 4
- Shell for tomcat_user HOT 2
- use of custom packages need mention in readme about support HOT 1
- CLASSPATH not honored in systemd HOT 3
- build failure of master branch HOT 4
- Tomcat custom symlink and systemd.service HOT 1
- Switch to another checksum algorithm HOT 2
- Building URI vs URI() HOT 3
- add support for multiple tomcat instances with same user HOT 2
- support for Amazon Linux 2? HOT 2
- Default Tomcat Recipe does nothing- see readme for information. HOT 3
- Permission denied starting catalina.sh using chef-client HOT 4
- Chef: 13.8.5 HOT 2
- Tomcat cookbook should support overriding of Systemd tomcat service template HOT 3
- Allow LDAP IDs which are not in /etc/passwd HOT 3
- Feature Request: Windows Platform support HOT 4
- Support Tomcat 10 HOT 1
- Checksum verification does not work with local file uri HOT 4
- Dependency Dashboard
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tomcat.