Skip to content

Commit

Permalink
CC-2554: Added the 'test' environment'; added 'count' to the Conc ins…
Browse files Browse the repository at this point in the history
…tance.
  • Loading branch information
mmgovuk committed May 7, 2024
1 parent fa49f33 commit 400f575
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 7 deletions.
113 changes: 113 additions & 0 deletions terraform/environments/ccms-ebs-upgrade/application_variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"lz_domain_name": "*.dev.legalservices.gov.uk",
"mp_aws_subnet_env": "10.200.0.0/20",
"ebs_default_iops": 12000,
"conc_no_instances": 1,
"webgate_no_instances": 2,
"webgate_default_iops": 3000,
"webgate_u01_size": 100,
Expand Down Expand Up @@ -110,6 +111,118 @@
"instance_role_ebsconc": "conc",
"instance_role_ebsdb": "db",
"instance_role_webgate": "webgate"
},
"test": {
"short_env": "test",
"dns": "laa-test",
"ses_domain_identity": "uat.legalservices.gov.uk",
"instance-scheduling-accessgate": "skip-scheduling",
"instance-scheduling-ebsapps": "skip-scheduling",
"instance-scheduling-ebsconc": "skip-scheduling",
"instance-scheduling-ebsdb": "skip-scheduling",
"instance-scheduling-webgate": "skip-scheduling",
"ec2_oracle_instance_type_ebsdb_test": "x2iedn.8xlarge",
"ec2_oracle_instance_type_ebsdb": "m5d.4xlarge",
"ec2_oracle_instance_cores_ebsdb": "8",
"ec2_oracle_instance_threads_ebsdb": "2",
"ec2_oracle_instance_type_ebsconc": "m5d.4xlarge",
"ec2_oracle_instance_cores_ebsconc": "8",
"ec2_oracle_instance_threads_ebsconc": "2",
"ec2_oracle_instance_type_ebsapps": "m5d.2xlarge",
"ec2_oracle_instance_cores_ebsapps": "4",
"ec2_oracle_instance_threads_ebsapps": "2",
"ec2_oracle_instance_type_webgate": "m5d.large",
"ec2_oracle_instance_cores_webgate": "1",
"ec2_oracle_instance_threads_webgate": "2",
"ec2_oracle_instance_type_accessgate": "m5d.xlarge",
"ec2_oracle_instance_cores_accessgate": "2",
"ec2_oracle_instance_threads_accessgate": "2",
"ami_owner": "self",
"ec2_instance_type_ftp": "c5d.large",
"ftp_ami_id": "ami-09f731dab809ea9df",
"ec2_instance_type_clamav": "c5d.large",
"clamav_ami_id": "ami-02cb9c4732e6429dd",
"ebsdb_ami_id": "ami-0818f8a82ef82ba82",
"ebsconc_ami_id": "ami-0d4b266f7ae87bbfc",
"ebsapps_ami_id-1": "ami-0e59f95d18d791952",
"ebsapps_ami_id-2": "ami-01a3709f4e740768f",
"accessgate_ami_id-1": "ami-0aa28dfb61946e273",
"accessgate_ami_id-2": "ami-0e42994dea7fb4b17",
"webgate_ami_id-1": "ami-093ff7dd6a93cfbde",
"webgate_ami_id-2": "ami-046490c755aa93fc5",
"restored_db_image": "ami-0df5f31cae1c86635",
"orace_base_prereqs_ami_name": "Oracle79-prereqs-v2_0",
"orace_db_ami_name": "Oracle79-prereqs-v1_8",
"orace_db_dr_ami_name": "EBSDB-DR-test",
"webgate_ami_name": "ebs-webgate-v2_0",
"accessgate_ami_name": "ebs-accessgate-v2_0",
"ec2_instance_type_mailrelay": "c4.large",
"mailrelay_ami_id": "ami-02654187c4eaddcc0",
"key_name": "",
"lz_aws_account_id_env": "140455166311",
"lz_aws_subnet_env": "10.204.0.0/14",
"lz_aws_workspace_nonprod_subnet_env": "10.200.0.0/20",
"lz_aws_workspace_prod_subnet_env": "10.200.16.0/20",
"lz_aws_workspace_nonprod_prod": "10.200.0.0/19",
"lz_aws_appstream_subnet_a_b": "10.200.32.0/23",
"cloud_platform_subnet": "172.20.0.0/16",
"lz_ftp_bucket_environment": "uat",
"lz_domain_name": "*.uat.legalservices.gov.uk",
"mp_aws_subnet_env": "10.200.0.0/20",
"ebs_default_iops": 12000,
"conc_no_instances": 0,
"webgate_no_instances": 2,
"webgate_default_iops": 3000,
"webgate_u01_size": 100,
"webgate_dns_prefix": "wgatetst",
"accessgate_no_instances": 2,
"accessgate_default_iops": 3000,
"accessgate_u01_size": 150,
"accessgate_dns_prefix": "agatetst",
"ebsapps_no_instances": 2,
"ebsapps_default_iops": 3000,
"ebsapps_exhome_size": 100,
"ebsapps_u01_size": 200,
"ebsapps_u03_size": 200,
"ebsapps_stage_size": 100,
"tg_apps_port": 8000,
"ebs_iops_ebsdb_swap": 3000,
"ebs_size_ebsdb_swap": 20,
"ebs_size_ebsdb_home": 100,
"ebs_size_ebsdb_temp": 100,
"ebs_size_ebsdb_exhome": 100,
"ebs_size_ebsdb_u01": 300,
"ebs_size_ebsdb_arch": 500,
"ebs_size_ebsdb_dbf": 11000,
"ebs_size_ebsdb_dbf_dr": 8000,
"ebs_iops_ebsdb_dbf01": 12000,
"ebs_size_ebsdb_dbf01": 4000,
"ebs_iops_ebsdb_dbf02": 12000,
"ebs_size_ebsdb_dbf02": 4000,
"ebs_iops_ebsdb_dbf03": 12000,
"ebs_size_ebsdb_dbf03": 3000,
"ebs_size_ebsdb_redoA": 100,
"ebs_size_ebsdb_redoB": 50,
"ebs_size_ebsdb_techst": 100,
"ebs_size_ebsdb_backup": 8000,
"ebs_size_ebsdb_diag": 50,
"ebs_size_ebsdb_appshare": 100,
"ebs_default_iops_test": 9000,
"dbf_device": "nvme5n1",
"dbf_path": "/CCMS/EBS/dbf",
"ebs_type_ebsdb_backup": "gp3",
"ebs_size_ebsconc_exhome": 100,
"ebs_size_ebsconc_u01": 200,
"ebs_size_ebsconc_u03": 200,
"ebs_size_ebsconc_home": 100,
"ebs_size_ebsconc_stage": 100,
"ebs_size_ebsconc_temp": 100,
"ebs_backup_snapshot_id": "snap-0cdfe4b46c1e34ebb",
"instance_role_accessgate": "accessgate",
"instance_role_ebsapps": "apps",
"instance_role_ebsconc": "conc",
"instance_role_ebsdb": "db",
"instance_role_webgate": "webgate"
}
},
"webgate_ebs": {
Expand Down
15 changes: 8 additions & 7 deletions terraform/environments/ccms-ebs-upgrade/ec2-oracle_ebs_conc.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
resource "aws_instance" "ec2_oracle_conc" {
count = local.application_data.accounts[local.environment].conc_no_instances
instance_type = local.application_data.accounts[local.environment].ec2_oracle_instance_type_ebsconc
ami = local.application_data.accounts[local.environment].ebsconc_ami_id
key_name = local.application_data.accounts[local.environment].key_name
Expand Down Expand Up @@ -65,7 +66,7 @@ resource "aws_ebs_volume" "conc_export_home" {
resource "aws_volume_attachment" "conc_export_home_att" {
device_name = "/dev/sdh"
volume_id = aws_ebs_volume.conc_export_home.id
instance_id = aws_instance.ec2_oracle_conc.id
instance_id = aws_instance.ec2_oracle_conc[count.index].id
}

resource "aws_ebs_volume" "conc_u01" {
Expand All @@ -87,7 +88,7 @@ resource "aws_ebs_volume" "conc_u01" {
resource "aws_volume_attachment" "conc_u01_att" {
device_name = "/dev/sdi"
volume_id = aws_ebs_volume.conc_u01.id
instance_id = aws_instance.ec2_oracle_conc.id
instance_id = aws_instance.ec2_oracle_conc[count.index].id
}

resource "aws_ebs_volume" "conc_u03" {
Expand All @@ -109,7 +110,7 @@ resource "aws_ebs_volume" "conc_u03" {
resource "aws_volume_attachment" "conc_u03_att" {
device_name = "/dev/sdj"
volume_id = aws_ebs_volume.conc_u03.id
instance_id = aws_instance.ec2_oracle_conc.id
instance_id = aws_instance.ec2_oracle_conc[count.index].id
}

resource "aws_ebs_volume" "conc_home" {
Expand All @@ -131,7 +132,7 @@ resource "aws_ebs_volume" "conc_home" {
resource "aws_volume_attachment" "conc_home_att" {
device_name = "/dev/sdk"
volume_id = aws_ebs_volume.conc_home.id
instance_id = aws_instance.ec2_oracle_conc.id
instance_id = aws_instance.ec2_oracle_conc[count.index].id
}

resource "aws_ebs_volume" "conc_stage" {
Expand All @@ -153,7 +154,7 @@ resource "aws_ebs_volume" "conc_stage" {
resource "aws_volume_attachment" "conc_stage_att" {
device_name = "/dev/sdl"
volume_id = aws_ebs_volume.conc_stage.id
instance_id = aws_instance.ec2_oracle_conc.id
instance_id = aws_instance.ec2_oracle_conc[count.index].id
}

resource "aws_ebs_volume" "conc_temp" {
Expand All @@ -175,7 +176,7 @@ resource "aws_ebs_volume" "conc_temp" {
resource "aws_volume_attachment" "conc_temp_att" {
device_name = "/dev/sdm"
volume_id = aws_ebs_volume.conc_temp.id
instance_id = aws_instance.ec2_oracle_conc.id
instance_id = aws_instance.ec2_oracle_conc[count.index].id
}


Expand All @@ -187,7 +188,7 @@ resource "aws_volume_attachment" "appshare_conc_att" {
]
device_name = "/dev/sdq"
volume_id = aws_ebs_volume.appshare.id
instance_id = aws_instance.ec2_oracle_conc.id
instance_id = aws_instance.ec2_oracle_conc[count.index].id
}

module "cw-conc-ec2" {
Expand Down

0 comments on commit 400f575

Please sign in to comment.