Fix AWS deployment (#1893)
This commit is contained in:
parent
75642cc2d6
commit
5fe118a68a
3 changed files with 494 additions and 677 deletions
|
|
@ -23,43 +23,57 @@ export class Rds extends Construct{
|
||||||
})
|
})
|
||||||
|
|
||||||
// DB クラスターのパラメータグループ作成
|
// DB クラスターのパラメータグループ作成
|
||||||
const clusterParameterGroup = new rds.ParameterGroup(scope, 'ClusterParameterGroup',{
|
const clusterParameterGroup = new rds.ParameterGroup(
|
||||||
engine: rds.DatabaseClusterEngine.auroraMysql({
|
scope,
|
||||||
version: rds.AuroraMysqlEngineVersion.VER_3_02_0
|
"ClusterParameterGroup",
|
||||||
}),
|
{
|
||||||
description: 'for-langflow',
|
engine: rds.DatabaseClusterEngine.auroraMysql({
|
||||||
})
|
version: rds.AuroraMysqlEngineVersion.of(
|
||||||
|
"8.0.mysql_aurora.3.05.2",
|
||||||
|
"8.0"
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
description: "for-langflow",
|
||||||
|
}
|
||||||
|
);
|
||||||
clusterParameterGroup.bindToCluster({})
|
clusterParameterGroup.bindToCluster({})
|
||||||
|
|
||||||
// DB インスタンスのパラメタグループ作成
|
// DB インスタンスのパラメタグループ作成
|
||||||
const instanceParameterGroup = new rds.ParameterGroup(scope, 'InstanceParameterGroup',{
|
const instanceParameterGroup = new rds.ParameterGroup(
|
||||||
engine: rds.DatabaseClusterEngine.auroraMysql({
|
scope,
|
||||||
version: rds.AuroraMysqlEngineVersion.VER_3_02_0,
|
"InstanceParameterGroup",
|
||||||
}),
|
{
|
||||||
description: 'for-langflow',
|
engine: rds.DatabaseClusterEngine.auroraMysql({
|
||||||
})
|
version: rds.AuroraMysqlEngineVersion.of("8.0.mysql_aurora.3.05.2", '8.0'),
|
||||||
|
}),
|
||||||
|
description: "for-langflow",
|
||||||
|
}
|
||||||
|
);
|
||||||
instanceParameterGroup.bindToInstance({})
|
instanceParameterGroup.bindToInstance({})
|
||||||
|
|
||||||
this.rdsCluster = new rds.DatabaseCluster(scope, 'LangflowDbCluster', {
|
this.rdsCluster = new rds.DatabaseCluster(scope, "LangflowDbCluster", {
|
||||||
engine: rds.DatabaseClusterEngine.auroraMysql({
|
engine: rds.DatabaseClusterEngine.auroraMysql({
|
||||||
version: rds.AuroraMysqlEngineVersion.VER_3_02_0,
|
version: rds.AuroraMysqlEngineVersion.of(
|
||||||
|
"8.0.mysql_aurora.3.05.2",
|
||||||
|
"8.0"
|
||||||
|
),
|
||||||
}),
|
}),
|
||||||
storageEncrypted: true,
|
storageEncrypted: true,
|
||||||
credentials: rdsCredentials,
|
credentials: rdsCredentials,
|
||||||
instanceIdentifierBase: 'langflow-instance',
|
instanceIdentifierBase: "langflow-instance",
|
||||||
vpc:vpc,
|
vpc: vpc,
|
||||||
vpcSubnets:vpc.selectSubnets({
|
vpcSubnets: vpc.selectSubnets({
|
||||||
subnetGroupName: 'langflow-Isolated',
|
subnetGroupName: "langflow-Isolated",
|
||||||
}),
|
}),
|
||||||
securityGroups:[dbSG],
|
securityGroups: [dbSG],
|
||||||
writer: rds.ClusterInstance.provisioned("WriterInstance", {
|
writer: rds.ClusterInstance.provisioned("WriterInstance", {
|
||||||
instanceType: instanceType,
|
instanceType: instanceType,
|
||||||
enablePerformanceInsights: true,
|
enablePerformanceInsights: true,
|
||||||
parameterGroup:instanceParameterGroup,
|
parameterGroup: instanceParameterGroup,
|
||||||
}),
|
}),
|
||||||
// 2台目以降はreaders:で設定
|
// 2台目以降はreaders:で設定
|
||||||
parameterGroup: clusterParameterGroup,
|
parameterGroup: clusterParameterGroup,
|
||||||
defaultDatabaseName: 'langflow',
|
defaultDatabaseName: "langflow",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1085
scripts/aws/package-lock.json
generated
1085
scripts/aws/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -11,21 +11,21 @@
|
||||||
"cdk": "cdk"
|
"cdk": "cdk"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.1",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/node": "20.1.7",
|
"@types/node": "^20.12.12",
|
||||||
"aws-cdk": "^2.86.0",
|
"aws-cdk": "^2.141.0",
|
||||||
"jest": "^29.5.0",
|
"jest": "^29.7.0",
|
||||||
"ts-jest": "^29.1.0",
|
"ts-jest": "^29.1.2",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.2",
|
||||||
"typescript": "~5.1.3"
|
"typescript": "^5.4.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-solutions-constructs/aws-cloudfront-s3": "^2.49.0",
|
"@aws-solutions-constructs/aws-cloudfront-s3": "^2.57.0",
|
||||||
"aws-cdk-lib": "^2.124.0",
|
"aws-cdk-lib": "^2.141.0",
|
||||||
"cdk-ecr-deployment": "^2.5.30",
|
"cdk-ecr-deployment": "^3.0.55",
|
||||||
"constructs": "^10.0.0",
|
"constructs": "^10.3.0",
|
||||||
"deploy-time-build": "^0.3.12",
|
"deploy-time-build": "^0.3.21",
|
||||||
"dotenv": "^16.3.1",
|
"dotenv": "^16.4.5",
|
||||||
"source-map-support": "^0.5.21"
|
"source-map-support": "^0.5.21"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue