fabric8io / ipaas-quickstarts

quickstarts for the fabric8 project
Apache License 2.0
66 stars 86 forks source link

Should java main class vs fatjar output the same starting sequence #867

Open davsclaus opened 9 years ago

davsclaus commented 9 years ago

They are a bit different today

davsclaus:~/workspace/fabric8-installer/vagrant/openshift (master)/$ oc logs -f quickstart-java-simple-mainclass-scnjs
Executing /deployments/bin/run ...
Launching application in folder: /deployments
Running  java  -javaagent:/opt/jolokia/jolokia.jar=config=/opt/jolokia/jolokia.properties,useSslClientAuthentication=true,extraClientCheck=true,protocol=https,caCert=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt,clientPrincipal=cn=system:master-proxy -classpath .:/deployments/lib/quickstart-java-simple-mainclass-2.2.57-SNAPSHOT.jar:/deployments/lib/commons-lang3-3.4.jar io.fabric8.quickstarts.java.simple.Main
I> No access restrictor found, access to all MBean is allowed
Jolokia: Agent started with URL https://172.17.0.7:8778/jolokia/
Hello Fabric8! Here's your random string: YlmZb
Hello Fabric8! Here's your random string: cIZb0
Hello Fabric8! Here's your random string: SgqfR
Hello Fabric8! Here's your random string: GoAUi
^Cdavsclaus:~/workspace/fabric8-installer/vagrant/openshift (master)/$ oc logs quickstart-java-simple-fatjar-dplyx
I> No access restrictor found, access to all MBean is allowed
Jolokia: Agent started with URL https://172.17.0.6:8778/jolokia/
Hello Fabric8! Here's your random string: 1DCnf
Hello Fabric8! Here's your random string: ktUMw
Hello Fabric8! Here's your random string: FNUQQ

The main class quickstart output the entire java xxx command line. It would be nice if the fatjar did the same. Also the former tells which bin it executes etc.

@rhuss any thoughts? Or is this too minor details?

oscerd commented 8 years ago

Can it be related to the fact that simple-fatjar is using the following docker image: fabric8/java-jboss-openjdk8-jdk:1.0.10? While simple-main is using fabric8/s2i-java:1.2.8?

rhuss commented 8 years ago

Yes, the startup message comes from the startup script which is different in the two base images.

My suggestion is to go back to the community base images without reference to s2i.

I can add a debug statement for the startup script.

oscerd commented 8 years ago

Can I submit a PR with the switch from s2i image to the community base image?