Skip to content

Commit b2de994

Browse files
committed
Merge branch 'release/5.5'
2 parents c281c7f + 3f0f121 commit b2de994

File tree

64 files changed

+1003
-592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1003
-592
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_SERVER_ENCRYPT_KEY=my-very-secure-encrypt-key
2+
CONFIG_SERVER_USR=dev-usr
3+
CONFIG_SERVER_PWD=dev-pwd

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Springy Store μService --> Parent folder.
3131
|- authorization-server --> Authorization server
3232
|- edge-server --> API Gateway server
3333
|- eureka-server --> Service discovery server
34+
|- config-server --> Centralized Configuration server
3435
|-store-common
3536
|- store-api --> API Endpoint and services definitions for all microservices
3637
|- store-utils --> Common utilities shared between all components
@@ -66,7 +67,7 @@ The following topics are going to be covered in this 1st stage (other stages top
6667
- Adding automated tests of microservices in isolation.
6768
- Adding semi-automated tests to a microservice landscape.
6869

69-
### System Boundary - μServices Landscape (Release 5.0-Latest)
70+
### System Boundary - μServices Landscape (Release 5.5-Latest)
7071

7172
![System Boundary](docs/diagram/app_ms_landscape.png)
7273

@@ -114,7 +115,8 @@ To build and run the test cases for each service & shared modules in the project
114115

115116
> This done only for the first time or any new changes or versions of shared modules and POMs.
116117
117-
To build and install `store-build-chassis`, `store-utils`, `store-api`, `store-chassis` libraries, from the root folder `springy-store-microservices` run the following commands:
118+
To build and install `store-build-chassis`, `store-utils`, `store-api`, `store-services-chassis`, and `store-cloud-chassis` libraries, from the root folder `springy-store-microservices` run the
119+
following commands:
118120

119121
```bash
120122
mohamed.taman@DTLNV8 ~/springy-store-microservices
@@ -146,7 +148,7 @@ Woohoo, building & installing all project modules are finished successfully.
146148
The project is ready for the next step. :)
147149
```
148150
#### Second: Build & Test Microservices
149-
Now it is time to build our **4 microservices** and run each service integration test in
151+
Now it is the time to build our **4 microservices** and run each service integration test in
150152
isolation by running the following commands:
151153

152154
```bash
@@ -177,6 +179,7 @@ All build commands and test suite for each microservice should run successfully,
177179
[INFO] Eureka Discovery Server ............................ SUCCESS [ 6.536 s]
178180
[INFO] Edge Server ........................................ SUCCESS [ 32.108 s]
179181
[INFO] Authorization Server ............................... SUCCESS [ 1.616 s]
182+
[INFO] Configuration Server ............................... SUCCESS [ 1.216 s]
180183
[INFO] Springy Store Aggregator ........................... SUCCESS [ 0.100 s]
181184
[INFO] ------------------------------------------------------------------------
182185
[INFO] BUILD SUCCESS
@@ -200,6 +203,7 @@ All the **services**, **databases**, and **messaging service** will run in paral
200203
```bash
201204
Creating network "ssm_default" with the default driver
202205
Creating ssm_eureka_1 ... done
206+
Creating ssm_config-server_1 ... done
203207
Creating ssm_gateway_1 ... done
204208
Creating ssm_auth-server_1 ... done
205209
Creating ssm_mysql_1 ... done
@@ -330,6 +334,7 @@ Stopping ssm_mysql_1 ... done
330334
Stopping ssm_rabbitmq_1 ... done
331335
Stopping ssm_eureka_1 ... done
332336
Stopping ssm_gateway_1 ... done
337+
Stopping ssm_config-server_1 ... done
333338
Removing ssm_recommendation_1 ... done
334339
Removing ssm_product_1 ... done
335340
Removing ssm_review_1 ... done
@@ -340,6 +345,7 @@ Removing ssm_mysql_1 ... done
340345
Removing ssm_rabbitmq_1 ... done
341346
Removing ssm_eureka_1 ... done
342347
Removing ssm_gateway_1 ... done
348+
Removing ssm_config-server_1 ... done
343349
Removing network ssm_default
344350
```
345351
### The End
Lines changed: 38 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,36 @@
1-
spring:
2-
application.name: product
3-
data:
4-
mongodb:
5-
host: ${app.database.host}
6-
port: 27017
7-
database: product-db
8-
auto-index-creation: true
9-
10-
rabbitmq:
11-
host: ${app.messaging.rabbitmq.host}
12-
port: 5672
13-
username: guest
14-
password: guest
15-
16-
cloud:
17-
# As Spring Cloud Ribbon is in maintenance mode.
18-
# It is recommended switching to BlockingLoadBalancerClient instead.
19-
loadbalancer.ribbon.enabled: false
20-
21-
# Event-driven messages Stream config
22-
stream:
23-
defaultBinder: rabbit
24-
default.contentType: application/json
25-
bindings:
26-
input:
27-
destination: products
28-
group: productsGroup
29-
consumer:
30-
maxAttempts: 3
31-
backOffInitialInterval: 500
32-
backOffMaxInterval: 1000
33-
backOffMultiplier: 2.0
34-
rabbit:
35-
bindings:
36-
input.consumer:
37-
autoBindDlq: true
38-
republishToDlq: true
39-
kafka:
40-
bindings:
41-
input.consumer.enableDlq: true
42-
binder:
43-
brokers: ${app.messaging.kafka.broker}
44-
defaultBrokerPort: 9092
45-
1+
# Server configs
462
server:
47-
port: 9081
3+
## Should be included to show message, if not error message will be empty
484
error:
495
include-message: always
506
include-binding-errors: always
517

52-
logging.level:
53-
web: DEBUG
54-
root: INFO
55-
com.siriusxi.ms.store: DEBUG
56-
org:
57-
springframework.data.mongodb.core.MongoTemplate: DEBUG
58-
mongodb: debug
59-
60-
management:
61-
info.git:
62-
mode: full
63-
enabled: true
64-
endpoints.web.exposure.include: "*"
65-
endpoint:
66-
shutdown.enabled: true
67-
health.show-details: always
68-
8+
# Custom configurations
699
app:
7010
eureka:
7111
host: localhost
7212
user: mt
7313
pass: p
14+
# pass: '{cipher}a672bc1a5c86b877ade72bca188ac4b6d33e7a91c3b524cbd86c8f031d1344c8'
7415
database:
7516
host: localhost
7617
messaging:
7718
rabbitmq.host: 127.0.0.1
7819
kafka.broker: 127.0.0.1
7920

21+
spring:
22+
cloud:
23+
# As Spring Cloud Ribbon is in maintenance mode.
24+
# It is recommended switching to BlockingLoadBalancerClient instead.
25+
loadbalancer.ribbon.enabled: false
26+
# Massaging provider configurations
27+
rabbitmq:
28+
host: ${app.messaging.rabbitmq.host}
29+
port: 5672
30+
username: guest
31+
password: guest
32+
#password: '{cipher}702b8ae88ce0d606c42cd89dd20c43be1100951373416f5eb6f2ab57b0288665'
33+
8034
# Service discovery configs
8135
eureka:
8236
instance:
@@ -90,6 +44,26 @@ eureka:
9044
initial-instance-info-replication-interval-seconds: 5
9145
registry-fetch-interval-seconds: 5
9246

47+
ribbon:
48+
server-list-refresh-interval: 5000
49+
NF-load-balancer-ping-interval: 5
50+
51+
# Application health and information management
52+
management:
53+
info.git:
54+
mode: full
55+
enabled: true
56+
endpoints.web.exposure.include: "*"
57+
endpoint:
58+
shutdown.enabled: true
59+
health.show-details: always
60+
61+
logging.level:
62+
web: DEBUG
63+
root: INFO
64+
com.siriusxi.ms.store: DEBUG
65+
com.siriusxi.cloud.infra: DEBUG
66+
9367
# This is a docker specific profile properties
9468
# Also profiles could be separated in its owen file
9569
# with file name format of "application-docker.yaml"
@@ -98,13 +72,9 @@ spring:
9872
profiles: docker
9973
jmx.enabled: false
10074

101-
server.port: 8080
102-
10375
app:
10476
eureka:
10577
host: eureka
106-
database:
107-
host: mongodb
10878
messaging:
10979
rabbitmq.host: rabbitmq
110-
kafka.broker: kafka
80+
kafka.broker: kafka

config/repo/auth-server.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
server:
2+
port: 9999
Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,10 @@
1-
spring:
2-
application.name: eureka-server
3-
4-
# As Spring Cloud Ribbon is in maintenance mode.
5-
# It is recommended switching to BlockingLoadBalancerClient instead.
6-
cloud.loadbalancer.ribbon.enabled: false
7-
81
server:
92
port: 8761
10-
## Should be included to show message, if not error message will be empty
11-
error:
12-
include-message: always
13-
include-binding-errors: always
143

154
logging.level:
165
com.netflix:
17-
eureka: debug
18-
discovery: debug
19-
20-
# Define Security
21-
app:
22-
eureka:
23-
username: mt
24-
password: p
6+
eureka: DEBUG
7+
discovery: DEBUG
258

269
eureka:
2710
environment: Development
@@ -62,10 +45,4 @@ eureka:
6245
# The interval in which the instance eviction task scans for instances with expired leases.
6346
# Given in milliseconds.
6447
eviction-interval-timer-in-ms: 2000
65-
wait-time-in-ms-when-sync-empty: 0
66-
67-
management:
68-
endpoints.web.exposure.include: "*"
69-
info.git:
70-
enabled: true
71-
mode: full
48+
wait-time-in-ms-when-sync-empty: 0
Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
spring:
2-
application.name: gateway
32
security.oauth2.resourceserver.jwt:
43
jwk-set-uri: ${app.auth-server}
54
# As Spring Cloud Ribbon is in maintenance mode.
65
# It is recommended switching to BlockingLoadBalancerClient instead.
76
cloud:
8-
loadbalancer.ribbon.enabled: false
97
# Route definitions of the system
108
gateway:
119
discovery.locator.enabled: true
@@ -41,6 +39,13 @@ spring:
4139
predicates:
4240
- Path=/eureka/**
4341

42+
- id: config-server
43+
uri: http://${app.config-server.host}:${app.config-server.port}
44+
predicates:
45+
- Path=/config/**
46+
filters:
47+
- RewritePath=/config/(?<segment>.*), /$\{segment}
48+
4449
# Testing URLs
4550
- id: host_route_200
4651
uri: http://httpstat.us
@@ -72,46 +77,15 @@ server:
7277
key-store: classpath:keystore/test.p12
7378
key-store-password: testtest
7479
key-alias: localhost
75-
error:
76-
include-message: always
77-
include-binding-errors: always
7880

7981
# Define Security
8082
app:
8183
eureka:
82-
host: localhost
8384
port: 8761
84-
user: mt
85-
pass: p
8685
auth-server: http://localhost:9999/.well-known/jwks.json
8786

88-
eureka:
89-
instance:
90-
lease-renewal-interval-in-seconds: 5
91-
lease-expiration-duration-in-seconds: 5
92-
prefer-ip-address: true
93-
client:
94-
healthcheck.enabled: true
95-
service-Url:
96-
defaultZone: http://${app.eureka.user}:${app.eureka.pass}@${app.eureka.host}:${app.eureka.port}/eureka/
97-
initial-instance-info-replication-interval-seconds: 5
98-
registry-fetch-interval-seconds: 5
99-
100-
ribbon:
101-
server-list-refresh-interval: 5000
102-
NF-load-balancer-ping-interval: 5
103-
104-
management:
105-
info.git:
106-
enabled: true
107-
mode: full
108-
endpoint:
109-
health.show-details: "ALWAYS"
110-
endpoints:
111-
web.exposure.include: "*"
11287

11388
logging.level:
114-
root: INFO
11589
org.springframework.cloud.gateway: TRACE
11690
org.springframework.cloud.gateway.route.RouteDefinitionRouteLocator: INFO
11791
org.springframework.web.server.adapter.HttpWebHandlerAdapter: TRACE
@@ -120,14 +94,10 @@ logging.level:
12094
spring.profiles: docker
12195

12296
app:
123-
eureka:
124-
host: eureka
12597
auth-server: http://auth-server:9999/.well-known/jwks.json
12698

12799
---
128100
spring.profiles: external-OAuth-Provider
129101

130102
app:
131-
eureka:
132-
host: eureka
133103
auth-server: https://dev-taman.eu.auth0.com/.well-known/jwks.json

0 commit comments

Comments
 (0)