Skip to content

Commit 1f22ce5

Browse files
committed
updated cloud formation template to use the valid version of kafka
1 parent db68a7c commit 1f22ce5

8 files changed

Lines changed: 66 additions & 61 deletions

File tree

Daily Journal.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,4 +370,10 @@ Got an error - region has not been specified.
370370

371371
Need to specify login details and also region despite it being localstack
372372

373-
Another crash cause since the kafka version of 2.8 was too old, need to use more recent version
373+
Another crash cause since the kafka version of 2.8 was too old, need to use more recent version. Using version 4.1.x.kraft
374+
375+
### 15th May 2026 -
376+
377+
Still debugging issues with deployment to localstack. Trying to use awslocal instead of aws since the latter works better for localstack
378+
379+
Okay now it is working not sure why. The endpoint has been created. Testing it right now.

api-requests/auth-service/send-login-request.http

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# send login in request via frontend
1111

12-
POST http://localhost:5004/auth/login
12+
POST http://lb-b7d24f40.elb.localhost.localstack.cloud:5004/auth/login
1313
Content-Type: application/json
1414

1515
{

infrastructure/cdk.out/localstack.template.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@
659659
"InstanceType": "kafka.m5.xlarge"
660660
},
661661
"ClusterName": "kafka-cluster-for-patients",
662-
"KafkaVersion": "4.2.0",
662+
"KafkaVersion": "4.1.x.kraft",
663663
"NumberOfBrokerNodes": 1
664664
}
665665
},
@@ -1633,13 +1633,13 @@
16331633
"ContainerDefinitions": [
16341634
{
16351635
"Environment": [
1636-
{
1637-
"Name": "SPRING_PROFILES_ACTIVE",
1638-
"Value": "prod"
1639-
},
16401636
{
16411637
"Name": "AUTH_SERVICE_URL",
16421638
"Value": "host.docker.internal:4005"
1639+
},
1640+
{
1641+
"Name": "SPRING_PROFILES_ACTIVE",
1642+
"Value": "prod"
16431643
}
16441644
],
16451645
"Essential": true,

infrastructure/cdk.out/manifest.json

Lines changed: 46 additions & 46 deletions
Large diffs are not rendered by default.

infrastructure/cdk.out/tree.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@
11291129
"brokerAzDistribution": "DEFAULT"
11301130
},
11311131
"clusterName": "kafka-cluster-for-patients",
1132-
"kafkaVersion": "4.2.0",
1132+
"kafkaVersion": "4.1.x.kraft",
11331133
"numberOfBrokerNodes": 1
11341134
}
11351135
},
@@ -2778,13 +2778,13 @@
27782778
}
27792779
},
27802780
"environment": [
2781-
{
2782-
"name": "SPRING_PROFILES_ACTIVE",
2783-
"value": "prod"
2784-
},
27852781
{
27862782
"name": "AUTH_SERVICE_URL",
27872783
"value": "host.docker.internal:4005"
2784+
},
2785+
{
2786+
"name": "SPRING_PROFILES_ACTIVE",
2787+
"value": "prod"
27882788
}
27892789
]
27902790
}

infrastructure/localstack-deploy-script.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ aws --endpoint-url=http://localhost:4566 cloudformation deploy \
1212

1313
# list and describe the load balancers in this environment - extract the DNSName of the first load balancer
1414
aws --endpoint-url=http://localhost:4566 elbv2 describe-load-balancers \
15-
--query "LoadBalancers[0].DNSName" --output text
16-
15+
--query "LoadBalancers[0].DNSName" --output text

infrastructure/src/main/java/com/pm/stack/LocalStack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private CfnHealthCheck CfnHealthCheckForDb(DatabaseInstance databaseInstance, St
143143
private CfnCluster CfnClusterKafka() {
144144
return CfnCluster.Builder.create(this, "MskCluster")
145145
.clusterName("kafka-cluster-for-patients")
146-
.kafkaVersion("4.2.0")
146+
.kafkaVersion("4.1.x.kraft")
147147
.numberOfBrokerNodes(1) // connects vpn to broker node
148148
.brokerNodeGroupInfo(CfnCluster.BrokerNodeGroupInfoProperty.builder()
149149
.instanceType("kafka.m5.xlarge") // specifying
6 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)