From 54dc0b38fff9a1d99d8ff89219f8076b60eabeee Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 15 Dec 2023 18:09:26 +0100 Subject: [PATCH 1/5] Created Dataminer plan --- openstack-tf/d4s-production/dataminer/main.tf | 45 +++++++++++++++++++ .../d4s-production/dataminer/provider.tf | 3 ++ .../modules/common_variables/variables.tf | 2 + 3 files changed, 50 insertions(+) create mode 100644 openstack-tf/d4s-production/dataminer/main.tf create mode 100644 openstack-tf/d4s-production/dataminer/provider.tf diff --git a/openstack-tf/d4s-production/dataminer/main.tf b/openstack-tf/d4s-production/dataminer/main.tf new file mode 100644 index 00000000..13db7f67 --- /dev/null +++ b/openstack-tf/d4s-production/dataminer/main.tf @@ -0,0 +1,45 @@ +# Define required providers +terraform { + required_version = ">= 0.14.0" + required_providers { + openstack = { + source = "terraform-provider-openstack/openstack" + version = "~> 1.53.0" + } + } +} + +data "terraform_remote_state" "privnet_dns_router" { + backend = "local" + + config = { + path = "../project-setup/terraform.tfstate" + } +} +# +# Uses common_variables as module +# +module "common_variables" { + source = "../../modules/common_variables" +} + +module "instance_with_data_volume" { + source = "../../modules/instance_with_data_volume" + + instances_with_data_volume_map = { + dataminer_1_proto_1804 = { + name = "dataminer1-proto-1804", + description = "This instance serves geonetwork service", + flavor = module.common_variables.flavor_list.m1_xxl, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_1_proto_1804_data_volume", + size = "80", + device = "/dev/vdb" + } + } + } +} diff --git a/openstack-tf/d4s-production/dataminer/provider.tf b/openstack-tf/d4s-production/dataminer/provider.tf new file mode 100644 index 00000000..ca8de747 --- /dev/null +++ b/openstack-tf/d4s-production/dataminer/provider.tf @@ -0,0 +1,3 @@ +provider "openstack" { + cloud = "d4s-production" +} diff --git a/openstack-tf/modules/common_variables/variables.tf b/openstack-tf/modules/common_variables/variables.tf index 1d9cb9f3..03c2d603 100644 --- a/openstack-tf/modules/common_variables/variables.tf +++ b/openstack-tf/modules/common_variables/variables.tf @@ -189,9 +189,11 @@ variable "flavor_list" { m1_medium = "m1.medium" #RAM 4 - VCPUs 2 m1_large = "m1.large" #RAM 8 - VCPUs 4 m1_xlarge = "m1.xlarge" #RAM 16 - VCPUs 8 + m1_xxl = "m1.xxl" #RAM 32 - VCPUS 16 m2_small = "m2.small" #RAM 8 - VCPUs 2 m2_medium = "m2.medium" #RAM 16 - VCPUs 4 m2_large = "m2.large" #RAM 32 - VCPUs 8 + m3_large = "m3.large" #RAM 64 - VCPUs 16 } } From e55b16404d50d6eb0a7ba923abf1e9155bd0a3bf Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 15 Dec 2023 18:12:22 +0100 Subject: [PATCH 2/5] Created DataMiner plan --- openstack-tf/d4s-production/dataminer/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack-tf/d4s-production/dataminer/main.tf b/openstack-tf/d4s-production/dataminer/main.tf index 13db7f67..bade3e9e 100644 --- a/openstack-tf/d4s-production/dataminer/main.tf +++ b/openstack-tf/d4s-production/dataminer/main.tf @@ -29,7 +29,7 @@ module "instance_with_data_volume" { instances_with_data_volume_map = { dataminer_1_proto_1804 = { name = "dataminer1-proto-1804", - description = "This instance serves geonetwork service", + description = "This instance is a DataMiner service", flavor = module.common_variables.flavor_list.m1_xxl, networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], From 9e650137303ff1eb774b34008ee57cfe586ed801 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 15 Dec 2023 18:30:06 +0100 Subject: [PATCH 3/5] Created DataMiner Plan --- openstack-tf/d4s-production/dataminer/main.tf | 154 ++++++++++++++++++ .../modules/common_variables/variables.tf | 1 + 2 files changed, 155 insertions(+) diff --git a/openstack-tf/d4s-production/dataminer/main.tf b/openstack-tf/d4s-production/dataminer/main.tf index bade3e9e..e281edae 100644 --- a/openstack-tf/d4s-production/dataminer/main.tf +++ b/openstack-tf/d4s-production/dataminer/main.tf @@ -40,6 +40,160 @@ module "instance_with_data_volume" { size = "80", device = "/dev/vdb" } + }, + dataminer_2_proto_1804 = { + name = "dataminer2-proto-1804", + description = "This instance is a DataMiner service", + flavor = module.common_variables.flavor_list.m1_xxl, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_2_proto_1804_data_volume", + size = "80", + device = "/dev/vdb" + } + }, + dataminer_3_proto_1804 = { + name = "dataminer3-proto-1804", + description = "This instance is a DataMiner service", + flavor = module.common_variables.flavor_list.m1_xxl, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_3_proto_1804_data_volume", + size = "80", + device = "/dev/vdb" + } + }, + dataminer_4_proto_1804 = { + name = "dataminer4-proto-1804", + description = "This instance is a DataMiner service", + flavor = module.common_variables.flavor_list.m1_xxl, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_4_proto_1804_data_volume", + size = "80", + device = "/dev/vdb" + } + }, + dataminer_5_proto_1804 = { + name = "dataminer5-proto-1804", + description = "This instance is a DataMiner service", + flavor = module.common_variables.flavor_list.m1_xxl, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_5_proto_1804_data_volume", + size = "80", + device = "/dev/vdb" + } + }, + dataminer_6_proto_1804 = { + name = "dataminer6-proto-1804", + description = "This instance is a DataMiner service", + flavor = module.common_variables.flavor_list.m1_xxl, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_6_proto_1804_data_volume", + size = "80", + device = "/dev/vdb" + } + }, + dataminer_7_proto_1804 = { + name = "dataminer7-proto-1804", + description = "This instance is a DataMiner service", + flavor = module.common_variables.flavor_list.m1_xxl, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_7_proto_1804_data_volume", + size = "80", + device = "/dev/vdb" + } + }, + dataminer_8_proto_1804 = { + name = "dataminer8-proto-1804", + description = "This instance is a DataMiner service", + flavor = module.common_variables.flavor_list.m1_xxl, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_8_proto_1804_data_volume", + size = "80", + device = "/dev/vdb" + } + }, + dataminer_2_gw_proto_1804 = { + name = "dataminer2-gw-proto-1804", + description = "This instance is a DataMiner service", + flavor = module.common_variables.flavor_list.c2_large, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_2_gw_proto_1804_data_volume", + size = "40", + device = "/dev/vdb" + } + }, + dataminer_3_gw_proto_1804 = { + name = "dataminer3-gw-proto-1804", + description = "This instance is a DataMiner service", + flavor = module.common_variables.flavor_list.c2_large, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_3_gw_proto_1804_data_volume", + size = "40", + device = "/dev/vdb" + } + }, + dataminer_4_gw_proto_1804 = { + name = "dataminer4-gw-proto-1804", + description = "This instance is a DataMiner service", + flavor = module.common_variables.flavor_list.c2_large, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_4_gw_proto_1804_data_volume", + size = "40", + device = "/dev/vdb" + } + }, + dataminer_5_gw_proto_1804 = { + name = "dataminer5-gw-proto-1804", + description = "This instance is a DataMiner service", + flavor = module.common_variables.flavor_list.c2_large, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_5_gw_proto_1804_data_volume", + size = "40", + device = "/dev/vdb" + } } } } diff --git a/openstack-tf/modules/common_variables/variables.tf b/openstack-tf/modules/common_variables/variables.tf index 03c2d603..2fb96ba8 100644 --- a/openstack-tf/modules/common_variables/variables.tf +++ b/openstack-tf/modules/common_variables/variables.tf @@ -186,6 +186,7 @@ variable "flavor_list" { c1_small = "c1.small" #RAM 2 - VCPUs 2 c1_medium = "c1.medium" #RAM 4 - VCPUs 4 c1_large = "c1.large" #RAM 8 - VCPUs 8 + c2_large = "c2.large" #RAM 16 -VCPUs 16 m1_medium = "m1.medium" #RAM 4 - VCPUs 2 m1_large = "m1.large" #RAM 8 - VCPUs 4 m1_xlarge = "m1.xlarge" #RAM 16 - VCPUs 8 From a1dfe6020bafb4be313d32fa4dded859cda2ffd0 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Mon, 18 Dec 2023 11:00:39 +0100 Subject: [PATCH 4/5] Created DataMiner plan --- openstack-tf/d4s-production/dataminer/main.tf | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/openstack-tf/d4s-production/dataminer/main.tf b/openstack-tf/d4s-production/dataminer/main.tf index e281edae..6bd9847a 100644 --- a/openstack-tf/d4s-production/dataminer/main.tf +++ b/openstack-tf/d4s-production/dataminer/main.tf @@ -27,6 +27,34 @@ module "instance_with_data_volume" { source = "../../modules/instance_with_data_volume" instances_with_data_volume_map = { + dm_pool_manager_proto = { + name = "dm-pool-manager-proto", + description = "This instance is a DataMiner Pool Manager service", + flavor = module.common_variables.flavor_list.m1_large, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_ghost_proto_data_volume", + size = "30", + device = "/dev/vdb" + } + }, + dataminer_proto_ghost = { + name = "dataminer-proto-ghost", + description = "This instance is a DataMiner Ghost service", + flavor = module.common_variables.flavor_list.m1_large, + networks = [data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name, module.common_variables.networks_list.shared_postgresql], + security_groups = [data.terraform_remote_state.privnet_dns_router.outputs.default_security_group_name, data.terraform_remote_state.privnet_dns_router.outputs.security_group_list.http_and_https_from_the_load_balancers], + server_groups_ids = [], + image_ref = module.common_variables.ubuntu_1804 + volume = { + name = "dataminer_proto_ghost_data_volume", + size = "50", + device = "/dev/vdb" + } + }, dataminer_1_proto_1804 = { name = "dataminer1-proto-1804", description = "This instance is a DataMiner service", From cbc2a387a908e17ec05e3d6c804267b2c262cdad Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Mon, 18 Dec 2023 11:01:49 +0100 Subject: [PATCH 5/5] Created DataMiner plan --- openstack-tf/d4s-production/dataminer/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack-tf/d4s-production/dataminer/main.tf b/openstack-tf/d4s-production/dataminer/main.tf index 6bd9847a..c2a06f16 100644 --- a/openstack-tf/d4s-production/dataminer/main.tf +++ b/openstack-tf/d4s-production/dataminer/main.tf @@ -36,7 +36,7 @@ module "instance_with_data_volume" { server_groups_ids = [], image_ref = module.common_variables.ubuntu_1804 volume = { - name = "dataminer_ghost_proto_data_volume", + name = "dm_pool_manager_proto_data_volume", size = "30", device = "/dev/vdb" }