Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Documentation errors in 'The Java 8 / Jetty 9.3 Runtime' #188

Closed
gregw opened this issue Mar 1, 2016 · 6 comments
Closed

Documentation errors in 'The Java 8 / Jetty 9.3 Runtime' #188

gregw opened this issue Mar 1, 2016 · 6 comments
Assignees

Comments

@gregw
Copy link
Contributor

gregw commented Mar 1, 2016

Not sure if this is the right place to raise an issue on this docomentation, but I will do so to at least capture to issues.

To use a custom Dockerfile, the runtime in the app.yaml file must be changed from java to custom

The documentation says that if you wish to use a custom Dockerfile, you must build the war and put it in the source directory next to app.yml. This is not the case, rather the war is already build for you and is placed in target/appengine-staging. A dockerfile as follows may be used:

FROM gcr.io/google_appengine/jetty9
ADD projectname-version.war $JETTY_BASE/webapps/root.war

where projectname and version are from maven (it would be really good if maven property expansion could be done on the Dockerfile when copied to target!!!)

@ludoch
Copy link
Contributor

ludoch commented Mar 1, 2016

For @lesv to coordinate the doc change.

@gregw
Copy link
Contributor Author

gregw commented Mar 1, 2016

Here is an example of how to customise Jetty that you might want to put into the doco. The following adds jmx, stats and the hawtio console to the jetty instance:

src/main/appengine/Dockerfile:

FROM gcr.io/google_appengine/jetty9
ADD test-webapp-1.0-SNAPSHOT.war $JETTY_BASE/webapps/root.war
WORKDIR $JETTY_BASE
RUN java -jar $JETTY_HOME/start.jar --approve-all-licenses --add-to-startd=jmx,stats,hawtio \
 && chown -R jetty:jetty $JETTY_BASE

src/main/appengine/app.yaml:

runtime: custom
vm: true
manual_scaling:
  instances: 1

I've set instances to 1 because we don't yet have clustered sessions, but know I know how to configure these apps I should have an example of the sessions soon.

PS. just saying again that maven property expansion in the Dockerfile would be really handy!

@lesv
Copy link

lesv commented Mar 1, 2016

Not sure where the war thing came in. --- It wasn't what I reviewed.

I'll look into this.

@lesv
Copy link

lesv commented Mar 1, 2016

You can have Maven Property expansion in a Dockerfile, it should do it during resource copy phase.

I've reported this internally.

@gregw
Copy link
Contributor Author

gregw commented Mar 2, 2016

Uffa! I've finally got an example running at it was a lot harder that I had thought.... partly due to my own stupidity, in part bad jetty doco, but also a miss-match with the jetty module system and clustered session management, as well as the google doc that needs to be improved.

Anyway, I have an example webapp, which I propose to create a PR against java-docs-samples/managed_vms/jetty9-cloud-session... standby

I also raised: jetty/jetty.project#378 and jetty/jetty.project#380 that will make things simpler in future.

@gregw
Copy link
Contributor Author

gregw commented Apr 27, 2016

@aozarov This is the issue under which I prepared an example of a non-compat shared session manager, but that really was for #183. I had prepared PR GoogleCloudPlatform/java-docs-samples#123, but it was not polished enough to be merged, so I closed it.

I think this issue is too general and should be closed, with more specific issues created for any documentation required. Non compat session clustering work should be done under #183

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants