Deploying to Google Cloud

The console output from JHipster gave us some handy commands for the next steps. Since we have new applications, we need to build them first, as follows:

  1. Let's go into each application folder and run the Gradle build. We can use the jib command to build and push directly to our registry, in this case, Docker Hub. If you want to build and tag locally, you can use the  jibBuild command. Change the image name for each application:
> ./gradlew bootJar -Pprod jib -Djib.to.image=deepu105/store
  1. Since these are fresh applications, there should not be any errors. Once the builds are complete, we can navigate into the kubernetes folder and execute the provided bash script to start the deployment:
> cd kubernetes
> ./kubectl-apply.sh

....
#####################################################
Please find the below useful endpoints,
Gateway - http://store.jhipster.34.77.78.2.nip.io
Zipkin - http://zipkin.istio-system.34.77.78.2.nip.io
Grafana - http://grafana.istio-system.34.77.78.2.nip.io
Kiali - http://kiali.istio-system.34.77.78.2.nip.io
#####################################################
  1. This will start the deployment and print out important URLs. We can run a watch loop to observe the pod's creation:
> watch kubectl get pods -n jhipster

This will give us something similar to the following:

You will notice that we are running fewer items under the JHipster namespace since we are using Istio for service discovery, configurations, and monitoring. Once the pods are in Running status, we can visit the application URL, for example, http://store.jhipster.34.77.78.2.nip.io/, to see our application in action:

You can also visit Grafana and Kiali endpoints (log in using your username/password admin/admin) to see the metrics at their corresponding URLs, printed at the end of the application generation process by JHipster. Here is one of the Grafana dashboards:

Here is one of the Kiali graphs showing how services are connected:

For Jaeger, visit the URL printed for Zipkin as we reconfigured it to route to Jaeger:

This is showing traces for the store application. You can click on a trace to dig deeper.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.1.158