-
Notifications
You must be signed in to change notification settings - Fork 34
Documentation errors in 'The Java 8 / Jetty 9.3 Runtime' #188
Comments
For @lesv to coordinate the doc change. |
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! |
Not sure where the war thing came in. --- It wasn't what I reviewed. I'll look into this. |
You can have Maven Property expansion in a Dockerfile, it should do it during resource copy phase. I've reported this internally. |
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. |
@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 |
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 theapp.yaml
file must be changed fromjava
tocustom
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:
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!!!)
The text was updated successfully, but these errors were encountered: