Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ineat/quarkus-thermo-central
https://github.com/ineat/quarkus-thermo-central
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ineat/quarkus-thermo-central
- Owner: ineat
- Created: 2019-11-24T13:39:17.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-24T13:43:16.000Z (about 5 years ago)
- Last Synced: 2024-11-07T11:44:25.586Z (about 2 months ago)
- Language: Java
- Size: 16.6 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# Requierements
Before start working on this project, you need install [Consul](https://www.consul.io/) and [Mosquitto](https://mosquitto.org/).
## Init stack manually with Docker
### Consul```
docker run -d -p 8500:8500 consul agent -dev -client=0.0.0.0 -bind=0.0.0.0
```### Mosquitto
```
docker run -d -p 1883:1883 -p 9001:9001 eclipse-mosquitto
```## Init stack automatically with Compose
In project root launch :```
docker-compose up
```## Init Consul configuration
After Consul container has been launched, add a new config named __"topics"__ in __key/value__ page. Add the following content to this new config :
```json
{
"ilab" : {
"thermal" : ["sensor1", "sensor2", "sensor4"],
"particule" : []
},
"cds" : {}
}
```# Run application
## Development mode
### Simulate sensor data
In development mode you can "simulate" sensor data with :
```
python mosquitto-sender.py sensor1
```Random value between 20 and 40 will be sent periodically in Mosquitto on "thermal/sensor1" topic.
### Launch the Quarkus application
Application can be launch with this command :
```
mvn compile quarkus:dev
```After it's started, go to http://localhost:8080/thermal/stream to show sensors values (refresh dynamically).