Mercurial > hg > thermostat-ng > web-gateway
changeset 159:e0c80817fd11
Update README.md
Reviewed-by: jerboaa
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-May/023258.html
author | Jie Kang <jkang@redhat.com> |
---|---|
date | Wed, 24 May 2017 10:46:40 -0400 |
parents | c0199757fe20 |
children | bd282001a37d |
files | README.md |
diffstat | 1 files changed, 15 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/README.md Wed May 17 19:39:08 2017 +0200 +++ b/README.md Wed May 24 10:46:40 2017 -0400 @@ -1,17 +1,6 @@ -# Thermostat Web Gateway - Microservices Branch - -This is a Microservice-Architecture prototype for Thermostat Web Gateway. +# Thermostat Web Gateway -* common: Contains packages used by other modules -* distribution: Contains build assembly and default configuration files to create runnable program -* server: Contains CoreServer to handle deploying microservices -* services: Contains microservices deployable via server:CoreServer, or any Servlet supporting server such as Wildfly, Jetty, Glassfish or Tomcat -* services/jvm-gc: Contains microservice for accessing jvm-gc data from Mongodb backend -* services/jvm-memory: Contains microservice for accessing jvm-memory data from Mongodb backend -* services/commands: Contains microservice for a Command Channel - -* thermostat-mongodb: Contains standalone Web Gateway to interface with Thermostat data placed in Mongodb - +This is a HTTP API server for [Thermostat](http://icedtea.classpath.org/thermostat). # Build Dependencies @@ -21,47 +10,39 @@ # Runtime Dependencies * JRE 7+ -* Mongodb -* Thermostat +* Mongodb 3.x+ -# How to use - -To build: +# How to Build ``` $ mvn clean verify ``` -To run: +# How to Run + +## How to Start ``` +$ ./distribution/target/image/bin/thermostat-mongodb.sh start $ ./distribution/target/image/bin/thermostat-web-gateway.sh ``` -The jvm-memory and jvm-gc services expect mongodb to be running with db 'thermostat', username 'mongodevuser' and password 'mongodevpassword'. +This will run the Web Gateway with default configuration, listening on http://127.0.0.1:30000 -This can be setup with Thermostat: +## How to Stop -In thermostat installation ./bin folder: +`Ctrl-C` to stop `thermostat-web-gateway.sh` ``` -$ ./thermostat-devsetup -$ ./thermostat web-storage-service +$ ./distribution/target/image/bin/thermostat-mongodb.sh stop ``` -Try: +# API: -``` -$ curl http://localhost:30000/jvm-memory/0.0.1 -$ curl http://localhost:30000/jvm-gc/0.0.1 -``` +For API see the Swagger YAML specifications in `./services/*/src/main/resources` -For API see: - -``` -services/*/*-swagger.json -``` +Alternatively, visit the Swagger UI hosted by the Web Gateway at `http://127.0.0.1:30000/doc/index.html` and load specifications provided by the services. For example: `http://127.0.0.1:30000/doc/index.html?url=http://127.0.0.1:30000/jvm-gc/0.0.2/doc/jvm-gc-swagger.yaml` # How to debug after building