Skip to content

Commit 5cc7c44

Browse files
author
Yuriy Bezsonov
committed
enable Cohere models
1 parent ee65faf commit 5cc7c44

File tree

7 files changed

+105
-89
lines changed

7 files changed

+105
-89
lines changed

infrastructure/cdk/src/main/java/com/unicorn/constructs/EcsCluster.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ private FargateService createFargateService(ISecurityGroup ecsSecurityGroup, App
213213
.cluster(ecsCluster)
214214
.taskDefinition(taskDefinition)
215215
.desiredCount(1)
216+
.minHealthyPercent(0)
216217
.securityGroups(List.of(ecsSecurityGroup))
217218
.vpcSubnets(SubnetSelection.builder()
218219
.subnetType(SubnetType.PRIVATE_WITH_EGRESS)

infrastructure/cdk/src/main/resources/iam-policy.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
"aws-marketplace:ProductId": [
1616
"prod-4dlfvry4v5hbi",
1717
"prod-cx7ovbu5wex7g",
18-
"prod-5oba7y7jpji56"
18+
"prod-5oba7y7jpji56",
19+
"b7568428-a1ab-46d8-bab3-37def50f6f6a",
20+
"38e55671-c3fe-4a44-9783-3584906e7cad"
1921
]
2022
}
2123
}

infrastructure/cfn/ide-gitea-stack.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ Resources:
346346
- prod-4dlfvry4v5hbi
347347
- prod-cx7ovbu5wex7g
348348
- prod-5oba7y7jpji56
349+
- b7568428-a1ab-46d8-bab3-37def50f6f6a
350+
- 38e55671-c3fe-4a44-9783-3584906e7cad
349351
Effect: Allow
350352
Resource: "*"
351353
- Action:
@@ -445,7 +447,7 @@ Resources:
445447
VSCodeIdeGiteaIdeLogGroupCD76FEFA:
446448
Type: AWS::Logs::LogGroup
447449
Properties:
448-
LogGroupName: ide-bootstrap-log-20250614-193054
450+
LogGroupName: ide-bootstrap-log-20250615-133649
449451
RetentionInDays: 7
450452
UpdateReplacePolicy: Retain
451453
DeletionPolicy: Retain

infrastructure/cfn/ide-stack.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ Resources:
346346
- prod-4dlfvry4v5hbi
347347
- prod-cx7ovbu5wex7g
348348
- prod-5oba7y7jpji56
349+
- b7568428-a1ab-46d8-bab3-37def50f6f6a
350+
- 38e55671-c3fe-4a44-9783-3584906e7cad
349351
Effect: Allow
350352
Resource: "*"
351353
- Action:
@@ -445,7 +447,7 @@ Resources:
445447
VSCodeIdeIdeLogGroup364F2B78:
446448
Type: AWS::Logs::LogGroup
447449
Properties:
448-
LogGroupName: ide-bootstrap-log-20250614-193037
450+
LogGroupName: ide-bootstrap-log-20250615-133633
449451
RetentionInDays: 7
450452
UpdateReplacePolicy: Retain
451453
DeletionPolicy: Retain
@@ -860,9 +862,9 @@ Resources:
860862
description: Bootstrap IDE
861863
parameters:
862864
BootstrapScript:
863-
default: ""
864865
description: (Optional) Custom bootstrap script to run.
865866
type: String
867+
default: ""
866868
mainSteps:
867869
- inputs:
868870
runCommand:
@@ -1123,12 +1125,7 @@ Resources:
11231125
/opt/aws/bin/cfn-signal -e $exit_code '${waitConditionHandleUrl}'
11241126
11251127
exit $exit_code
1126-
- instanceIamRoleArn:
1127-
Fn::GetAtt:
1128-
- VSCodeIdeIdeRole21951A1F
1129-
- Arn
1130-
readmeUrl: ""
1131-
waitConditionHandleUrl:
1128+
- waitConditionHandleUrl:
11321129
Ref: VSCodeIdeIdeBootstrapWaitConditionHandle0A599C82
11331130
extensions: ms-kubernetes-tools.vscode-kubernetes-tools,ms-azuretools.vscode-docker
11341131
domain: ""
@@ -1179,6 +1176,11 @@ Resources:
11791176
instanceIamRoleName:
11801177
Ref: VSCodeIdeIdeRole21951A1F
11811178
splashUrl: ""
1179+
instanceIamRoleArn:
1180+
Fn::GetAtt:
1181+
- VSCodeIdeIdeRole21951A1F
1182+
- Arn
1183+
readmeUrl: ""
11821184
name: IdeBootstrapFunction
11831185
action: aws:runShellScript
11841186
DocumentFormat: YAML

