Skip to content

Commit fc3329f

Browse files
authored
Merge pull request #80 from aws-samples/theta
Theta
2 parents 9339dd0 + 6643f12 commit fc3329f

29 files changed

+2216
-2
lines changed

lib/starknet/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ We will use AWS Cloud9 to execute the subsequent commands. Follow the instructio
141141
aws ssm start-session --target $INSTANCE_ID --region $AWS_REGION
142142
tail -f /var/log/starknet/error.log
143143
```
144-
144+
145145
146146
7. Test Starknet RPC API
147147
Use curl to query from within the node instance:

lib/starknet/lib/assets/setup-instance-store-volumes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [ -n "$DATA_VOLUME_ID" ]; then
1515
echo "Data volume formatted. Mounting..."
1616
echo "waiting for volume to get UUID"
1717
OUTPUT=0;
18-
while [ "$OUTPUT" = 0 ]; do
18+
while [ "$OUTPUT" = 0 ]; do
1919
DATA_VOLUME_UUID=$(lsblk -fn -o UUID $DATA_VOLUME_ID)
2020
OUTPUT=$(echo $DATA_VOLUME_UUID | grep -c - $2)
2121
echo $OUTPUT

lib/theta/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.js
2+
!jest.config.js
3+
*.d.ts
4+
node_modules
5+
*.lock
6+
7+
# CDK asset staging directory
8+
.cdk.staging
9+
cdk.out

lib/theta/README.md

Lines changed: 249 additions & 0 deletions
Large diffs are not rendered by default.

lib/theta/app.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import 'dotenv/config'
2+
import "source-map-support/register";
3+
import * as cdk from "aws-cdk-lib";
4+
import * as config from "./lib/config/edgeConfig";
5+
import * as configTypes from "./lib/config/edgeConfig.interface";
6+
import { EdgeCommonStack } from "./lib/common-stack";
7+
import { EdgeSingleNodeStack } from "./lib/single-node-stack";
8+
import * as nag from "cdk-nag";
9+
10+
const app = new cdk.App();
11+
cdk.Tags.of(app).add("Project", "AWS_THETA_EDGE");
12+
13+
new EdgeCommonStack(app, "theta-edge-common", {
14+
stackName: `theta-edge-nodes-common`,
15+
env: { account: config.baseConfig.accountId, region: config.baseConfig.region }
16+
});
17+
18+
new EdgeSingleNodeStack(app, "theta-edge-single-node", {
19+
stackName: `theta-edge-single-node-${config.baseNodeConfig.edgeNetwork}`,
20+
21+
env: { account: config.baseConfig.accountId, region: config.baseConfig.region },
22+
nodeRole: <configTypes.EdgeNodeRole> "single-node",
23+
instanceType: config.baseNodeConfig.instanceType,
24+
instanceCpuType: config.baseNodeConfig.instanceCpuType,
25+
edgeNetwork: config.baseNodeConfig.edgeNetwork,
26+
edgeNodeGpu: config.baseNodeConfig.edgeNodeGpu,
27+
edgeLauncherVersion: config.baseNodeConfig.edgeLauncherVersion,
28+
dataVolume: config.baseNodeConfig.dataVolume
29+
});
30+
31+
32+
// Security Check
33+
cdk.Aspects.of(app).add(
34+
new nag.AwsSolutionsChecks({
35+
verbose: false,
36+
reports: true,
37+
logIgnores: false
38+
})
39+
);

lib/theta/cdk.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"app": "npx ts-node --prefer-ts-exts app.ts",
3+
"watch": {
4+
"include": [
5+
"**"
6+
],
7+
"exclude": [
8+
"README.md",
9+
"cdk*.json",
10+
"**/*.d.ts",
11+
"**/*.js",
12+
"tsconfig.json",
13+
"package*.json",
14+
"yarn.lock",
15+
"node_modules",
16+
"test"
17+
]
18+
},
19+
"context": {
20+
"@aws-cdk/aws-lambda:recognizeLayerVersion": true,
21+
"@aws-cdk/core:checkSecretUsage": true,
22+
"@aws-cdk/core:target-partitions": [
23+
"aws",
24+
"aws-cn"
25+
],
26+
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
27+
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
28+
"@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true,
29+
"@aws-cdk/aws-iam:minimizePolicies": true,
30+
"@aws-cdk/core:validateSnapshotRemovalPolicy": true,
31+
"@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true,
32+
"@aws-cdk/aws-s3:createDefaultLoggingPolicy": true,
33+
"@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true,
34+
"@aws-cdk/aws-apigateway:disableCloudWatchRole": true,
35+
"@aws-cdk/core:enablePartitionLiterals": true,
36+
"@aws-cdk/aws-events:eventsTargetQueueSameAccount": true,
37+
"@aws-cdk/aws-iam:standardizedServicePrincipals": true,
38+
"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true,
39+
"@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true,
40+
"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true,
41+
"@aws-cdk/aws-route53-patters:useCertificate": true,
42+
"@aws-cdk/customresources:installLatestAwsSdkDefault": false,
43+
"@aws-cdk/aws-rds:databaseProxyUniqueResourceName": true,
44+
"@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": true,
45+
"@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": true,
46+
"@aws-cdk/aws-ec2:launchTemplateDefaultUserData": true,
47+
"@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": true,
48+
"@aws-cdk/aws-redshift:columnId": true,
49+
"@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true,
50+
"@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true,
51+
"@aws-cdk/aws-apigateway:requestValidatorUniqueId": true,
52+
"@aws-cdk/aws-kms:aliasNameRef": true,
53+
"@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": true,
54+
"@aws-cdk/core:includePrefixInUniqueNameGeneration": true,
55+
"@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": true
56+
}
57+
}

0 commit comments

Comments
 (0)