Vitals - ES 2017/2018
Project for ES (Engenharia de Software) course of MIECT, at DETI-UA (University of Aveiro).
This project goal is to put in practise what we've learned throughout the course (Java EE, Microservices, etc). In our group's case, we wanted to build a system to gather and display a Heart Rate Sensor of a person, using the technologies learned. Through the course it's advised to use certain technologies, but we can still opt and have freedom to use what we want to do it. Java EE based backend, with Apache Kafka broker serving as a message handler with a dashboard to provide live (from the broker) and historic values (from the database) to the user. This combined with Continuous Integration / Deployment also with a Logging stack. To run it's asked to have Docker containers that will run all services.
- Cristiano Vagos
- Diogo Candeias
- Pedro Raimundo
- Jorge Silva
A Spring Boot application serving as backend, with data stored using Java Persistence (Hibernate) that exposes a REST API that will be consumed by a React JS frontend.
The data is produced using a Apache Kafka broker that will provide live values (simulating our HR sensor) to the frontend. Periodically we store that values on our database that can be accessed also on the frontend. The Continous Integration / Deployment is done using Jenkins, and we use a ELK (Elasticsearch, Logstash, Kibana) stack.
How to run
Install Docker, Docker Compose, node and npm.
Set up vm.max_map_count to 262144 to avoid Elasticsearch errors.
Start Docker daemon.
Go to vitals folder and build the docker compose and then bring it up to start up all services.
$ sudo sysctl -w vm.max_map_count=262144 $ sudo dockerd $ cd vitals $ docker-compose build $ docker-compose up
For exiting, just type Ctrl+C to stop all services.
To enter detached mode:
$ docker-compose up -d
To see Docker containers in execution:
$ docker ps
If build successful, you then can access to each service by going through each port:
- Vitals API - Vitals application (Spring Boot)
- Vitals Dashboard - Vitals dashboard that will consume the API (React)
- Jenkins - Jenkins (for Continuous Integration / Deployment)
- Kibana - Kibana (view logs and data from Logstash with search capabilities from Elasticsearch)
- Vitals App and API: 8090
- Vitals Dashboard: 3000
- Apache Kafka: 9092
- Apache Zookeeper: 2181
- Jenkins: 8080 / 50000
- Elasticsearch: 9200 / 9300
- Logstash: 5000
- Kibana: 5601