[INFO] Compiling 2 source files to /home/ibmadmin/guides/draft-guide-kubernetes/start/name/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] kube-demo .......................................... SUCCESS [ 0.009 s]
[INFO] name ............................................... FAILURE [ 45.936 s]
[INFO] ping ............................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.874 s
[INFO] Finished at: 2018-09-14T17:13:09-04:00
[INFO] Final Memory: 17M/183M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project name: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :name
FIX: install JDK:
https://stackoverflow.com/questions/14788345/how-to-install-the-jdk-on-ubuntu-linux
ibmadmin@ectestvm:~$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.16.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
[INFO] Building Docker context /home/ibmadmin/guides/draft-guide-kubernetes/start/name
[INFO]
[INFO] Image will be built as name:1.0-SNAPSHOT
[INFO]
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Permission denied
[INFO] Retrying request to {}->unix://localhost:80
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Permission denied
[INFO] Retrying request to {}->unix://localhost:80
[INFO] I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Permission denied
[INFO] Retrying request to {}->unix://localhost:80
[WARNING] An attempt failed, will retry 1 more times
org.apache.maven.plugin.MojoExecutionException: Could not build image
at com.spotify.plugin.dockerfile.BuildMojo.buildImage(BuildMojo.java:185)
at com.spotify.plugin.dockerfile.BuildMojo.execute(BuildMojo.java:105)
[INFO] Reactor Summary:
[INFO]
[INFO] kube-demo .......................................... SUCCESS [ 0.003 s]
[INFO] name ............................................... FAILURE [01:34 min]
[INFO] ping ............................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:39 min
[INFO] Finished at: 2018-09-17T10:09:48-04:00
[INFO] Final Memory: 34M/191M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.0:build (default) on project name: Could not build image: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: java.io.IOException: Permission denied -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :name
FIX: To use docker command without sudo , let's add our user to docker group, in this case am adding $USER user to docker group
https://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo
ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ docker images
WARNING: Error loading config file: /home/ibmadmin/.docker/config.json: stat /home/ibmadmin/.docker/config.json: permission denied
REPOSITORY TAG IMAGE ID CREATED SIZE
ping 1.0-SNAPSHOT 80a73ed3882b 4 minutes ago 543MB
name 1.0-SNAPSHOT 8aa5c70de565 4 minutes ago 543MB
open-liberty latest 0bd5dbb2459b 11 days ago 501MB
hello-world latest 2cb0d9787c4d 2 months ago 1.85kB
BASICALLY, the above output is incomplete/incorrect.
ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ kubectl get pods
NAME READY STATUS RESTARTS AGE
ol-name-ibm-open-liberty-7996778b8f-gg6fv 0/1 ImagePullBackOff 0 2m
ol-ping-ibm-open-liberty-5f884cc9cb-6qlp7 0/1 ImagePullBackOff 0 1m
ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ kubectl get pods
NAME READY STATUS RESTARTS AGE
ol-name-ibm-open-liberty-7996778b8f-gg6fv 0/1 ImagePullBackOff 0 4m
ol-ping-ibm-open-liberty-5f884cc9cb-6qlp7 0/1 ImagePullBackOff 0 3m
ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ kubectl get pods
NAME READY STATUS RESTARTS AGE
ol-name-ibm-open-liberty-7996778b8f-gg6fv 0/1 ImagePullBackOff 0 10m
ol-ping-ibm-open-liberty-5f884cc9cb-6qlp7 0/1 ImagePullBackOff 0 8m
ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ kubectl get pods
NAME READY STATUS RESTARTS AGE
ol-name-ibm-open-liberty-7996778b8f-gg6fv 0/1 ImagePullBackOff 0 14m
ol-ping-ibm-open-liberty-5f884cc9cb-6qlp7 0/1 ImagePullBackOff 0 13m
FIX: need to configure the Docker CLI to use Minikube’s Docker daemon, ie, command eval $(minikube docker-env)
, AGAIN, because of the change of environment during adding the user into the “docker” group by logout and login again.
THEN, at this point, need to clean up the helm chart installations, and do them again!
ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start$ kubectl get ingress
NAME HOSTS ADDRESS PORTS AGE
ol-name-ibm-open-liberty * 10.0.2.15 80 7m
ol-ping-ibm-open-liberty * 10.0.2.15 80 7m
But the default curl -k https://192.168.99.100/name/
works!
ibmadmin@ectestvm:~/guides/draft-guide-kubernetes/start/name$ kubectl get pods
NAME READY STATUS RESTARTS AGE
ol-name-ibm-open-liberty-64d55f446d-4xzm9 1/1 Running 0 3m
ol-name-ibm-open-liberty-64d55f446d-lhjnp 1/1 Running 0 2m
ol-name-ibm-open-liberty-64d55f446d-trs72 1/1 Running 0 3m
ol-ping-ibm-open-liberty-5f884cc9cb-dtzqq 1/1 Running 0 17m