Skip to content

Commit 4c6a98e

Browse files
author
Yuriy Bezsonov
committed
update vscode server
1 parent 85959b5 commit 4c6a98e

File tree

2 files changed

+61
-61
lines changed

2 files changed

+61
-61
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public static class VSCodeIdeProps {
8181
private String availabilityZone;
8282
private IMachineImage machineImage = MachineImage.latestAmazonLinux2023();
8383
private InstanceType instanceType = InstanceType.of(InstanceClass.T3, InstanceSize.MEDIUM);
84-
private String codeServerVersion = "4.98.2";
84+
private String codeServerVersion = "4.99.3";
8585
private List<IManagedPolicy> additionalIamPolicies = new ArrayList<>();
8686
private List<ISecurityGroup> additionalSecurityGroups = new ArrayList<>();
8787
private int bootstrapTimeoutMinutes = 30;

infrastructure/cfn/ide-gitea-stack.yaml

+60-60
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ Resources:
422422
VSCodeIdeGiteaIdeLogGroupCD76FEFA:
423423
Type: AWS::Logs::LogGroup
424424
Properties:
425-
LogGroupName: ide-bootstrap-log-20250316-125839
425+
LogGroupName: ide-bootstrap-log-20250430-164003
426426
RetentionInDays: 7
427427
UpdateReplacePolicy: Retain
428428
DeletionPolicy: Retain
@@ -854,9 +854,9 @@ Resources:
854854
description: Bootstrap IDE
855855
parameters:
856856
BootstrapScript:
857-
default: ""
858-
description: (Optional) Custom bootstrap script to run.
859857
type: String
858+
description: (Optional) Custom bootstrap script to run.
859+
default: ""
860860
mainSteps:
861861
- inputs:
862862
runCommand:
@@ -1113,15 +1113,50 @@ Resources:
11131113
11141114
exit $exit_code
11151115
- splashUrl: ""
1116-
instanceIamRoleArn:
1117-
Fn::GetAtt:
1118-
- VSCodeIdeGiteaIdeRole90308F47
1119-
- Arn
1120-
readmeUrl: ""
1121-
waitConditionHandleUrl:
1122-
Ref: VSCodeIdeGiteaIdeBootstrapWaitConditionHandle78036ED5
1123-
extensions: ms-azuretools.vscode-docker,ms-kubernetes-tools.vscode-kubernetes-tools,vscjava.vscode-java-pack
1124-
domain: ""
1116+
instanceIamRoleName:
1117+
Ref: VSCodeIdeGiteaIdeRole90308F47
1118+
codeServerVersion: 4.99.3
1119+
customBootstrapScript: |
1120+
date
1121+
1122+
echo '=== Clone Git repository ==='
1123+
sudo -H -u ec2-user bash -c "git clone https://github.com/aws-samples/java-on-aws ~/java-on-aws/"
1124+
# sudo -H -u ec2-user bash -c "cd ~/java-on-aws && git checkout refactoring"
1125+
1126+
echo '=== Setup IDE ==='
1127+
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/ide.sh"
1128+
passwordName:
1129+
Fn::Join:
1130+
- "-"
1131+
- - Fn::Select:
1132+
- 0
1133+
- Fn::Split:
1134+
- "-"
1135+
- Fn::Select:
1136+
- 6
1137+
- Fn::Split:
1138+
- ":"
1139+
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1140+
- Fn::Select:
1141+
- 1
1142+
- Fn::Split:
1143+
- "-"
1144+
- Fn::Select:
1145+
- 6
1146+
- Fn::Split:
1147+
- ":"
1148+
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1149+
- Fn::Select:
1150+
- 2
1151+
- Fn::Split:
1152+
- "-"
1153+
- Fn::Select:
1154+
- 6
1155+
- Fn::Split:
1156+
- ":"
1157+
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1158+
environmentContentsZip: ""
1159+
terminalOnStartup: "true"
11251160
installGitea: |
11261161
dnf install -y nerdctl cni-plugins
11271162
mkdir -p /gitea/config /gitea/data
@@ -1314,50 +1349,15 @@ Resources:
13141349
EOF
13151350
13161351
source /etc/profile.d/gitea.sh
1317-
terminalOnStartup: "true"
1318-
environmentContentsZip: ""
1319-
passwordName:
1320-
Fn::Join:
1321-
- "-"
1322-
- - Fn::Select:
1323-
- 0
1324-
- Fn::Split:
1325-
- "-"
1326-
- Fn::Select:
1327-
- 6
1328-
- Fn::Split:
1329-
- ":"
1330-
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1331-
- Fn::Select:
1332-
- 1
1333-
- Fn::Split:
1334-
- "-"
1335-
- Fn::Select:
1336-
- 6
1337-
- Fn::Split:
1338-
- ":"
1339-
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1340-
- Fn::Select:
1341-
- 2
1342-
- Fn::Split:
1343-
- "-"
1344-
- Fn::Select:
1345-
- 6
1346-
- Fn::Split:
1347-
- ":"
1348-
- Ref: VSCodeIdeGiteaIdePasswordSecretD25F73F4
1349-
customBootstrapScript: |
1350-
date
1351-
1352-
echo '=== Clone Git repository ==='
1353-
sudo -H -u ec2-user bash -c "git clone https://github.com/aws-samples/java-on-aws ~/java-on-aws/"
1354-
# sudo -H -u ec2-user bash -c "cd ~/java-on-aws && git checkout refactoring"
1355-
1356-
echo '=== Setup IDE ==='
1357-
sudo -H -i -u ec2-user bash -c "~/java-on-aws/infrastructure/scripts/setup/ide.sh"
1358-
codeServerVersion: 4.98.2
1359-
instanceIamRoleName:
1360-
Ref: VSCodeIdeGiteaIdeRole90308F47
1352+
domain: ""
1353+
extensions: ms-azuretools.vscode-docker,ms-kubernetes-tools.vscode-kubernetes-tools,vscjava.vscode-java-pack
1354+
waitConditionHandleUrl:
1355+
Ref: VSCodeIdeGiteaIdeBootstrapWaitConditionHandle78036ED5
1356+
readmeUrl: ""
1357+
instanceIamRoleArn:
1358+
Fn::GetAtt:
1359+
- VSCodeIdeGiteaIdeRole90308F47
1360+
- Arn
13611361
name: IdeBootstrapFunction
13621362
action: aws:runShellScript
13631363
DocumentFormat: YAML
@@ -1495,12 +1495,12 @@ Resources:
14951495
Fn::GetAtt:
14961496
- VSCodeIdeGiteaIdeBootstrapFunction34BA645E
14971497
- Arn
1498-
InstanceId:
1499-
Ref: VSCodeIdeGiteaIdeEC2Instance51274E6D
1500-
LogGroupName:
1501-
Ref: VSCodeIdeGiteaIdeLogGroupCD76FEFA
15021498
SsmDocument:
15031499
Ref: VSCodeIdeGiteaIdeBootstrapDocument7FC8732A
1500+
LogGroupName:
1501+
Ref: VSCodeIdeGiteaIdeLogGroupCD76FEFA
1502+
InstanceId:
1503+
Ref: VSCodeIdeGiteaIdeEC2Instance51274E6D
15041504
UpdateReplacePolicy: Delete
15051505
DeletionPolicy: Delete
15061506
Outputs:

0 commit comments

Comments
 (0)