Skip to content

Commit 446486c

Browse files
author
Yuriy Bezsonov
committed
refactor(infra): consolidate templates
1 parent d6de6d4 commit 446486c

11 files changed

Lines changed: 1989 additions & 1283 deletions

File tree

apps/unicorn-store-spring-java25/src/main/resources/application.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ spring:
1111
threads:
1212
virtual:
1313
enabled: true
14+
application:
15+
name: unicorn-store-spring
1416

1517
# Disable JMX to reduce memory footprint in containers
1618
jmx:

infra/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ infra/
5454
│ ├── base-stack.yaml
5555
│ ├── java-on-aws-immersion-day-stack.yaml
5656
│ ├── java-on-amazon-eks-stack.yaml
57-
│ ├── java-ai-agents-stack.yaml
5857
│ └── java-spring-ai-agents-stack.yaml
5958
├── scripts/
6059
│ ├── ide/ # IDE bootstrap scripts
@@ -70,7 +69,6 @@ infra/
7069
│ │ ├── base.sh
7170
│ │ ├── java-on-aws-immersion-day.sh
7271
│ │ ├── java-on-amazon-eks.sh
73-
│ │ ├── java-ai-agents.sh
7472
│ │ └── java-spring-ai-agents.sh
7573
│ ├── setup/ # Infrastructure setup scripts
7674
│ │ ├── eks.sh # EKS cluster configuration
@@ -94,10 +92,9 @@ infra/
9492
| Template Type | Resources Created |
9593
|---------------|-------------------|
9694
| `base` | VPC, IDE |
97-
| `java-ai-agents` | VPC, IDE |
98-
| `java-spring-ai-agents` | VPC, IDE |
9995
| `java-on-aws-immersion-day` | VPC, IDE, CodeBuild, Database, EKS, WorkshopBucket, EcrRegistry, ThreadAnalysis, AiJvmAnalyzer, Unicorn |
10096
| `java-on-amazon-eks` | Same as java-on-aws-immersion-day |
97+
| `java-spring-ai-agents` | Same as java-on-aws-immersion-day |
10198

10299
---
103100

@@ -178,8 +175,8 @@ public WorkshopStack(...) {
178175
Vpc vpc = new Vpc(this, "Vpc", ...);
179176
Ide ide = new Ide(this, "Ide", ...);
180177

181-
// Conditionally created for java-on-aws-immersion-day and java-on-amazon-eks
182-
if ("java-on-aws-immersion-day".equals(templateType) || "java-on-amazon-eks".equals(templateType)) {
178+
// Conditionally created for java-on-aws-immersion-day, java-on-amazon-eks, and java-spring-ai-agents
179+
if ("java-on-aws-immersion-day".equals(templateType) || "java-on-amazon-eks".equals(templateType) || "java-spring-ai-agents".equals(templateType)) {
183180
new CodeBuild(this, "CodeBuild", ...);
184181
new Database(this, "Database", ...);
185182
new Eks(this, "Eks", ...);

infra/cdk/src/main/java/sample/com/WorkshopStack.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public WorkshopStack(final Construct scope, final String id, final StackProps pr
6161
.build();
6262
Ide ide = new Ide(this, "Ide", ideProps);
6363

64-
// java-on-aws-immersion-day and java-on-amazon-eks specific resources (CodeBuild for service-linked roles)
65-
if ("java-on-aws-immersion-day".equals(templateType) || "java-on-amazon-eks".equals(templateType)) {
64+
// java-on-aws-immersion-day, java-on-amazon-eks, and java-spring-ai-agents specific resources (CodeBuild for service-linked roles)
65+
if ("java-on-aws-immersion-day".equals(templateType) || "java-on-amazon-eks".equals(templateType) || "java-spring-ai-agents".equals(templateType)) {
6666
// CodeBuild for workshop setup (service-linked role creation)
6767
new CodeBuild(this, "CodeBuild",
6868
CodeBuild.CodeBuildProps.builder()

0 commit comments

Comments
 (0)