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 クラスターのパラメータグループ作成
|
||||
const clusterParameterGroup = new rds.ParameterGroup(scope, 'ClusterParameterGroup',{
|
||||
engine: rds.DatabaseClusterEngine.auroraMysql({
|
||||
version: rds.AuroraMysqlEngineVersion.VER_3_02_0
|
||||
}),
|
||||
description: 'for-langflow',
|
||||
})
|
||||
const clusterParameterGroup = new rds.ParameterGroup(
|
||||
scope,
|
||||
"ClusterParameterGroup",
|
||||
{
|
||||
engine: rds.DatabaseClusterEngine.auroraMysql({
|
||||
version: rds.AuroraMysqlEngineVersion.of(
|
||||
"8.0.mysql_aurora.3.05.2",
|
||||
"8.0"
|
||||
),
|
||||
}),
|
||||
description: "for-langflow",
|
||||
}
|
||||
);
|
||||
clusterParameterGroup.bindToCluster({})
|
||||
|
||||
// DB インスタンスのパラメタグループ作成
|
||||
const instanceParameterGroup = new rds.ParameterGroup(scope, 'InstanceParameterGroup',{
|
||||
engine: rds.DatabaseClusterEngine.auroraMysql({
|
||||
version: rds.AuroraMysqlEngineVersion.VER_3_02_0,
|
||||
}),
|
||||
description: 'for-langflow',
|
||||
})
|
||||
const instanceParameterGroup = new rds.ParameterGroup(
|
||||
scope,
|
||||
"InstanceParameterGroup",
|
||||
{
|
||||
engine: rds.DatabaseClusterEngine.auroraMysql({
|
||||
version: rds.AuroraMysqlEngineVersion.of("8.0.mysql_aurora.3.05.2", '8.0'),
|
||||
}),
|
||||
description: "for-langflow",
|
||||
}
|
||||
);
|
||||
instanceParameterGroup.bindToInstance({})
|
||||
|
||||
this.rdsCluster = new rds.DatabaseCluster(scope, 'LangflowDbCluster', {
|
||||
this.rdsCluster = new rds.DatabaseCluster(scope, "LangflowDbCluster", {
|
||||
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,
|
||||
credentials: rdsCredentials,
|
||||
instanceIdentifierBase: 'langflow-instance',
|
||||
vpc:vpc,
|
||||
vpcSubnets:vpc.selectSubnets({
|
||||
subnetGroupName: 'langflow-Isolated',
|
||||
instanceIdentifierBase: "langflow-instance",
|
||||
vpc: vpc,
|
||||
vpcSubnets: vpc.selectSubnets({
|
||||
subnetGroupName: "langflow-Isolated",
|
||||
}),
|
||||
securityGroups:[dbSG],
|
||||
securityGroups: [dbSG],
|
||||
writer: rds.ClusterInstance.provisioned("WriterInstance", {
|
||||
instanceType: instanceType,
|
||||
enablePerformanceInsights: true,
|
||||
parameterGroup:instanceParameterGroup,
|
||||
parameterGroup: instanceParameterGroup,
|
||||
}),
|
||||
// 2台目以降はreaders:で設定
|
||||
// 2台目以降はreaders:で設定
|
||||
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"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.1",
|
||||
"@types/node": "20.1.7",
|
||||
"aws-cdk": "^2.86.0",
|
||||
"jest": "^29.5.0",
|
||||
"ts-jest": "^29.1.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "~5.1.3"
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/node": "^20.12.12",
|
||||
"aws-cdk": "^2.141.0",
|
||||
"jest": "^29.7.0",
|
||||
"ts-jest": "^29.1.2",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-solutions-constructs/aws-cloudfront-s3": "^2.49.0",
|
||||
"aws-cdk-lib": "^2.124.0",
|
||||
"cdk-ecr-deployment": "^2.5.30",
|
||||
"constructs": "^10.0.0",
|
||||
"deploy-time-build": "^0.3.12",
|
||||
"dotenv": "^16.3.1",
|
||||
"@aws-solutions-constructs/aws-cloudfront-s3": "^2.57.0",
|
||||
"aws-cdk-lib": "^2.141.0",
|
||||
"cdk-ecr-deployment": "^3.0.55",
|
||||
"constructs": "^10.3.0",
|
||||
"deploy-time-build": "^0.3.21",
|
||||
"dotenv": "^16.4.5",
|
||||
"source-map-support": "^0.5.21"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue