Skip to content

Commit

Permalink
Merge pull request #9241 from ministryofjustice/oasys-san-test
Browse files Browse the repository at this point in the history
oasys san test
  • Loading branch information
wullub authored Jan 8, 2025
2 parents 5630b8b + c32c13a commit 2221e67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 125 deletions.
99 changes: 7 additions & 92 deletions terraform/environments/oasys/locals_test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ locals {
t2-oasys-web-b = merge(local.ec2_autoscaling_groups.web, {
# For SAN project (OASYS replacement) requested by Howard Smith
# Autoscaling disabled as initially server will be configured manually
autoscaling_group = merge(local.ec2_autoscaling_groups.web.autoscaling_group, {
desired_capacity = 1 # setting to 0 leaves in a stopped state because of the warm_pool config below
warm_pool = {
min_size = 0
reuse_on_scale_in = true
}
})
config = merge(local.ec2_autoscaling_groups.web.config, {
ami_name = "oasys_webserver_release_*"
availability_zone = "eu-west-2b"
Expand All @@ -111,66 +118,6 @@ locals {
oracle-db-sid = "T2OASYS2"
})
})
# t2-oasys-web-c = merge(local.ec2_autoscaling_groups.web, {
# # For SAN project (OASYS replacement) requested by Howard Smith
# autoscaling_group = merge(local.ec2_autoscaling_groups.web.autoscaling_group, {
# warm_pool = {
# min_size = 0
# reuse_on_scale_in = true
# }
# })
# config = merge(local.ec2_autoscaling_groups.web.config, {
# ami_name = "oasys_webserver_release_*"
# availability_zone = "eu-west-2b"
# iam_resource_names_prefix = "ec2-web-t2"
# instance_profile_policies = concat(local.ec2_autoscaling_groups.web.config.instance_profile_policies, [
# "Ec2T2WebPolicy",
# ])
# })
# user_data_cloud_init = merge(local.ec2_autoscaling_groups.web.user_data_cloud_init, {
# args = merge(local.ec2_autoscaling_groups.web.user_data_cloud_init.args, {
# branch = "main"
# })
# })
# tags = merge(local.ec2_autoscaling_groups.web.tags, {
# description = "t2 oasys web"
# oasys-environment = "t2"
# oracle-db-hostname = "db.t2.oasys.hmpps-test.modernisation-platform.internal"
# oracle-db-sid = "T2OASYS2"
# })
# })
# t2-oasys-san-web-a = merge(local.ec2_autoscaling_groups.web, {
# # For SAN project (OASYS replacement) requested by Howard Smith
# # Autoscaling disabled as initially server will be configured manually
# autoscaling_group = {
# desired_capacity = 1
# max_size = 1
# force_delete = true
# vpc_zone_identifier = module.environment.subnets["private"].ids
# wait_for_capacity_timeout = 60m
# warm_pool = {
# min_size = 0
# max_group_prepared_capacity = 1
# reuse_on_scale_in = true
# }
# }
# config = merge(local.ec2_autoscaling_groups.web.config, {
# ami_name = "OASys San Test"
# availability_zone = "eu-west-2a"
# iam_resource_names_prefix = "ec2-web-t2"
# instance_profile_policies = concat(local.ec2_autoscaling_groups.web.config.instance_profile_policies, [
# "Ec2T2WebPolicy",
# ])
# })
# user_data_cloud_init = {
# }
# tags = merge(local.ec2_autoscaling_groups.web.tags, {
# description = "t2 oasys web"
# oasys-environment = "t2"
# oracle-db-hostname = "db.t2.oasys.hmpps-test.modernisation-platform.internal"
# oracle-db-sid = "T2OASYS2"
# })
# })
}

ec2_instances = {
Expand Down Expand Up @@ -440,22 +387,6 @@ locals {
}
]
}
# t2-web-c-http-8080 = {
# priority = 160
# actions = [{
# type = "forward"
# target_group_name = "t2-oasys-web-c-pb-http-8080"
# }]
# conditions = [
# {
# host_header = {
# values = [
# "t2-c.oasys.service.justice.gov.uk",
# ]
# }
# }
# ]
# }
t1-web-http-8080 = {
priority = 300
actions = [{
Expand Down Expand Up @@ -519,22 +450,6 @@ locals {
}
]
}
# t2-web-c-http-8080 = {
# priority = 160
# actions = [{
# type = "forward"
# target_group_name = "t2-oasys-web-c-pv-http-8080"
# }]
# conditions = [
# {
# host_header = {
# values = [
# "t2-c-int.oasys.service.justice.gov.uk",
# ]
# }
# }
# ]
# }
t1-web-http-8080 = {
priority = 300
actions = [{
Expand Down
33 changes: 0 additions & 33 deletions terraform/environments/oasys/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -218,36 +218,3 @@ module "baseline" {
lookup(local.baseline_environment_specific, "ssm_parameters", {}),
)
}

# resource "aws_ami" "oasys_san_test" {
# name = "OASys San Test"
# description = "OASys SAN Test backup ami"
# virtualization_type = "hvm"
# root_device_name = "/dev/sda1"
# ebs_block_device {
# delete_on_termination = false
# device_name = "/dev/sda1"
# snapshot_id = "snap-0eefca38cbebc9289"
# }
# ebs_block_device {
# delete_on_termination = false
# device_name = "/dev/sda2"
# snapshot_id = "snap-073b980c752b70d71"
# }
# ebs_block_device {
# delete_on_termination = false
# device_name = "/dev/sdb"
# snapshot_id = "snap-0ccf326230b3def99"
# }
# ebs_block_device {
# delete_on_termination = false
# device_name = "/dev/sdc"
# snapshot_id = "snap-05dcf8714290d64d1"
# }
# tags = merge(
# local.tags,
# {
# Name = "oasys san test"
# },
# )
# }

0 comments on commit 2221e67

Please sign in to comment.