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 } }