Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tomcat7 and Centos6.x #74

Closed
shaycohen opened this issue Jun 11, 2014 · 19 comments · Fixed by #116
Closed

Tomcat7 and Centos6.x #74

shaycohen opened this issue Jun 11, 2014 · 19 comments · Fixed by #116

Comments

@shaycohen
Copy link

Tomcat 7.0.x is available to CentOS 6.x users via the EPEL-testing repository.
The issue is naming convention; recipe/default.rb assume that Tomcat with Base Version 7 would be named 'tomcat7' while EPEL-testing name is 'tomcat' (or 'tomcat-7.0.x')

@jolexa
Copy link

jolexa commented Jun 16, 2014

It looks like the recipe is already doing some trickery for smartos, should be trivial to add a line for rhel,centos

@shaycohen
Copy link
Author

Found a quick-fix: jpackage repository provides a package named 'tomcat7' :)

@joerocklin
Copy link

@shaycohen is jpackage still supported? I cannot seem to find info about jpackage on centos 6.

@shaycohen
Copy link
Author

@joerocklin:
http://wiki.centos.org/AdditionalResources/Repositories
On Jun 23, 2014 5:57 PM, "Joe Rocklin" notifications@github.com wrote:

@shaycohen https://github.com/shaycohen is jpackage still supported? I
cannot seem to find info about jpackage on centos 6.

Reply to this email directly or view it on GitHub
#74 (comment)
.

@joerocklin
Copy link

@shaycohen right, and the last update to the jpackage site and repo list is from 2009 referencing java 5 (if I'm reading things correctly). That doesn't exactly strike me as 'up to date'.

@shaycohen
Copy link
Author

@joerockin, you are correct. Although I did not manage to find any Java/JRE version on JPackage 6.0, I noticed (while looking) that the published Tomcat version is 7.0.39 (over a year ago).

I think this issue can be resolved pretty quickly. Actually the main reason for not fixing the code (probably adding a search for tomcat-7, tomcat7, tomcat_7, etc; instead of walking through a list of known distributions) is to be able to maintain the cookbook intact.
I think I'll just edit my version of the fix and commit it sometime soon..

Thanks for being alert/noticing :)

@joerocklin
Copy link

@shaycohen I too started on a tomcat7/centos6 update for this cookbook, though I'm not to a place where I really have it working just yet (I'm not really a tomcat person, so it's probably something simple that I'm missing). If you've got something close I'd be happy to help test where I can, though I'll repeat: I'm not a tomcat person, so the best testing I'll be able to provide is 'does it install'.

@shaycohen
Copy link
Author

Sure, I'll upload my progress .. did you upload what you have ?

@joerocklin
Copy link

I just pushed it to https://github.com/joerocklin/tomcat/tree/tomcat7-centos6.

I went the route of changing the package installation method to use attributes instead internal variables. I found I was basically creating a new attributes section in the recipe just for tomcat7/centos though, and that felt a bit weird to me.

@shaycohen
Copy link
Author

I haven't had any 'vi time' yet (probably only tomorrow), but I would probably:

  • Seek a better way than "depends 'yum-epel ..." on metadata, as this will probably break the recipe on anything other than a CentOS or a Redhat
  • remove base_instance duplicate declaration on providers/instance and stick with the original one (you are dealing with this on the attributes later on

You made some great changes. This recipe seems to be very statically written initially.

thanks

@jolexa
Copy link

jolexa commented Jun 23, 2014

Doesn't PR #47 resolve this issue too? #47

@joerocklin
Copy link

@shaycohen I'm pretty sure that the yum-epel recipe will only get included if chef is running on CentOS and the attribute is set to install tomcat7. This should probably be expanded to the rhel platform_family, but I was doing focused testing. I would rather install from a package repo (that's getting updates) than switch to a tarball install for a specific platform/version combo.

@jolexa #47 sets up the package settings to be able to handle this better, and I wish it had been pulled in (I tried to use it as a starting point, but it doesn't merge at this point). It does not support tomcat7 on centos6 though, because the packaging of tomcat7 from EPEL drops the seven and just uses 'tomcat'.

@joerocklin
Copy link

Looking into it a bit more, the EPEL rpm for tomcat pulls in redhat-lsb, and therefore pulls in a ton more than what is necessary to run tomcat. Not sure why that decision was made...
@shaycohen have you found a good way to put tomcat7 on a centos 6 box w/o EPEL?

@shaycohen
Copy link
Author

Got a bit of a break from that issue for a while (monitoring stuff); I
think my path will be to use tomcat7 and jdk distributed as a ready-to-use
directory.
I think that trying to make this work in the standard chef approach will be
much more fragile and will only be beneficial for those who doesn't know
for sure the distribution they are using.

On Mon, Jul 7, 2014 at 8:46 PM, Joe Rocklin notifications@github.com
wrote:

Looking into it a bit more, the EPEL rpm for tomcat pulls in redhat-lsb,
and therefore pulls in a ton more than what is necessary to run tomcat. Not
sure why that decision was made...
@shaycohen https://github.com/shaycohen have you found a good way to
put tomcat7 on a centos 6 box w/o EPEL?

Reply to this email directly or view it on GitHub
#74 (comment)
.

@cwebberOps
Copy link
Contributor

Notes from hacking session:

  • depends on yum-epel but dont require recipe, use like apt
  • default recipe needs to be updated to handle the differences between centos5 vs centos6

@joshskains
Copy link

So is this worth waiting for or should I make a hack? I have CentOS 6.5 and need tomcat7. I have EPEL enabled, but the package name is of course breaking the install. I am curious if an official fix will be made or do I need to figure something out? Thanks!

@damacus
Copy link
Member

damacus commented Aug 21, 2014

@joshskains if you can provide/propose a fix that takes into account the CentOS 5 vs 6 and submit a PR that'd be great.
Even if it's just to get us talking about it again.

@jperry
Copy link

jperry commented Nov 19, 2014

++ on this. Any progress or update?

@lock
Copy link

lock bot commented May 6, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants