Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pashashiz/tci-demo
https://github.com/pashashiz/tci-demo
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/pashashiz/tci-demo
- Owner: pashashiz
- Created: 2016-01-14T21:26:29.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-15T01:42:34.000Z (almost 9 years ago)
- Last Synced: 2024-04-17T22:56:59.469Z (7 months ago)
- Language: Java
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Demo of the microservice architecture for TCI
### How to deploy
There are three way to run microservices:
1. Use executable jar (war) applications
2. Use traditional deployment to application server
3. Use docker containers##### Using executable jar
To run microcervices this way, just do `mvn clean package` and run each jar file.
Each service has default port, and if we need to run the second node of the already running application on port `8080`
we should pass command line argument with new port number: `--service.port=8081`##### Using traditional deployment
To prepare war files just run `mvn clean package -P war`. After we can deploy that war file as usual.
But there are two environment variables we need to specify for our application server:
- Address of our registration and discovery service (service-registry) `eureka.client.serviceUrl.defaultZone`
(example: `eureka.client.serviceUrl.defaultZone=http://localhost:8080/service-registry/eureka/`)
- Current port `server.port` (example: `server.port=1010`). This is workaround related with spring boot and will be fixed later.Full example:
```
set JAVA_OPTS=-Dserver.port=8080 -Deureka.client.serviceUrl.defaultZone=http://localhost:8080/service-registry/eureka/
```##### Using docker containers
// TODO
### How to test
To ask `dummy-tcm` service for document, just sent request to `gateway` service with `dummy-tcm` service name and URI, for example:
```
curl http://localhost:8080/gateway/dummy-tcm/document
```Useful links (in case `service-registry` is deployed at `http://localhost:8080`):
- To check registered services go to `http://localhost:8080/service-registry`
- To get services detail information go to `http://localhost:8080/service-registry/eureka/apps`