This is a demo application built with MicroProfile and currently running setup to run on OpenLiberty. It will return a combination of a random adjective and a noun.
The generation of the executable jar file can be performed by issuing the following command:
mvn clean package
This will create an executable jar file `randomstrings.jar within the target maven folder. This can be started by executing the following command:
java -jar target/randomstrings.jar
To launch the test page, open your browser at the following URL
http://localhost:9080/index.html
See the website for more information on MicroProfile.
Configuration of your application parameters (specification).
The example class RandomStringsSupplier
shows you how to configure and define default values for variables.
The health status can be used to determine if the 'computing node' needs to be discarded/restarted or not (specification).
The class ServiceHealthCheck
contains an example of a custom check which can be integrated to health status checks of the instance. The index page contains a link to the status data.
The Metrics exports Telemetric data in a uniform way of system and custom resources (specification).
The class RandomStringsController
contains an example how you can measure the execution time of a request. The index page also contains a link to the metric page (with all metric info).
Exposes the information about your endpoints in the format of the OpenAPI v3 specification (docs).
The index page contains a link to the OpenAPI information of the available endpoints for this project.
Make sure to have a file named exactly Dockerfile in the root folder of the project. This is the one Google Cloud Build will be using.
gcloud builds submit --tag gcr.io/{your project name}/randomstrings gcloud run deploy --image gcr.io/{your project name}/randomstrings --platform managed