Code Monkey home page Code Monkey logo

cnd_quarkus_experienced_labs's Introduction

Cloud Native Development with Quarkus - Experienced - Labs

This repository contains the Cloud Native Development with Quarkus - Experienced lab exercises.

mvn quarkus:add-extension -Dextensions="health"

mvn clean quarkus:dev -DskipTests

http://localhost:8080

curl http://localhost:8080/health/ready

{
    "status": "UP",
    "checks": [
        {
            "name": "Simple health check",
            "status": "UP"
        }
    ]
}

curl -i http://localhost:8080/health/live

{
    "status": "DOWN",
    "checks": [
        {
            "name": "Health check with data",
            "status": "UP",
            "data": {
                "bar": "barValue",
                "foo": "fooValue"
            }
        },
        {
            "name": "Database connection health check",
            "status": "DOWN",
            "data": {
                "error": "Cannot contact database"
            }
        }
    ]
}

application.properties database.up=true

curl -i http://localhost:8080/health/live

{
    "status": "UP",
    "checks": [
        {
            "name": "Database connection health check",
            "status": "UP"
        },
        {
            "name": "Health check with data",
            "status": "UP",
            "data": {
                "bar": "barValue",
                "foo": "fooValue"
            }
        }
    ]
}

mvn clean quarkus:dev -DskipTests curl http://localhost:8080/hello

mvn clean test

mvn quarkus:generate-config

Build Executable JAR

mvn clean package ls -1 target/.jar java -Dquarkus.http.port=8081 -jar target/-runner.jar

redeploy

mvn clean package -DskipTests oc start-build people --from-file target/*-runner.jar --follow oc rollout status -w dc/people

PEOPLE_ROUTE_URL=$(oc get route people -o=template --template='{{.spec.host}}') curl http://${PEOPLE_ROUTE_URL}/person/birth/before/2000

echo; echo "http://${PEOPLE_ROUTE_URL}/datatable.html" ; echo

Event driven

mvn quarkus:add-extension -Dextensions="vertx" mvn clean quarkus:dev curl -i -X POST http://localhost:8080/person/joe curl http://localhost:8080/person/name/joe

OpenTracing

mvn quarkus:add-extension -Dextensions="opentracing, rest-client" mvn clean package -DskipTests oc start-build people --from-file target/*-runner.jar --follow oc rollout status -w dc/people PEOPLE_ROUTE_URL=$(oc get route people -o=template --template='{{.spec.host}}') echo ; echo http://${PEOPLE_ROUTE_URL}/datatable.html ; echo

JAEGER_ROUTE_URL=$(oc get route jaeger -o=template --template='{{.spec.host}}') echo; echo https://${JAEGER_ROUTE_URL} ; echo

StarWars API

curl https://swapi.dev/api/people/1/ mvn clean package -DskipTests oc start-build people --from-file target/*-runner.jar --follow oc rollout status -w dc/people PEOPLE_ROUTE_URL=$(oc get route people -o=template --template='{{.spec.host}}') curl http://${PEOPLE_ROUTE_URL}/person/swpeople

cnd_quarkus_experienced_labs's People

Contributors

darbyredhat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.