Skip to content

Commit d9f36e9

Browse files
committed
Blog part two updates
1 parent 6f1b6dc commit d9f36e9

File tree

10 files changed

+47
-7
lines changed

10 files changed

+47
-7
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ Both microservices are implemented following cloud-native concepts and functiona
1212
This example was used in the blog [Running KumuluzEE microservices on Kubernetes](https://blog.kumuluz.com/kumuluzee/kubernetes/2017/12/03/kumuluzee-microservices-on-kubernetes_part1).
1313

1414
[Blog Part 1 artifacts](https://github.com/zvonegit/kumuluzee-kubernetes/releases/tag/v1.0.0)
15+
[Blog Part 2 artifacts](https://github.com/zvonegit/kumuluzee-kubernetes/releases/tag/v2.0.0)

customers/customers-api/src/main/resources/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ kumuluzee:
5959
health:
6060
checks:
6161
data-source-health-check:
62-
connection-url: jdbc:postgresql://192.168.99.100:5432/customer
62+
connection-url: jdbc:postgresql://postgres-customers:5432/customer
6363
username: dbuser
6464
password: postgres
6565
disk-space-health-check:

kubernetes/customer-cm.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ data:
77
KUMULUZEE_DISCOVERY_CLUSTER: private-coreos
88
KUMULUZEE_DISCOVERY_ETCD_HOSTS: http://etcd:2379
99
KUMULUZEE_CONFIG_ETCD_HOSTS: http://etcd:2379
10-
KUMULUZEE_DATASOURCES0_CONNECTIONURL: jdbc:postgresql://postgres-customers:5432/customer
10+
KUMULUZEE_DATASOURCES0_CONNECTIONURL: jdbc:postgresql://postgres-customers:5433/customer
1111
KUMULUZEE_SERVER_BASEURL: http://192.168.29.246:32600
12-
KUMULUZEE_HEALTH_CHECKS_DATASOURCEHEALTHCHECK_CONNECTIONURL: jdbc:postgresql://postgres-customers:5432/customer
12+
KUMULUZEE_HEALTH_CHECKS_DATASOURCEHEALTHCHECK_CONNECTIONURL: jdbc:postgresql://postgres-customers:5433/customer

kubernetes/customer-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ spec:
1616
envFrom:
1717
- configMapRef:
1818
name: kubernetes-customer-config
19+
livenessProbe:
20+
httpGet:
21+
path: /health
22+
port: 8080
23+
initialDelaySeconds: 40
24+
periodSeconds: 5
1925
ports:
2026
- containerPort: 8080
2127
name: server

kubernetes/customer-hpa.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: kubernetes-customer-config
5+
namespace: kumuluzee-blog
6+
data:
7+
KUMULUZEE_DISCOVERY_CLUSTER: private-coreos
8+
KUMULUZEE_DISCOVERY_ETCD_HOSTS: http://etcd:2379
9+
KUMULUZEE_CONFIG_ETCD_HOSTS: http://etcd:2379
10+
KUMULUZEE_DATASOURCES0_CONNECTIONURL: jdbc:postgresql://postgres-customers:5433/customer
11+
KUMULUZEE_SERVER_BASEURL: http://192.168.29.246:32600
12+
KUMULUZEE_HEALTH_CHECKS_DATASOURCEHEALTHCHECK_CONNECTIONURL: jdbc:postgresql://postgres-customers:5433/customer

kubernetes/order-deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ spec:
1616
envFrom:
1717
- configMapRef:
1818
name: kubernetes-order-config
19+
livenessProbe:
20+
httpGet:
21+
path: /health
22+
port: 8081
23+
initialDelaySeconds: 30
24+
periodSeconds: 5
25+
resources:
26+
limits:
27+
cpu: 1
1928
ports:
2029
- containerPort: 8081
2130
name: server

kubernetes/order-hpa.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: kubernetes-order-config
5+
namespace: kumuluzee-blog
6+
data:
7+
KUMULUZEE_DISCOVERY_CLUSTER: private-coreos
8+
KUMULUZEE_DISCOVERY_ETCD_HOSTS: http://etcd:2379
9+
KUMULUZEE_CONFIG_ETCD_HOSTS: http://etcd:2379
10+
KUMULUZEE_DATASOURCES0_CONNECTIONURL: jdbc:postgresql://postgres-orders:5432/order
11+
KUMULUZEE_SERVER_BASEURL: http://192.168.29.246:32583
12+
KUMULUZEE_HEALTH_CHECKS_DATASOURCEHEALTHCHECK_CONNECTIONURL: jdbc:postgresql://postgres-orders:5432/order

kubernetes/postgres-customers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ metadata:
3434
spec:
3535
type: ClusterIP
3636
ports:
37-
- port: 5432
37+
- port: 5433
3838
protocol: TCP
3939
targetPort: 5432
4040
selector:

orders/orders-api/src/main/resources/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ kumuluzee:
99
port: 8081
1010
datasources:
1111
- jndi-name: jdbc/OrdersDS
12-
connection-url: jdbc:postgresql://192.168.99.100:5433/order
12+
connection-url: jdbc:postgresql://postgres-orders:5432/order
1313
username: dbuser
1414
password: postgres
1515
max-pool-size: 20
@@ -24,7 +24,7 @@ kumuluzee:
2424
health:
2525
checks:
2626
data-source-health-check:
27-
connection-url: jdbc:postgresql://192.168.99.100:5433/order
27+
connection-url: jdbc:postgresql://postgres-orders:5432/order
2828
username: dbuser
2929
password: postgres
3030
disk-space-health-check:

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<maven.compiler.target>1.8</maven.compiler.target>
2020
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2121

22-
<kumuluzee.version>2.4.1</kumuluzee.version>
22+
<kumuluzee.version>2.5.0-SNAPSHOT</kumuluzee.version>
2323
<kumuluzee-rest.version>1.1.0</kumuluzee-rest.version>
2424
<kumuluzee-logs.version>1.3.0</kumuluzee-logs.version>
2525
<kumuluzee-cors.version>1.0.2</kumuluzee-cors.version>

0 commit comments

Comments
 (0)