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",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue