- update README.md
- updating Jenkinsfile-PROD
This commit is contained in:
62
README.md
62
README.md
@@ -1,15 +1,32 @@
|
||||
# R11-Klaus
|
||||
Mockup service for middleware testing
|
||||
Mockup service for middleware testing.
|
||||
|
||||
[](https://travis-ci.com/Szakalakamaka/Klaus)
|
||||
|
||||
Available scripts:
|
||||
|
||||
#### docker-compose up -d --build
|
||||
Builds and launches Redis service and the application. Performs unit testing on the code and run the application.
|
||||
### Running the application on a local machine
|
||||
For Intellij:
|
||||
Plugins:
|
||||
settings -> plugins -> install lombok plugin
|
||||
settings -> annotation processors -> enable annotation processing
|
||||
|
||||
A connection to a Redis database is expected to run the application successfully. You need to download and run Redis DB on
|
||||
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.
|
||||
|
||||
### Operations on Redis DB
|
||||
|
||||
Use Redis CLI or attach to Redis docker image in order to manually operate on DB.
|
||||
|
||||
#### docker exec -it mockedservices_redis-server redis-cli
|
||||
Attach to the running local redis server and open a redis client.
|
||||
Attach to redis server image and open a redis client.
|
||||
|
||||
Useful redis-cli commands:
|
||||
###### KEYS *
|
||||
@@ -24,8 +41,39 @@ Display list length.
|
||||
Display elements from hashSet.
|
||||
Logs can be found in lists with names logstash_yyyy-mm-dd.
|
||||
|
||||
Plugins:
|
||||
### Deployment and building with docker and jenkins
|
||||
For creating docker context (feature available from docker version 19.03):
|
||||
|
||||
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"
|
||||
|
||||
#### docker-compose up -d --build
|
||||
Builds and launches Redis service and the application. Performs unit testing on the code and run the application.
|
||||
|
||||
#### 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.
|
||||
|
||||
#### 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
|
||||
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.
|
||||
|
||||
|
||||
settings -> plugins -> install lombok plugin
|
||||
|
||||
settings -> annotation processors -> enable annotation processing
|
||||
Reference in New Issue
Block a user