Skip to content

Commit 572100c

Browse files
committed
manifests application
1 parent b0d41f9 commit 572100c

File tree

9 files changed

+343
-2
lines changed

9 files changed

+343
-2
lines changed

inventory-service/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
image: mysql:latest
44
container_name: mysql_inventory
55
ports:
6-
- "3316:3306"
6+
- "3306:3306"
77
environment:
88
MYSQL_ROOT_PASSWORD: mysql
99
volumes:

inventory-service/src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
spring.application.name=inventory-service
2-
spring.datasource.url=jdbc:mysql://localhost:3316/inventory_service
2+
spring.datasource.url=jdbc:mysql://localhost:3306/inventory_service
33
spring.datasource.username=root
44
spring.datasource.password=mysql
55
spring.jpa.hibernate.ddl-auto=none
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: api-gateway
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: api-gateway
10+
template:
11+
metadata:
12+
labels:
13+
app: api-gateway
14+
spec:
15+
containers:
16+
- name: api-gateway
17+
image: nipundas10/new-api-gateway:latest
18+
ports:
19+
- containerPort: 9000
20+
env:
21+
- name: SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI
22+
valueFrom:
23+
configMapKeyRef:
24+
key: SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI
25+
name: api-gateway-config
26+
- name: LOKI_URL
27+
valueFrom:
28+
configMapKeyRef:
29+
key: LOKI_URL
30+
name: common-config
31+
- name: MANAGEMENT_ZIPKIN_TRACING_ENDPOINT
32+
valueFrom:
33+
configMapKeyRef:
34+
key: MANAGEMENT_ZIPKIN_TRACING_ENDPOINT
35+
name: common-config
36+
- name: PRODUCT_SERVICE_URL
37+
valueFrom:
38+
configMapKeyRef:
39+
key: PRODUCT_SERVICE_URL
40+
name: common-config
41+
- name: ORDER_SERVICE_URL
42+
valueFrom:
43+
configMapKeyRef:
44+
key: ORDER_SERVICE_URL
45+
name: common-config
46+
- name: INVENTORY_SERVICE_URL
47+
valueFrom:
48+
configMapKeyRef:
49+
key: INVENTORY_SERVICE_URL
50+
name: common-config
51+
---
52+
apiVersion: v1
53+
kind: Service
54+
metadata:
55+
name: api-gateway
56+
spec:
57+
selector:
58+
app: api-gateway
59+
ports:
60+
- protocol: TCP
61+
port: 9000
62+
targetPort: 9000
63+
---
64+
apiVersion: v1
65+
kind: ConfigMap
66+
metadata:
67+
name: api-gateway-config
68+
data:
69+
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI: "http://keycloak.default.svc.cluster.local:8080/realms/spring-microservices-security-realm"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: common-config
6+
data:
7+
LOKI_URL: "http://loki.default.svc.cluster.local:3100/loki/api/v1/push"
8+
MANAGEMENT_ZIPKIN_TRACING_ENDPOINT: "http://tempo.default.svc.cluster.local:9411"
9+
PRODUCT_SERVICE_URL: "http://product-service.default.svc.cluster.local:8080"
10+
ORDER_SERVICE_URL: "http://order-service.default.svc.cluster.local:8081"
11+
INVENTORY_SERVICE_URL: "http://inventory-service.default.svc.cluster.local:8082"
12+
SPRING_KAFKA_BOOTSTRAP-SERVERS: "broker.default.svc.cluster.local:29092"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: frontend
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: frontend
10+
template:
11+
metadata:
12+
labels:
13+
app: frontend
14+
spec:
15+
containers:
16+
- name: frontend
17+
image: nipundas10/microservices-frontend:latest
18+
ports:
19+
- containerPort: 4200
20+
---
21+
apiVersion: v1
22+
kind: Service
23+
metadata:
24+
name: frontend
25+
spec:
26+
selector:
27+
app: frontend
28+
ports:
29+
- protocol: TCP
30+
port: 4200
31+
targetPort: 4200
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: inventory-service
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: inventory-service
10+
template:
11+
metadata:
12+
labels:
13+
app: inventory-service
14+
spec:
15+
containers:
16+
- name: inventory-service
17+
image: nipundas10/new-inventory-service:latest
18+
env:
19+
- name: SPRING_DATASOURCE_URL
20+
valueFrom:
21+
configMapKeyRef:
22+
key: SPRING_DATASOURCE_URL
23+
name: inventory-service-config
24+
- name: LOKI_URL
25+
valueFrom:
26+
configMapKeyRef:
27+
key: LOKI_URL
28+
name: common-config
29+
- name: MANAGEMENT_ZIPKIN_TRACING_ENDPOINT
30+
valueFrom:
31+
configMapKeyRef:
32+
key: MANAGEMENT_ZIPKIN_TRACING_ENDPOINT
33+
name: common-config
34+
---
35+
apiVersion: v1
36+
kind: Service
37+
metadata:
38+
name: inventory-service
39+
spec:
40+
selector:
41+
app: inventory-service
42+
ports:
43+
- protocol: TCP
44+
port: 8082
45+
targetPort: 8082
46+
---
47+
apiVersion: v1
48+
kind: ConfigMap
49+
metadata:
50+
name: inventory-service-config
51+
data:
52+
SPRING_DATASOURCE_URL: "jdbc:mysql://mysql.default.svc.cluster.local:3306/inventory_service"
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: notification-service
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: notification-service
10+
template:
11+
metadata:
12+
labels:
13+
app: notification-service
14+
spec:
15+
containers:
16+
- name: notification-service
17+
image: nipundas10/new-notification-service:latest
18+
env:
19+
- name: SPRING_KAFKA_BOOTSTRAP-SERVERS
20+
valueFrom:
21+
configMapKeyRef:
22+
key: SPRING_KAFKA_BOOTSTRAP-SERVERS
23+
name: common-config
24+
- name: SPRING_KAFKA_CONSUMER_PROPERTIES_SCHEMA_REGISTRY_URL
25+
valueFrom:
26+
configMapKeyRef:
27+
key: SPRING_KAFKA_CONSUMER_PROPERTIES_SCHEMA_REGISTRY_URL
28+
name: notification-service-config
29+
- name: LOKI_URL
30+
valueFrom:
31+
configMapKeyRef:
32+
key: LOKI_URL
33+
name: common-config
34+
- name: MANAGEMENT_ZIPKIN_TRACING_ENDPOINT
35+
valueFrom:
36+
configMapKeyRef:
37+
key: MANAGEMENT_ZIPKIN_TRACING_ENDPOINT
38+
name: common-config
39+
---
40+
apiVersion: v1
41+
kind: Service
42+
metadata:
43+
name: notification-service
44+
spec:
45+
selector:
46+
app: notification-service
47+
ports:
48+
- protocol: TCP
49+
port: 8087
50+
targetPort: 8087
51+
---
52+
apiVersion: v1
53+
kind: ConfigMap
54+
metadata:
55+
name: notification-service-config
56+
data:
57+
SPRING_KAFKA_CONSUMER_PROPERTIES_SCHEMA_REGISTRY_URL: "http://schema-registry.default.svc.cluster.local:8081"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: order-service
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: order-service
10+
template:
11+
metadata:
12+
labels:
13+
app: order-service
14+
spec:
15+
containers:
16+
- name: order-service
17+
image: nipundas10/new-order-service:latest
18+
env:
19+
- name: SPRING_KAFKA_BOOTSTRAP-SERVERS
20+
valueFrom:
21+
configMapKeyRef:
22+
key: SPRING_KAFKA_BOOTSTRAP-SERVERS
23+
name: common-config
24+
- name: SPRING_DATASOURCE_URL
25+
valueFrom:
26+
configMapKeyRef:
27+
key: SPRING_DATASOURCE_URL
28+
name: order-service-config
29+
- name: LOKI_URL
30+
valueFrom:
31+
configMapKeyRef:
32+
key: LOKI_URL
33+
name: common-config
34+
- name: MANAGEMENT_ZIPKIN_TRACING_ENDPOINT
35+
valueFrom:
36+
configMapKeyRef:
37+
key: MANAGEMENT_ZIPKIN_TRACING_ENDPOINT
38+
name: common-config
39+
- name: INVENTORY_SERVICE_URL
40+
valueFrom:
41+
configMapKeyRef:
42+
key: INVENTORY_SERVICE_URL
43+
name: common-config
44+
- name: SPRING_KAFKA_PRODUCER_PROPERTIES_SCHEMA_REGISTRY_URL
45+
valueFrom:
46+
configMapKeyRef:
47+
key: SPRING_KAFKA_PRODUCER_PROPERTIES_SCHEMA_REGISTRY_URL
48+
name: order-service-config
49+
---
50+
apiVersion: v1
51+
kind: Service
52+
metadata:
53+
name: order-service
54+
spec:
55+
selector:
56+
app: order-service
57+
ports:
58+
- protocol: TCP
59+
port: 8081
60+
targetPort: 8081
61+
---
62+
apiVersion: v1
63+
kind: ConfigMap
64+
metadata:
65+
name: order-service-config
66+
data:
67+
SPRING_DATASOURCE_URL: "jdbc:mysql://mysql.default.svc.cluster.local:3306/order_service"
68+
SPRING_KAFKA_PRODUCER_PROPERTIES_SCHEMA_REGISTRY_URL: "http://schema-registry.default.svc.cluster.local:8081"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: product-service
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: product-service
10+
template:
11+
metadata:
12+
labels:
13+
app: product-service
14+
spec:
15+
containers:
16+
- name: product-service
17+
image: nipundas10/new-product-service:latest
18+
env:
19+
- name: SPRING_DATA_MONGODB_URI
20+
valueFrom:
21+
configMapKeyRef:
22+
key: SPRING_DATA_MONGODB_URI
23+
name: product-service-config
24+
- name: LOKI_URL
25+
valueFrom:
26+
configMapKeyRef:
27+
key: LOKI_URL
28+
name: common-config
29+
- name: MANAGEMENT_ZIPKIN_TRACING_ENDPOINT
30+
valueFrom:
31+
configMapKeyRef:
32+
key: MANAGEMENT_ZIPKIN_TRACING_ENDPOINT
33+
name: common-config
34+
---
35+
apiVersion: v1
36+
kind: Service
37+
metadata:
38+
name: product-service
39+
spec:
40+
selector:
41+
app: product-service
42+
ports:
43+
- protocol: TCP
44+
port: 8080
45+
targetPort: 8080
46+
---
47+
apiVersion: v1
48+
kind: ConfigMap
49+
metadata:
50+
name: product-service-config
51+
data:
52+
SPRING_DATA_MONGODB_URI: "mongodb://root:password@mongodb.default.svc.cluster.local:27017/product-service?authSource=admin"

0 commit comments

Comments
 (0)