Skip to content

Commit 926c284

Browse files
author
Yuriy Bezsonov
committed
Refactoring to Java 25
1 parent f385903 commit 926c284

5 files changed

Lines changed: 148 additions & 88 deletions

infra/cfn/base-stack.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,13 @@ Resources:
676676
Fn::GetAtt:
677677
- IdeInstanceLauncherFunction803C5A2A
678678
- Arn
679+
VolumeSize: "50"
680+
SubnetIds:
681+
Fn::Join:
682+
- ""
683+
- - Ref: VpcPublicSubnet1Subnet8E8DEDC0
684+
- ","
685+
- Ref: VpcPublicSubnet2SubnetA811849C
679686
SecurityGroupIds:
680687
Fn::Join:
681688
- ""
@@ -686,19 +693,8 @@ Resources:
686693
- Fn::GetAtt:
687694
- IdeInternalSecurityGroupB0A5D76B
688695
- GroupId
689-
SubnetIds:
690-
Fn::Join:
691-
- ""
692-
- - Ref: VpcPublicSubnet1Subnet8E8DEDC0
693-
- ","
694-
- Ref: VpcPublicSubnet2SubnetA811849C
695-
VolumeSize: "50"
696-
IamInstanceProfileArn:
697-
Fn::GetAtt:
698-
- IdeInstanceProfile61B92038
699-
- Arn
700-
InstanceName: ide
701-
InstanceTypes: m7g.xlarge,m6g.xlarge,c7g.xlarge,t4g.xlarge
696+
ImageId:
697+
Ref: SsmParameterValueawsserviceamiamazonlinuxlatestal2023amikernel61arm64C96584B6F00A464EAD1953AFF4B05118Parameter
702698
UserData:
703699
Fn::Base64:
704700
Fn::Join:
@@ -835,8 +831,12 @@ Resources:
835831
"
836832
exit 1
837833
fi
838-
ImageId:
839-
Ref: SsmParameterValueawsserviceamiamazonlinuxlatestal2023amikernel61arm64C96584B6F00A464EAD1953AFF4B05118Parameter
834+
InstanceTypes: m7g.xlarge,m6g.xlarge,c7g.xlarge,t4g.xlarge
835+
InstanceName: ide
836+
IamInstanceProfileArn:
837+
Fn::GetAtt:
838+
- IdeInstanceProfile61B92038
839+
- Arn
840840
UpdateReplacePolicy: Delete
841841
DeletionPolicy: Delete
842842
IdeEipAssociationDFF81215:

infra/cfn/java-ai-agents-stack.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,12 @@ Resources:
757757
Fn::GetAtt:
758758
- IdeInstanceLauncherFunction803C5A2A
759759
- Arn
760+
SubnetIds:
761+
Fn::Join:
762+
- ""
763+
- - Ref: VpcPublicSubnet1Subnet8E8DEDC0
764+
- ","
765+
- Ref: VpcPublicSubnet2SubnetA811849C
760766
SecurityGroupIds:
761767
Fn::Join:
762768
- ""
@@ -767,19 +773,8 @@ Resources:
767773
- Fn::GetAtt:
768774
- IdeInternalSecurityGroupB0A5D76B
769775
- GroupId
770-
SubnetIds:
771-
Fn::Join:
772-
- ""
773-
- - Ref: VpcPublicSubnet1Subnet8E8DEDC0
774-
- ","
775-
- Ref: VpcPublicSubnet2SubnetA811849C
776-
VolumeSize: "50"
777-
IamInstanceProfileArn:
778-
Fn::GetAtt:
779-
- IdeInstanceProfile61B92038
780-
- Arn
781-
InstanceName: ide
782-
InstanceTypes: m7g.xlarge,m6g.xlarge,c7g.xlarge,t4g.xlarge
776+
ImageId:
777+
Ref: SsmParameterValueawsserviceamiamazonlinuxlatestal2023amikernel61arm64C96584B6F00A464EAD1953AFF4B05118Parameter
783778
UserData:
784779
Fn::Base64:
785780
Fn::Join:
@@ -916,8 +911,13 @@ Resources:
916911
"
917912
exit 1
918913
fi
919-
ImageId:
920-
Ref: SsmParameterValueawsserviceamiamazonlinuxlatestal2023amikernel61arm64C96584B6F00A464EAD1953AFF4B05118Parameter
914+
InstanceTypes: m7g.xlarge,m6g.xlarge,c7g.xlarge,t4g.xlarge
915+
InstanceName: ide
916+
IamInstanceProfileArn:
917+
Fn::GetAtt:
918+
- IdeInstanceProfile61B92038
919+
- Arn
920+
VolumeSize: "50"
921921
UpdateReplacePolicy: Delete
922922
DeletionPolicy: Delete
923923
IdeEipAssociationDFF81215:

