Fight Microservice
Last updated
Last updated
Open the Web Terminal. Then run this command to clone Git repository to local.
Notice that the URL is internal DNS! Yes, there is a Git server (Gitea) running in the same cluster but different project.
Run this command to go into the Fight microservice project directory.
Run this command to build and deploy microservice to OpenShift cluster.
Yes!, you don't have to write Dockerfile, build container image, push the image to container registry e.g. Docker Hub, Quay.io, then deploy the container image to OpenShift cluster step by step. With one command you can get all of these done! Thank you Quarkus ecosystem
Wait until the build success. Then go to Builds menu, you should see a new rest-fights BuildConfigs for OpenShift Build (Binary).
What happens behind the scene is that when you run Maven build in local, Quarkus Maven plugin (plus a bunch of configurations) talks to OpenShift to create required resources for your service i.e. ConfigMap, Secret, Deployment etc. including the BuildConfigs as well. When code build in local is done, the plugin will upload artefacts a.k.a binaries e.g. jar, war, libraries to OpenShift and after that the OpenShift Build kicks off the container image build and deploy.
Click on the rest-fights BuildConfigs to see build logs.
Go to Builds tab, you should see the build task.
Now go back to Topology menu. You'll be more surprised. The microservice has been deployed as well as visual connectors (arrow lines) by just using Maven command. This is the magic of Quarkus!
How to deploy microservice using Maven command.
How to check OpenShift Build logs.
Magic of Quarkus framework! (well, you didn't learn anything but you saw it, right? )