-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Procfile container to facilitate running packaged jar applications #15
Conversation
This reverts commit 904de5c.
…hould keep it in the cache
At this stage I'd just like a If |
I'm going to start with no (which totally blows my statement that I default to yes out of the water) but I'm willing to be convinced otherwise. In general, the java-buildpack does not have a goal of running any arbitrary command that uses Java behind the scenes. It is intended to run an 80% scope of applications very well and without modification. Beyond that, I'm not sure what this functionality would do that using a Cloud Foundry custom command wouldn't. Again, I'm open to having my mind changed; strong opinions loosely held, and all that. |
My issue with using a Cloud Foundry custom command was that the buildpack "compile" phase always fails because it can't find a supported container. If we could get around that issue, then you could just bundle Forego with your specific app. That said, being able to grab the custom JAVA_OPTS from buildpack is quite useful. |
@nebhale - poke 😄 Has my issue with not being able to specify a custom command because of the lack of a supported container swayed your opinion at all? |
Sorry, headed out on holiday before responding. Looking back over the discussion, you mention "In cases where you need to run a third party Java app that comes packaged as a jar,...". If that is the case, we already have a container that runs it. Are you not seeing that behavior? Another issue that comes to mind is how the In my own mind, I keep circling back to the idea that a JAR file (either with a The design of the buildpack (currently) is not to run anything that requires Java, but rather to run a specific (expandable) set of artifact types. If you don't mind I'd like to delve into specifically what artifact types you can't run today using the facilities provided. I'd like to solve the problem for everyone rather than just pushing users to specify a custom command line. |
@nebhale - thanks for working with me to find the underlying root issue here. As you suggest, a concrete example will be helpful here. Specifically I'm trying to deploy this project - https://github.com/mybytes/personal-data-api This is a Apache Jena Fuseki HTTP endpoint that allows me to make SPARQL over HTTP queries against a Linked Data database. Fuseki comes packaged as a jar. When you extract the Fuseki distribution tgz you get:
The "howto run fuseki instructions" instructs you to launch it using a command like
LogStash is another Java app that comes packaged as a jar, with similar "launch with java -jar " instructions, so I'm guessing this is a common pattern. In both these cases I don't really want to explode the jar and go looking for the Main class, I just want to use this as documented as a component in my CF app. Hopefully this helps give you some context to my specific issue. I think that the root cause is that there is currently no way with the java-buildpack to specify a custom command if a supported container is not found during the If there was a way to tell the java-buildpack to just package the jvm and let my app's manifest.yml worry about the custom start command then I'd be able to deploy -jar apps like this. |
A trick you can use in this scenario is to add a This isn't very obvious or elegant, and it would be nice if there were a cleaner solution, but it works as a short-term hack. |
The concrete example sheds a huge amount of light on this. Fundamentally Fuseki is a container, and therefore should be implemented (and contributed back) as a component. A user (you @mrdavidlaing) should be able to simply push the A great example to base this component on would be the Groovy container. |
Hmm - your conception of the specificity of containers is a lot tighter I understand your design goals for the java-buildpack better, and can see Let's close this PR.
|
OK, thanks for taking the time to discuss this with us. Any chance we should be expecting a Fuseki container contribution from you? ;) |
@nebhale - If I do some more work with Fuseki, then yes. |
In cases where you need to run a third party Java app that comes packaged as a
jar
, being able to specify the exact startup command(s) via aProcfile
is very useful development, and running the via the start command specified in theProcfile
using Forego works well when deployed to Cloud Foundry.An example of this in action is https://github.com/mybytes/personal-data-api.