infrastructure/cfn/spring-ai-stack.yaml

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,8 @@ Resources:
341341
- prod-4dlfvry4v5hbi
342342
- prod-cx7ovbu5wex7g
343343
- prod-5oba7y7jpji56
344+
- b7568428-a1ab-46d8-bab3-37def50f6f6a
345+
- 38e55671-c3fe-4a44-9783-3584906e7cad
344346
Effect: Allow
345347
Resource: "*"
346348
- Action:
@@ -440,7 +442,7 @@ Resources:
440442
UnicornStoreIdeIdeLogGroup7A5EFA50:
441443
Type: AWS::Logs::LogGroup
442444
Properties:
443-
LogGroupName: unicornstore-ide-bootstrap-log-20250614-193115
445+
LogGroupName: unicornstore-ide-bootstrap-log-20250615-133708
444446
RetentionInDays: 7
445447
UpdateReplacePolicy: Retain
446448
DeletionPolicy: Retain
@@ -855,9 +857,9 @@ Resources:
855857
description: Bootstrap IDE
856858
parameters:
857859
BootstrapScript:
858-
description: (Optional) Custom bootstrap script to run.
859860
default: ""
860861
type: String
862+
description: (Optional) Custom bootstrap script to run.
861863
mainSteps:
862864
- inputs:
863865
runCommand:
@@ -1118,7 +1120,19 @@ Resources:
11181120
/opt/aws/bin/cfn-signal -e $exit_code '${waitConditionHandleUrl}'
11191121
11201122
exit $exit_code
1121-
- codeServerVersion: 4.100.3
1123+
- domain: ""
1124+
extensions: vscjava.vscode-java-pack,ms-azuretools.vscode-docker
1125+
waitConditionHandleUrl:
1126+
Ref: UnicornStoreIdeIdeBootstrapWaitConditionHandle3D9B67F1
1127+
readmeUrl: ""
1128+
instanceIamRoleArn:
1129+
Fn::GetAtt:
1130+
- UnicornStoreIdeIdeRole81A2CEAA
1131+
- Arn
1132+
splashUrl: ""
1133+
instanceIamRoleName:
1134+
Ref: UnicornStoreIdeIdeRole81A2CEAA
1135+
codeServerVersion: 4.100.3
11221136
customBootstrapScript: |
11231137
date
11241138
@@ -1173,18 +1187,6 @@ Resources:
11731187
environmentContentsZip: ""
11741188
terminalOnStartup: "true"
11751189
installGitea: echo bootstrapGitea was not provided
1176-
domain: ""
1177-
extensions: vscjava.vscode-java-pack,ms-azuretools.vscode-docker
1178-
waitConditionHandleUrl:
1179-
Ref: UnicornStoreIdeIdeBootstrapWaitConditionHandle3D9B67F1
1180-
readmeUrl: ""
1181-
instanceIamRoleArn:
1182-
Fn::GetAtt:
1183-
- UnicornStoreIdeIdeRole81A2CEAA
1184-
- Arn
1185-
splashUrl: ""
1186-
instanceIamRoleName:
1187-
Ref: UnicornStoreIdeIdeRole81A2CEAA
11881190
name: IdeBootstrapFunction
11891191
action: aws:runShellScript
11901192
DocumentFormat: YAML
@@ -1804,7 +1806,7 @@ Resources:
18041806
Enable: false
18051807
Rollback: false
18061808
MaximumPercent: 200
1807-
MinimumHealthyPercent: 50
1809+
MinimumHealthyPercent: 0
18081810
DesiredCount: 1
18091811
EnableECSManagedTags: false
18101812
HealthCheckGracePeriodSeconds: 60
@@ -2132,7 +2134,7 @@ Resources:
21322134
Enable: false
21332135
Rollback: false
21342136
MaximumPercent: 200
2135-
MinimumHealthyPercent: 50
2137+
MinimumHealthyPercent: 0
21362138
DesiredCount: 1
21372139
EnableECSManagedTags: false
21382140
HealthCheckGracePeriodSeconds: 60
@@ -2452,6 +2454,13 @@ Resources:
24522454
return 'placeholder'
24532455
Environment:
24542456
Variables:
2457+
JAVA_TOOL_OPTIONS: -XX:+TieredCompilation -XX:TieredStopAtLevel=1
2458+
SPRING_DATASOURCE_PASSWORD:
2459+
Fn::Join:
2460+
- ""
2461+
- - "{{resolve:secretsmanager:"
2462+
- Ref: InfrastructureCorepostgresB0D0C6BB
2463+
- :SecretString:password::}}
24552464
SPRING_DATASOURCE_URL:
24562465
Fn::Join:
24572466
- ""
@@ -2462,13 +2471,6 @@ Resources:
24622471
- :5432/unicorns
24632472
SPRING_DATASOURCE_HIKARI_maximumPoolSize: "1"
24642473
AWS_SERVERLESS_JAVA_CONTAINER_INIT_GRACE_TIME: "500"
2465-
JAVA_TOOL_OPTIONS: -XX:+TieredCompilation -XX:TieredStopAtLevel=1
2466-
SPRING_DATASOURCE_PASSWORD:
2467-
Fn::Join:
2468-
- ""
2469-
- - "{{resolve:secretsmanager:"
2470-
- Ref: InfrastructureCorepostgresB0D0C6BB
2471-
- :SecretString:password::}}
24722474
FunctionName: unicorn-store-spring
24732475
Handler: com.unicorn.store.StreamLambdaHandler::handleRequest
24742476
MemorySize: 2048
@@ -3200,12 +3202,12 @@ Resources:
32003202
Description: Build complete
32013203
EventPattern:
32023204
detail:
3205+
project-name:
3206+
- Ref: UnicornStoreCodeBuildCodeBuildProjectAF799FF7
32033207
build-status:
32043208
- SUCCEEDED
32053209
- FAILED
32063210
- STOPPED
3207-
project-name:
3208-
- Ref: UnicornStoreCodeBuildCodeBuildProjectAF799FF7
32093211
detail-type:
32103212
- CodeBuild Build State Change
32113213
source:
@@ -3237,13 +3239,13 @@ Resources:
32373239
Fn::GetAtt:
32383240
- UnicornStoreCodeBuildStartBuildFunctionB2FE9156
32393241
- Arn
3240-
ContentHash: fd70d4491df3a6a44292446f6b364c8a
32413242
CodeBuildIamRoleArn:
32423243
Fn::GetAtt:
32433244
- UnicornStoreCodeBuildCodeBuildRoleB9CE0DE7
32443245
- Arn
32453246
ProjectName:
32463247
Ref: UnicornStoreCodeBuildCodeBuildProjectAF799FF7
3248+
ContentHash: fd70d4491df3a6a44292446f6b364c8a
32473249
DependsOn:
32483250
- UnicornStoreCodeBuildBuildCompleteRuleAllowEventRulespringaistackUnicornStoreCodeBuildReportBuildFunctionA3347B9EB9A35FA4
32493251
- UnicornStoreCodeBuildBuildCompleteRule7E287561

0 commit comments

Comments
 (0)