Skip to content

Commit ceea957

Browse files
author
Yuriy Bezsonov
committed
fix url
1 parent 48fd929 commit ceea957

File tree

5 files changed

+155
-162
lines changed

5 files changed

+155
-162
lines changed

infrastructure/cdk/src/main/java/com/unicorn/core/InfrastructureMonitoringJVM.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ private Function createThreadDumpLambda(Bucket s3Bucket, EksCluster eksCluster,
225225
.statements(List.of(
226226
PolicyStatement.Builder.create()
227227
.effect(Effect.ALLOW)
228-
.principals(List.of(new AccountRootPrincipal()))
228+
.principals(List.of(new AnyPrincipal()))
229229
.actions(List.of("execute-api:Invoke"))
230230
.resources(List.of("*"))
231231
.conditions(Map.of(

infrastructure/cfn/ide-gitea-stack.yaml

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Resources:
447447
VSCodeIdeGiteaIdeLogGroupCD76FEFA:
448448
Type: AWS::Logs::LogGroup
449449
Properties:
450-
LogGroupName: ide-bootstrap-log-20250826-091350
450+
LogGroupName: ide-bootstrap-log-20250826-095343
451451
RetentionInDays: 7
452452
UpdateReplacePolicy: Retain
453453
DeletionPolicy: Retain
@@ -879,8 +879,8 @@ Resources:
879879
description: Bootstrap IDE
880880
parameters:
881881
BootstrapScript:
882-
default: ""
883882
description: (Optional) Custom bootstrap script to run.
883+
default: ""
884884
type: String
885885
mainSteps:
886886
- inputs:
@@ -1142,16 +1142,51 @@ Resources:
11421142
/opt/aws/bin/cfn-signal -e $exit_code '${waitConditionHandleUrl}'
11431143
11441144
exit $exit_code
1145-
- splashUrl: ""
1146-
instanceIamRoleArn:
1147-
Fn::GetAtt:
1148-
- VSCodeIdeGiteaIdeRole90308F47
1149-
- Arn
1150-
readmeUrl: ""
1151-
waitConditionHandleUrl:
1152-
Ref: VSCodeIdeGiteaIdeBootstrapWaitConditionHandle78036ED5
1153-
extensions: ms-kubernetes-tools.vscode-kubernetes-tools,ms-azuretools.vscode-docker
1154-
domain: ""
1145+
- instanceIamRoleName:
1146+
Ref: VSCodeIdeGiteaIdeRole90308F47
1147+
codeServerVersion: 4.103.1
1148+
customBootstrapScript: |
1149+
date
1150+
1151+
echo '=== Clone Git repository ==='
1152+
sudo -H -u ec2-user bash -c "git clone https://github.com/aws-samples/java-on-aws ~/java-on-aws/"
1153+
# sudo -H -u ec2-user bash -c "cd ~/java-on-aws && git checkout refactoring"
1154+
1155+
echo '=== Setup IDE ==='
1156+
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/ide.sh"
1157+
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/idp.sh"
1158+
passwordName:
1159+
Fn::Join:
1160+
- "-"
1161+
- - Fn::Select:
1162+
- 0
1163+
- Fn::Split:
1164+
- "-"
1165+
- Fn::Select:
1166+
- 6
1167+
- Fn::Split:
1168+
- ":"
1169+
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1170+
- Fn::Select:
1171+
- 1
1172+
- Fn::Split:
1173+
- "-"
1174+
- Fn::Select:
1175+
- 6
1176+
- Fn::Split:
1177+
- ":"
1178+
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1179+
- Fn::Select:
1180+
- 2
1181+
- Fn::Split:
1182+
- "-"
1183+
- Fn::Select:
1184+
- 6
1185+
- Fn::Split:
1186+
- ":"
1187+
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1188+
environmentContentsZip: ""
1189+
terminalOnStartup: "true"
11551190
installGitea: |
11561191
dnf install -y nerdctl cni-plugins
11571192
mkdir -p /gitea/config /gitea/data
@@ -1344,51 +1379,16 @@ Resources:
13441379
EOF
13451380
13461381
source /etc/profile.d/gitea.sh
1347-
terminalOnStartup: "true"
1348-
environmentContentsZip: ""
1349-
passwordName:
1350-
Fn::Join:
1351-
- "-"
1352-
- - Fn::Select:
1353-
- 0
1354-
- Fn::Split:
1355-
- "-"
1356-
- Fn::Select:
1357-
- 6
1358-
- Fn::Split:
1359-
- ":"
1360-
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1361-
- Fn::Select:
1362-
- 1
1363-
- Fn::Split:
1364-
- "-"
1365-
- Fn::Select:
1366-
- 6
1367-
- Fn::Split:
1368-
- ":"
1369-
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1370-
- Fn::Select:
1371-
- 2
1372-
- Fn::Split:
1373-
- "-"
1374-
- Fn::Select:
1375-
- 6
1376-
- Fn::Split:
1377-
- ":"
1378-
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1379-
customBootstrapScript: |
1380-
date
1381-
1382-
echo '=== Clone Git repository ==='
1383-
sudo -H -u ec2-user bash -c "git clone https://github.com/aws-samples/java-on-aws ~/java-on-aws/"
1384-
# sudo -H -u ec2-user bash -c "cd ~/java-on-aws && git checkout refactoring"
1385-
1386-
echo '=== Setup IDE ==='
1387-
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/ide.sh"
1388-
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/idp.sh"
1389-
codeServerVersion: 4.103.1
1390-
instanceIamRoleName:
1391-
Ref: VSCodeIdeGiteaIdeRole90308F47
1382+
domain: ""
1383+
extensions: ms-kubernetes-tools.vscode-kubernetes-tools,ms-azuretools.vscode-docker
1384+
waitConditionHandleUrl:
1385+
Ref: VSCodeIdeGiteaIdeBootstrapWaitConditionHandle78036ED5
1386+
readmeUrl: ""
1387+
instanceIamRoleArn:
1388+
Fn::GetAtt:
1389+
- VSCodeIdeGiteaIdeRole90308F47
1390+
- Arn
1391+
splashUrl: ""
13921392
name: IdeBootstrapFunction
13931393
action: aws:runShellScript
13941394
DocumentFormat: YAML
@@ -1528,10 +1528,10 @@ Resources:
15281528
- Arn
15291529
InstanceId:
15301530
Ref: VSCodeIdeGiteaIdeEC2Instance51274E6D
1531-
LogGroupName:
1532-
Ref: VSCodeIdeGiteaIdeLogGroupCD76FEFA
15331531
SsmDocument:
15341532
Ref: VSCodeIdeGiteaIdeBootstrapDocument7FC8732A
1533+
LogGroupName:
1534+
Ref: VSCodeIdeGiteaIdeLogGroupCD76FEFA
15351535
UpdateReplacePolicy: Delete
15361536
DeletionPolicy: Delete
15371537
Outputs:

infrastructure/cfn/ide-stack.yaml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Resources:
447447
VSCodeIdeIdeLogGroup364F2B78:
448448
Type: AWS::Logs::LogGroup
449449
Properties:
450-
LogGroupName: ide-bootstrap-log-20250826-091333
450+
LogGroupName: ide-bootstrap-log-20250826-095327
451451
RetentionInDays: 7
452452
UpdateReplacePolicy: Retain
453453
DeletionPolicy: Retain
@@ -862,8 +862,8 @@ Resources:
862862
description: Bootstrap IDE
863863
parameters:
864864
BootstrapScript:
865-
type: String
866865
description: (Optional) Custom bootstrap script to run.
866+
type: String
867867
default: ""
868868
mainSteps:
869869
- inputs:
@@ -1125,24 +1125,13 @@ Resources:
11251125
/opt/aws/bin/cfn-signal -e $exit_code '${waitConditionHandleUrl}'
11261126
11271127
exit $exit_code
1128-
- instanceIamRoleArn:
1129-
Fn::GetAtt:
1130-
- VSCodeIdeIdeRole21951A1F
1131-
- Arn
1132-
splashUrl: ""
1133-
instanceIamRoleName:
1134-
Ref: VSCodeIdeIdeRole21951A1F
1135-
codeServerVersion: 4.103.1
1136-
customBootstrapScript: |
1137-
date
1138-
1139-
echo '=== Clone Git repository ==='
1140-
sudo -H -u ec2-user bash -c "git clone https://github.com/aws-samples/java-on-aws ~/java-on-aws/"
1141-
# sudo -H -u ec2-user bash -c "cd ~/java-on-aws && git checkout refactoring"
1142-
1143-
echo '=== Setup IDE ==='
1144-
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/ide.sh"
1145-
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/idp.sh"
1128+
- waitConditionHandleUrl:
1129+
Ref: VSCodeIdeIdeBootstrapWaitConditionHandle0A599C82
1130+
extensions: ms-kubernetes-tools.vscode-kubernetes-tools,shardulm94.trailing-spaces,ms-azuretools.vscode-docker
1131+
domain: ""
1132+
installGitea: echo bootstrapGitea was not provided
1133+
terminalOnStartup: "true"
1134+
environmentContentsZip: ""
11461135
passwordName:
11471136
Fn::Join:
11481137
- "-"
@@ -1173,13 +1162,24 @@ Resources:
11731162
- Fn::Split:
11741163
- ":"
11751164
- Ref: VSCodeIdeIdePasswordSecret39AD78F3
1176-
environmentContentsZip: ""
1177-
terminalOnStartup: "true"
1178-
installGitea: echo bootstrapGitea was not provided
1179-
domain: ""
1180-
extensions: ms-kubernetes-tools.vscode-kubernetes-tools,shardulm94.trailing-spaces,ms-azuretools.vscode-docker
1181-
waitConditionHandleUrl:
1182-
Ref: VSCodeIdeIdeBootstrapWaitConditionHandle0A599C82
1165+
customBootstrapScript: |
1166+
date
1167+
1168+
echo '=== Clone Git repository ==='
1169+
sudo -H -u ec2-user bash -c "git clone https://github.com/aws-samples/java-on-aws ~/java-on-aws/"
1170+
# sudo -H -u ec2-user bash -c "cd ~/java-on-aws && git checkout refactoring"
1171+
1172+
echo '=== Setup IDE ==='
1173+
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/ide.sh"
1174+
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/idp.sh"
1175+
codeServerVersion: 4.103.1
1176+
instanceIamRoleName:
1177+
Ref: VSCodeIdeIdeRole21951A1F
1178+
splashUrl: ""
1179+
instanceIamRoleArn:
1180+
Fn::GetAtt:
1181+
- VSCodeIdeIdeRole21951A1F
1182+
- Arn
11831183
readmeUrl: ""
11841184
name: IdeBootstrapFunction
11851185
action: aws:runShellScript
@@ -1318,10 +1318,10 @@ Resources:
13181318
Fn::GetAtt:
13191319
- VSCodeIdeIdeBootstrapFunctionADFBCE22
13201320
- Arn
1321-
SsmDocument:
1322-
Ref: VSCodeIdeIdeBootstrapDocument8DDB05AD
13231321
LogGroupName:
13241322
Ref: VSCodeIdeIdeLogGroup364F2B78
1323+
SsmDocument:
1324+
Ref: VSCodeIdeIdeBootstrapDocument8DDB05AD
13251325
InstanceId:
13261326
Ref: VSCodeIdeIdeEC2Instance846AE373
13271327
UpdateReplacePolicy: Delete

0 commit comments

Comments
 (0)