T277 Readme markdown updated
This commit is contained in:
40
README.md
40
README.md
@@ -1,7 +1,7 @@
|
||||
# R11-Klaus
|
||||
Mockup service for middleware testing.
|
||||
|
||||
[](https://travis-ci.com/Szakalakamaka/Klaus)
|
||||
[comment]: <> ([](https://travis-ci.com/Szakalakamaka/Klaus))
|
||||
|
||||
Available scripts:
|
||||
|
||||
@@ -17,9 +17,17 @@ your local machine with default values localhost 6379.
|
||||
You can also run the application via Docker.
|
||||
#### docker-compose up --build -d
|
||||
|
||||
However, you need either to run it with Spring Cloud Config application or override property value
|
||||
from redis.host = localhost to redis.host = redis. Where value "redis" will be treated as a DB service address and used
|
||||
for connection between docker images.
|
||||
However, you need either to run it with Docker-compose ensuring that all containers are within a network or start application locally.
|
||||
In order to change environment two properties must be changed.
|
||||
|
||||
1) data-access.properties - property redis.host
|
||||
2) logback.xml - configuration/appender/host element value
|
||||
|
||||
If application is to be run locally, both of above should be set to "localhost"
|
||||
If application is to be run in docker environment, both should be set to name of a redis container (by default "redis")
|
||||
|
||||
Docker automaticly translates container name to IP address, considering all containers are within same network.
|
||||
Try to avoid using any symbols in names of containers, because it may cause that URL exception to be thrown. Instead use letters only.
|
||||
|
||||
### Operations on Redis DB
|
||||
|
||||
@@ -42,23 +50,32 @@ Display elements from hashSet.
|
||||
Logs can be found in lists with names logstash_yyyy-mm-dd.
|
||||
|
||||
### Deployment and building with docker and jenkins
|
||||
For creating docker context (feature available from docker version 19.03):
|
||||
For creating docker context (feature available from docker version 19.03) run the command
|
||||
#### docker context create
|
||||
as shown by examples below.
|
||||
|
||||
```
|
||||
docker context create DEV \
|
||||
--description "context for DEV environment" \
|
||||
--docker "host=ssh://jenkins@s5000xvn:22"
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
docker context create PROD \
|
||||
--description "connection to PROD environment" \
|
||||
--docker "host=ssh://jenkins@server361209.nazwa.pl:22"
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
docker context create PROD \
|
||||
--description "context for PROD environment" \
|
||||
--docker "host=ssh://jenkins@server361209:22"
|
||||
```
|
||||
|
||||
However it is highly adviseable to deploy service via Jenkins tool at jenkins.zipper.release11.com, where contexts have been already configured.
|
||||
|
||||
#### docker-compose up -d --build
|
||||
Builds and launches Redis service and the application. Performs unit testing on the code and run the application.
|
||||
Builds and launches Redis service and the application. Performs unit testing on the code and run the applicationon on localhost.
|
||||
|
||||
#### docker-compose --context DEV up --build -d
|
||||
The same as above, but the application will be deployed on the server defined via docker context as DEV.
|
||||
@@ -66,11 +83,8 @@ The same as above, but the application will be deployed on the server defined vi
|
||||
#### docker-compose --context PROD up --build -d
|
||||
The same as above, but the application will be deployed on the server defined via docker context as PROD.
|
||||
|
||||
The application can be started on a local machine without environment support. However, for application supervising and
|
||||
updating configuration on deployment spring cloud applications should be deployed before. In order:
|
||||
- Spring Cloud Eureka
|
||||
- Spring Cloud Configuration
|
||||
- MockedServices
|
||||
The application can be started on a local machine without environment support.
|
||||
|
||||
Once a docker image repository will be availabe, the proper deployment order should be under control by docker-compose script
|
||||
which should check if the applications are present and if not deploy stable images of Spring Cloud applications from
|
||||
docker image repo.
|
||||
|
||||
Reference in New Issue
Block a user