The application consists of several Microservices and a Web-Application managing a conference :
-
microservice-schedule
: Schedule of the conference -
microservice-session
: Sessions of the conference -
microservice-speaker
: Speakers of the conference -
microservice-vote
: Votes for each session -
web-application
: Frontend Angular2 | Bootstrap4
The WebApp is a direct subscriber to the individual Microservices. This means that there is no aggregator / middle-man application. The WebApp itself provides a known relative EndPoint microservice that enables the lookup of URLs to the other services.
If you would like to participate in the community effort to advance EE then by all means feel free to join us on the following sites:
Microprofile.io - The community landing site.
Google+ Microprofile groups - Public discussion lists (We do not have private lists).
Kanban board - A nice Kanban integration for our GitHub issues.
All source code - Apache Licence V2 project OSS code.
This will run each service in the runtime container that its setup for and the UI in a Node.js server to interact with them.
Build, package and run all microservices and the UI:
mvn clean package -P start,ui
or use profile that includes microservices implemented with KumuluzEE:
mvn clean package -P start-kumuluzee,ui
Run just the microservices:
mvn package -Pstart -pl :microservice-start
or use profile that includes microservices implemented with KumuluzEE:
mvn package -Pstart-kumuluzee -pl :microservice-start
Run just the UI:
mvn package -Pui -pl :microservice-start
mvn clean install -DskipTests
-
Build the projects using Maven (
mvn clean install
) or (mvn -fn clean install
) to skip over failed tests. -
To get the technical documentation, just
mvn clean generate-resources
under thedocs
directory. You will find a PDF and HTML version of the documentation underdocs/target/generated-docs
Each service can run on any container (this is the Microprofile guarantee), but the service projects have been written by vendors to use their container.
The following sections describe vendor specifics:
The Schedule service is provided using a special microprofile release of Payara Micro which can be downloaded from Maven Central
Build and run the service When building the service Payara Microprofile packages both the war file and the microprofile runtime into a single UberJar for convenience.
cd microservice-schedule
mvn clean package
java -jar target\microservice-schedule.jar --port 6060
Port Bindings By default the microservice would bind to port 8080, if this is not available it will bind to the next available port e.g. 8081. Specifying the port using --port as a command line option overrides this.
To verify that the schedule microservice is running, use the following link: http://localhost:6060/schedule/all
To see a full set options run the jar with the --help command line option or see the Payara Micro Documentation for a full list of options.
Provided using KumuluzEE 2.4.1
Build and run the service
cd microservice-schedule-kumuluzee
mvn clean package
java [-D<OPTION>] -jar target/microservice-schedule-kumuluzee.jar
Address & Port Bindings
Flag | Description | Default |
---|---|---|
kumuluzee.server.http.address=<address> |
HTTP bind interface |
0.0.0.0 |
kumuluzee.server.http.port=<port> |
HTTP port |
8080 |
For example, if you want to change the HTTP port to 6060, run the application like this:
java -Dkumuluzee.server.http.port=6060 -jar target/microservice-schedule-kumuluzee.jar
Click on this link to verify that everything ran fine: http://localhost:6060/schedule/all
Provided using WildFly Swarm
Build and run the service
cd microservice-session
mvn clean package
java -jar target/microservice-session-swarm.jar [-D<OPTION>]
Address & Port Bindings
Flag | Description | Default |
---|---|---|
swarm.bind.address=<address> |
Interface to bind servers |
0.0.0.0 |
swarm.http.port=<port> |
Sets the port for the HTTP server |
8080 |
swarm.port.offset=<offset> |
Sets a global port adjustment |
0 |
For example, if you want to change the HTTP port to 5050, run the application like this:
java -jar target/microservice-session-swarm.jar -Dswarm.http.port=5050
Click on this link to verify that everything ran fine: http://localhost:5050/sessions
For a full set of configuration options please see the Wildfly Swarm Userguide
Provided using Apache TomEE 7.x
Build and run the service
cd microservice-speaker
mvn clean package
java -jar target/microservice-speaker-exec.jar
If you look at the output, you will find messages like the following:
INFO - REST Application: http://localhost:4040/speaker -> io.microprofile.showcase.speaker.rest.Application@68cda174 INFO - Service URI: http://localhost:4040/speaker/ -> Pojo io.microprofile.showcase.speaker.rest.ResourceSpeaker INFO - DELETE http://localhost:4040/speaker/remove/{id} -> void remove(String)
There you can see the URLs of the endpoints exposed by TomEE for your application.
To verify that everything worked fine, you can try to access http://localhost:4040/speaker
Provided using KumuluzEE 2.4.1
Build and run the service
cd microservice-speaker-kumuluzee
mvn clean package
java [-D<OPTION>] -jar target/microservice-schedule-kumuluzee.jar
Address & Port Bindings
Flag | Description | Default |
---|---|---|
kumuluzee.server.http.address=<address> |
HTTP bind interface |
0.0.0.0 |
kumuluzee.server.http.port=<port> |
HTTP port |
8080 |
For example, if you want to change the HTTP port to 4040, run the application like this:
java -Dkumuluzee.server.http.port=4040 -jar target/microservice-speaker-kumuluzee.jar
Click on this link to verify that everything ran fine: http://localhost:4040/speaker
Provided using WebSphere Liberty
Build and run the service
cd microservice-vote
mvn package
java -jar target/microservice-vote.jar
Access the app at http://localhost:7070/vote
Port Bindings By default the microservice will start on port 7070. To set it to a different port use the following Maven properties:
-DtestServerHttpPort=9080 -DtestServerHttpsPort=9443
Note: if you run the package command with the 'liberty' profile the jar file will be called microservice-vote-liberty.jar.
This starts the UI app and all services running in an embedded container. The landing page is http://localhost:8080
mvn clean package tomee:run -pl :web-application -DskipTests
This starts a gulp task that monitors and updates changes to the static resources.
$ cd web-application $ mvn frontend:gulp
Open a browser at http://localhost:8080/
The web-application project uses the com.github.eirslett:frontend-maven-plugin to download and install all node and npm requirements. Sometimes this may fail if console permissions are not permissive enough.
In such cases you will have to manually install some reqiurements:
-
Download and install node: https://nodejs.org/en/download/current/
-
Install npm manually:
cd web-application/src/main/static npm install npm npm install typings --global typings install --global