Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nit 927 delius db standby db required #3944

Merged
merged 16 commits into from
Nov 13, 2023
143 changes: 126 additions & 17 deletions terraform/environments/delius-core/locals_development_dev1.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ locals {
efs_datasync_destination_arn = module.environment_test[0].ldap_efs_location
}

db_config_dev = {
name = try(local.db_config_lower_environments.name, "db")
db_config_dev = [{
name = "standby-db"
ami_name_regex = local.db_config_lower_environments.ami_name_regex
user_data_raw = base64encode(
templatefile(
Expand All @@ -47,10 +47,13 @@ locals {
}
)
)
instance = merge(local.db_config_lower_environments.instance, {
instance_type = "r6i.xlarge"
monitoring = false
})

instance = {
instance_type = "r6i.xlarge"
monitoring = false
vpc_security_group_ids = []
disable_api_termination = true
}

ebs_volumes = {
kms_key_id = data.aws_kms_key.ebs_shared.arn
Expand All @@ -62,39 +65,54 @@ locals {
volume_size = 30
}
ebs_non_root_volumes = {
"/dev/sdb" = { # /u01 oracle app disk
"/dev/sdb" = {
# /u01 oracle app disk
volume_type = "gp3"
volume_size = 200
no_device = false
}
"/dev/sdc" = { # /u02 oracle app disk
"/dev/sdc" = {
# /u02 oracle app disk
volume_type = "gp3"
volume_size = 100
no_device = false
}
"/dev/sds" = { # swap disk
"/dev/sds" = {
# swap disk
volume_type = "gp3"
volume_size = 4
no_device = false
}
"/dev/sde" = { # oracle asm disk DATA01
"/dev/sde" = {
# oracle asm disk DATA01
volume_type = "gp3"
volume_size = 500
no_device = false
}
"/dev/sdf" = { # oracle asm disk DATA02
"/dev/sdf" = {
# oracle asm disk DATA02
no_device = true
}
"/dev/sdg" = { # oracle asm disk DATA03
"/dev/sdg" = {
# oracle asm disk DATA03
no_device = true
}
"/dev/sdh" = { # oracle asm disk DATA04
"/dev/sdh" = {
# oracle asm disk DATA04
no_device = true
}
"/dev/sdi" = { # oracle asm disk DATA05
"/dev/sdi" = {
# oracle asm disk DATA05
no_device = true
}
"/dev/sdj" = { # oracle asm disk FLASH01
"/dev/sdj" = {
# oracle asm disk FLASH01
volume_type = "gp3"
volume_size = 500
no_device = false
}
"/dev/sdk" = { # oracle asm disk FLASH02
"/dev/sdk" = {
# oracle asm disk FLASH02
no_device = true
}
}
Expand All @@ -103,7 +121,98 @@ locals {
create_internal_record = true
create_external_record = false
}
}
},
{
name = "primary-db"
ami_name_regex = local.db_config_lower_environments.ami_name_regex
user_data_raw = base64encode(
templatefile(
"${path.module}/templates/userdata.sh.tftpl",
{
branch = local.db_config.user_data_param.branch
ansible_repo = local.db_config.user_data_param.ansible_repo
ansible_repo_basedir = local.db_config.user_data_param.ansible_repo_basedir
ansible_args = local.db_config.user_data_param.ansible_args
}
)
)

instance = {
instance_type = "r6i.xlarge"
monitoring = false
vpc_security_group_ids = []
disable_api_termination = true
}

ebs_volumes = {
kms_key_id = data.aws_kms_key.ebs_shared.arn
tags = local.tags
iops = 3000
throughput = 125
root_volume = {
volume_type = "gp3"
volume_size = 30
no_device = false
}
ebs_non_root_volumes = {
"/dev/sdb" = {
# /u01 oracle app disk
volume_type = "gp3"
volume_size = 200
no_device = false
}
"/dev/sdc" = {
# /u02 oracle app disk
volume_type = "gp3"
volume_size = 100
no_device = false
}
"/dev/sds" = {
# swap disk
volume_type = "gp3"
volume_size = 4
no_device = false
}
"/dev/sde" = {
# oracle asm disk DATA01
volume_type = "gp3"
volume_size = 500
no_device = false
}
"/dev/sdf" = {
# oracle asm disk DATA02
no_device = true
}
"/dev/sdg" = {
# oracle asm disk DATA03
no_device = true
}
"/dev/sdh" = {
# oracle asm disk DATA04
no_device = true
}
"/dev/sdi" = {
# oracle asm disk DATA05
no_device = true
}
"/dev/sdj" = {
# oracle asm disk FLASH01
volume_type = "gp3"
volume_size = 500
no_device = false
}
"/dev/sdk" = {
# oracle asm disk FLASH02
no_device = true
}
}
}
route53_records = {
create_internal_record = true
create_external_record = false
}
}
]

weblogic_config_dev = {
name = try(local.weblogic_config_lower_environments.name, "weblogic")
Expand Down
54 changes: 37 additions & 17 deletions terraform/environments/delius-core/locals_development_test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ locals {
efs_datasync_destination_arn = null
}

db_config_test = {
name = try(local.db_config_lower_environments.name, "db")
db_config_test = [{
name = "primary-db"
ami_name_regex = local.db_config_lower_environments.ami_name_regex
user_data_raw = base64encode(
templatefile(
Expand All @@ -47,10 +47,13 @@ locals {
}
)
)
instance = merge(local.db_config_lower_environments.instance, {
instance_type = "r6i.xlarge"
monitoring = false
})

instance = {
instance_type = "r6i.xlarge"
monitoring = false
vpc_security_group_ids = []
disable_api_termination = true
}

ebs_volumes = {
kms_key_id = data.aws_kms_key.ebs_shared.arn
Expand All @@ -60,41 +63,57 @@ locals {
root_volume = {
volume_type = "gp3"
volume_size = 30
no_device = false
}
ebs_non_root_volumes = {
"/dev/sdb" = { # /u01 oracle app disk
"/dev/sdb" = {
# /u01 oracle app disk
volume_type = "gp3"
volume_size = 200
no_device = false
}
"/dev/sdc" = { # /u02 oracle app disk
"/dev/sdc" = {
# /u02 oracle app disk
volume_type = "gp3"
volume_size = 100
no_device = false
}
"/dev/sds" = { # swap disk
"/dev/sds" = {
# swap disk
volume_type = "gp3"
volume_size = 4
no_device = false
}
"/dev/sde" = { # oracle asm disk DATA01
"/dev/sde" = {
# oracle asm disk DATA01
volume_type = "gp3"
volume_size = 500
no_device = false
}
"/dev/sdf" = { # oracle asm disk DATA02
"/dev/sdf" = {
# oracle asm disk DATA02
no_device = true
}
"/dev/sdg" = { # oracle asm disk DATA03
"/dev/sdg" = {
# oracle asm disk DATA03
no_device = true
}
"/dev/sdh" = { # oracle asm disk DATA04
"/dev/sdh" = {
# oracle asm disk DATA04
no_device = true
}
"/dev/sdi" = { # oracle asm disk DATA05
"/dev/sdi" = {
# oracle asm disk DATA05
no_device = true
}
"/dev/sdj" = { # oracle asm disk FLASH01
"/dev/sdj" = {
# oracle asm disk FLASH01
volume_type = "gp3"
volume_size = 500
no_device = false
}
"/dev/sdk" = { # oracle asm disk FLASH02
"/dev/sdk" = {
# oracle asm disk FLASH02
no_device = true
}
}
Expand All @@ -103,7 +122,8 @@ locals {
create_internal_record = true
create_external_record = false
}
}
}
]

weblogic_config_test = {
name = try(local.weblogic_config_lower_environments.name, "weblogic")
Expand Down
Loading
Loading