infra/cfn/java-on-amazon-eks-stack.yaml

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -777,8 +777,6 @@ Resources:
777777
Fn::GetAtt:
778778
- IdeInstanceLauncherFunction803C5A2A
779779
- Arn
780-
ImageId:
781-
Ref: SsmParameterValueawsserviceamiamazonlinuxlatestal2023amikernel61arm64C96584B6F00A464EAD1953AFF4B05118Parameter
782780
UserData:
783781
Fn::Base64:
784782
Fn::Join:
@@ -938,6 +936,8 @@ Resources:
938936
- Fn::GetAtt:
939937
- IdeInternalSecurityGroupB0A5D76B
940938
- GroupId
939+
ImageId:
940+
Ref: SsmParameterValueawsserviceamiamazonlinuxlatestal2023amikernel61arm64C96584B6F00A464EAD1953AFF4B05118Parameter
941941
UpdateReplacePolicy: Delete
942942
DeletionPolicy: Delete
943943
IdeEipAssociationDFF81215:
@@ -1526,12 +1526,12 @@ Resources:
15261526
Description: workshop-setup build complete
15271527
EventPattern:
15281528
detail:
1529+
project-name:
1530+
- Ref: CodeBuildProjectA0FF5539
15291531
build-status:
15301532
- SUCCEEDED
15311533
- FAILED
15321534
- STOPPED
1533-
project-name:
1534-
- Ref: CodeBuildProjectA0FF5539
15351535
detail-type:
15361536
- CodeBuild Build State Change
15371537
source:
@@ -1563,7 +1563,7 @@ Resources:
15631563
Fn::GetAtt:
15641564
- CodeBuildStartLambdaFunction8349284F
15651565
- Arn
1566-
ContentHash: "1766319416865"
1566+
ContentHash: "1766581150709"
15671567
ProjectName:
15681568
Ref: CodeBuildProjectA0FF5539
15691569
CodeBuildIamRoleArn:
@@ -1921,7 +1921,7 @@ Resources:
19211921
- Ref: AWS::AccountId
19221922
- "-"
19231923
- Ref: AWS::Region
1924-
- "-20251221131657"
1924+
- "-20251224135910"
19251925
PublicAccessBlockConfiguration:
19261926
BlockPublicAcls: true
19271927
BlockPublicPolicy: true
@@ -1962,12 +1962,42 @@ Resources:
19621962
Type: String
19631963
Value:
19641964
Ref: WorkshopBucketFD5BC43F
1965+
EcrRegistryTemplateRole9295BC5C:
1966+
Type: AWS::IAM::Role
1967+
Properties:
1968+
AssumeRolePolicyDocument:
1969+
Statement:
1970+
- Action: sts:AssumeRole
1971+
Effect: Allow
1972+
Principal:
1973+
Service: ecr.amazonaws.com
1974+
Version: "2012-10-17"
1975+
RoleName: workshop-ecr-template-role
1976+
EcrRegistryTemplateRoleDefaultPolicy760EC63A:
1977+
Type: AWS::IAM::Policy
1978+
Properties:
1979+
PolicyDocument:
1980+
Statement:
1981+
- Action:
1982+
- ecr:CreateRepository
1983+
- ecr:PutLifecyclePolicy
1984+
- ecr:TagResource
1985+
Effect: Allow
1986+
Resource: "*"
1987+
Version: "2012-10-17"
1988+
PolicyName: EcrRegistryTemplateRoleDefaultPolicy760EC63A
1989+
Roles:
1990+
- Ref: EcrRegistryTemplateRole9295BC5C
19651991
EcrRegistryTemplateD54113AB:
19661992
Type: AWS::ECR::RepositoryCreationTemplate
19671993
Properties:
19681994
AppliedFor:
19691995
- CREATE_ON_PUSH
19701996
- REPLICATION
1997+
CustomRoleArn:
1998+
Fn::GetAtt:
1999+
- EcrRegistryTemplateRole9295BC5C
2000+
- Arn
19712001
Description: Auto-create repositories on push with lifecycle policies for workshop workshop
19722002
ImageTagMutability: MUTABLE
19732003
LifecyclePolicy: |
@@ -2157,15 +2187,15 @@ Resources:
21572187
}
21582188
Environment:
21592189
Variables:
2160-
S3_BUCKET_NAME:
2161-
Ref: WorkshopBucketFD5BC43F
2162-
SECRET_NAME: workshop-ide-password
21632190
KUBERNETES_AUTH_TYPE: aws
21642191
APP_LABEL: unicorn-store-spring
21652192
K8S_NAMESPACE: unicorn-store-spring
21662193
S3_THREAD_DUMPS_PREFIX: thread-dumps/
21672194
EKS_CLUSTER_NAME:
21682195
Ref: EksClusterB2BDED5B
2196+
S3_BUCKET_NAME:
2197+
Ref: WorkshopBucketFD5BC43F
2198+
SECRET_NAME: workshop-ide-password
21692199
FunctionName: workshop-thread-dump-lambda
21702200
Handler: index.lambda_handler
21712201
MemorySize: 512

0 commit comments

Comments
 (0)