Saturday, May 5, 2018

JavaEE 8 Archetype for microservice Airhacks Adam Bien

JavaEE 8 Archetype is https://github.com/AdamBien/javaee8-essentials-archetype

it uses docker, so I will try it on Linux VM.

mvn archetype:generate -Dfilter=com.airhacks:javaee8-essentials-archetype

I enter: 1,2, org.pierre, pvmicroservice, Y

cd pvmicroservice/

mvn package
copy the war from target to wildfly deployment folder

http://localhost:8180/pvmicroservice/resources/ping

now open the Dockerfile, change glassfish into wildfly, anc change second line adding chown:
FROM airhacks/wildfly
COPY --chown=serveradmin:serveradmin ./target/pvmicroservice.war ${DEPLOYMENT_DIR}


mvn clean install && docker build -t airhacks/pvworkshops .
docker run -d --name workshops -p 8082:8080 airhacks/pvworkshops:latest
docker exec -u root -ti workshops bash
docker logs workshops


http://localhost:8082/pvmicroservice/resources/ping


docker rm -f workshops




It talks for a while about some patterns implemented by Eclipse Microprofile https://projects.eclipse.org/proposals/eclipse-microprofile

This is the Telemetry metrics project https://github.com/eclipse/microprofile-metrics




No comments: