diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/.terraform.lock.hcl b/openstack-tf/d4s-preprod/basic-infrastructure-modularized/.terraform.lock.hcl similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/.terraform.lock.hcl rename to openstack-tf/d4s-preprod/basic-infrastructure-modularized/.terraform.lock.hcl diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/README.md b/openstack-tf/d4s-preprod/basic-infrastructure-modularized/README.md similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/README.md rename to openstack-tf/d4s-preprod/basic-infrastructure-modularized/README.md diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/main.tf b/openstack-tf/d4s-preprod/basic-infrastructure-modularized/main.tf similarity index 59% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/main.tf rename to openstack-tf/d4s-preprod/basic-infrastructure-modularized/main.tf index 509fa0eb..73d478bb 100644 --- a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/main.tf +++ b/openstack-tf/d4s-preprod/basic-infrastructure-modularized/main.tf @@ -17,12 +17,6 @@ data "terraform_remote_state" "privnet_dns_router" { } } -# module "ssh_settings" { -# source = "../../modules/ssh-key-ref" -# } -# module "common_variables" { -# source = "../../modules/common_variables" -# } -#module "d4science_infra_setup" { -# source = "../../modules/d4science_infra_setup" -#} +module "d4science_infra_setup" { + source = "../../modules/d4science_infra_setup" +} diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/provider.tf b/openstack-tf/d4s-preprod/basic-infrastructure-modularized/provider.tf similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/provider.tf rename to openstack-tf/d4s-preprod/basic-infrastructure-modularized/provider.tf diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/terraform.tfstate b/openstack-tf/d4s-preprod/basic-infrastructure-modularized/terraform.tfstate similarity index 89% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/terraform.tfstate rename to openstack-tf/d4s-preprod/basic-infrastructure-modularized/terraform.tfstate index 6c3c5645..9c842013 100644 --- a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/terraform.tfstate +++ b/openstack-tf/d4s-preprod/basic-infrastructure-modularized/terraform.tfstate @@ -1,10 +1,10 @@ { "version": 4, "terraform_version": "1.6.4", - "serial": 219, + "serial": 213, "lineage": "6a53b692-c1a8-ed53-bc6c-b7fb5e017eb8", "outputs": { - "almalinux_9": { + "almalinux9_img": { "value": { "name": "AlmaLinux-9.0-20220718", "uuid": "541650fc-dd19-4f38-bb1d-7333ed9dd688" @@ -22,37 +22,7 @@ "value": "cnr-isti-nova-gpu-a", "type": "string" }, - "availability_zones_names": { - "value": { - "availability_zone_no_gpu": "cnr-isti-nova-a", - "availability_zone_with_gpu": "cnr-isti-nova-gpu-a" - }, - "type": [ - "map", - "string" - ] - }, - "basic_services_ip": { - "value": { - "ca": "10.1.32.4", - "ca_cidr": "10.1.32.4/32", - "haproxy_l7_1": "10.1.32.11", - "haproxy_l7_1_cidr": "10.1.32.11/32", - "haproxy_l7_2": "10.1.32.12", - "haproxy_l7_2_cidr": "10.1.32.12/32", - "octavia_main": "10.1.32.20", - "octavia_main_cidr": "10.1.32.20/32", - "prometheus": "10.1.32.10", - "prometheus_cidr": "10.1.32.10/32", - "ssh_jump": "10.1.32.5", - "ssh_jump_cidr": "10.1.32.5/32" - }, - "type": [ - "map", - "string" - ] - }, - "centos_7": { + "centos7_img": { "value": { "name": "CentOS-7", "uuid": "f0187a99-64f6-462a-ab5f-ef52fe62f2ca" @@ -62,198 +32,30 @@ "string" ] }, - "default_security_group_name": { - "value": "default_for_all", - "type": "string" - }, - "dns_zone": { - "value": { - "description": "DNS primary zone for the d4s-pre-cloud project", - "email": "postmaster@isti.cnr.it", - "id": "c1a4b4bc-f167-4387-855d-38f0f99ca05c", - "ttl": "8600", - "zone_name": "cloud-pre.d4science.org." - }, - "type": [ - "map", - "string" - ] - }, - "dns_zone_id": { - "value": "c1a4b4bc-f167-4387-855d-38f0f99ca05c", - "type": "string" - }, - "el7_data_file": { + "el7_datafile": { "value": "../../openstack_vm_data_scripts/el7.sh", "type": "string" }, - "external_network": { - "value": { - "id": "1d2ff137-6ff7-4017-be2b-0d6c4af2353b", - "name": "external-network" - }, - "type": [ - "map", - "string" - ] - }, "external_network_id": { "value": "1d2ff137-6ff7-4017-be2b-0d6c4af2353b", "type": "string" }, - "external_router": { - "value": { - "description": "D4Science Preprod main router", - "id": "cc26064a-bb08-4c0b-929f-d0cb39f934a3", - "name": "d4s-pre-cloud-external-router" - }, - "type": [ - "map", - "string" - ] - }, - "floating_ip_pools": { - "value": { - "main_public_ip_pool": "external-network" - }, - "type": [ - "map", - "string" - ] - }, - "haproxy_l7_data": { - "value": { - "flavor": "m1.medium", - "haproxy_1": "haproxy-l7-1", - "haproxy_2": "haproxy-l7-2", - "name": "main-haproxy-l7", - "vm_count": "2" - }, - "type": [ - "map", - "string" - ] - }, - "internal_ca_data": { - "value": { - "flavor": "m1.small", - "name": "ca" - }, - "type": [ - "map", - "string" - ] - }, - "main_haproxy_l7_ip": { - "value": [ - "10.1.32.11", - "10.1.32.12" - ], - "type": [ - "list", - "string" - ] + "external_network_name": { + "value": "external-network", + "type": "string" }, "main_loadbalancer_ip": { "value": "10.1.32.20", "type": "string" }, - "main_private_network": { - "value": { - "description": "D4Science Preprod private network (use this as the main network)", - "name": "d4s-pre-cloud-main" - }, - "type": [ - "object", - { - "description": "string", - "name": "string" - } - ] - }, - "main_private_network_id": { - "value": "23fd8a99-d551-4ada-8d3a-9859542ebb8c", - "type": "string" - }, - "main_private_subnet": { - "value": { - "allocation_end": "10.1.35.254", - "allocation_start": "10.1.32.100", - "cidr": "10.1.32.0/22", - "description": "D4Science Preprod main private subnet", - "gateway_ip": "10.1.32.1", - "name": "d4s-pre-cloud-main-subnet" - }, - "type": [ - "map", - "string" - ] - }, - "main_private_subnet_id": { - "value": "cd77a2fd-4a36-4254-b1d0-70b3874c6d04", - "type": "string" - }, - "main_region": { + "main_region_name": { "value": "isti_area_pi_1", "type": "string" }, - "mtu_size": { + "mtu_size_value": { "value": 8942, "type": "number" }, - "networks_with_d4s_services": { - "value": { - "garr_ct1_net": "90.147.166.0/23", - "garr_na_net": "90.147.152.0/24", - "garr_pa1_net": "90.147.188.0/23", - "infrascience_net": "146.48.122.0/23", - "isti_net": "146.48.80.0/21", - "s2i2s_net": "146.48.28.0/22" - }, - "type": [ - "map", - "string" - ] - }, - "octavia_information": { - "value": { - "main_lb_description": "Main L4 load balancer for the D4Science PRE production", - "main_lb_hostname": "main-lb", - "main_lb_name": "d4s-pre-cloud-l4-load-balancer", - "octavia_flavor": "octavia_amphora-mvcpu-ha", - "octavia_flavor_id": "394988b5-6603-4a1e-a939-8e177c6681c7", - "octavia_vrrp_ip_1": "10.1.34.232/32", - "octavia_vrrp_ip_2": "10.1.33.229/32", - "swarm_lb_name": "d4s-pre-cloud-l4-swarm-load-balancer" - }, - "type": [ - "map", - "string" - ] - }, - "os_project_data": { - "value": { - "id": "6fdc02e2827b405dad99f34698659742" - }, - "type": [ - "map", - "string" - ] - }, - "prometheus_server_data": { - "value": { - "flavor": "m1.medium", - "name": "prometheus", - "public_grafana_server_cidr": "146.48.122.132/32", - "vol_data_device": "/dev/vdb", - "vol_data_name": "prometheus-data", - "vol_data_size": "100" - }, - "type": [ - "map", - "string" - ] - }, "resolvers_ip": { "value": [ "146.48.29.97", @@ -265,51 +67,7 @@ "string" ] }, - "resource_registry_addresses": { - "value": {}, - "type": [ - "map", - "string" - ] - }, - "shared_postgresql_server_data": { - "value": { - "allocation_pool_end": "192.168.3.254", - "allocation_pool_start": "192.168.0.100", - "flavor": "m1.medium", - "name": "shared-postgresql-server", - "network_cidr": "192.168.0.0/22", - "network_description": "Network used to communicate with the shared postgresql service", - "network_name": "postgresql-srv-net", - "server_cidr": "192.168.0.5/22", - "server_ip": "192.168.0.5", - "vol_data_device": "/dev/vdb", - "vol_data_name": "shared-postgresql-data", - "vol_data_size": "100" - }, - "type": [ - "map", - "string" - ] - }, - "smartexecutor_addresses": { - "value": {}, - "type": [ - "map", - "string" - ] - }, - "ssh_jump_proxy": { - "value": { - "flavor": "m2.small", - "name": "ssh-jump-proxy" - }, - "type": [ - "map", - "string" - ] - }, - "ssh_sources": { + "ssh_sources_list": { "value": { "d4s_vpn_1_cidr": "146.48.122.27/32", "d4s_vpn_2_cidr": "146.48.122.49/32", @@ -323,15 +81,11 @@ "string" ] }, - "ubuntu1804_data_file": { + "ubuntu1804_datafile": { "value": "../../openstack_vm_data_scripts/ubuntu1804.sh", "type": "string" }, - "ubuntu2204_data_file": { - "value": "../../openstack_vm_data_scripts/ubuntu2204.sh", - "type": "string" - }, - "ubuntu_1804": { + "ubuntu1804_img": { "value": { "name": "Ubuntu-Bionic-18.04", "uuid": "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" @@ -341,7 +95,11 @@ "string" ] }, - "ubuntu_2204": { + "ubuntu2204_datafile": { + "value": "../../openstack_vm_data_scripts/ubuntu2204.sh", + "type": "string" + }, + "ubuntu2204_img": { "value": { "name": "Ubuntu-Jammy-22.04", "uuid": "54768889-8556-4be4-a2eb-82a4d9b34627" @@ -678,184 +436,6 @@ } ] }, - { - "mode": "managed", - "type": "openstack_compute_instance_v2", - "name": "main_haproxy_l7", - "provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]", - "instances": [ - { - "index_key": 0, - "schema_version": 0, - "attributes": { - "access_ip_v4": "10.1.32.11", - "access_ip_v6": "", - "admin_pass": null, - "all_metadata": {}, - "all_tags": [], - "availability_zone": "cnr-isti-nova-a", - "availability_zone_hints": "cnr-isti-nova-a", - "block_device": [ - { - "boot_index": 0, - "delete_on_termination": false, - "destination_type": "volume", - "device_type": "", - "disk_bus": "", - "guest_format": "", - "multiattach": false, - "source_type": "image", - "uuid": "54768889-8556-4be4-a2eb-82a4d9b34627", - "volume_size": 10, - "volume_type": "" - } - ], - "config_drive": null, - "created": "2023-11-29 16:30:52 +0000 UTC", - "flavor_id": "4", - "flavor_name": "m1.medium", - "floating_ip": null, - "force_delete": false, - "id": "15d40030-a532-44f5-8993-39a82c4b78f0", - "image_id": "Attempt to boot from volume - no image supplied", - "image_name": null, - "key_pair": "adellam", - "metadata": null, - "name": "main-haproxy-l7-01", - "network": [ - { - "access_network": false, - "fixed_ip_v4": "10.1.32.11", - "fixed_ip_v6": "", - "floating_ip": "", - "mac": "fa:16:3e:4e:42:1d", - "name": "d4s-pre-cloud-main", - "port": "", - "uuid": "23fd8a99-d551-4ada-8d3a-9859542ebb8c" - } - ], - "network_mode": null, - "personality": [], - "power_state": "active", - "region": "isti_area_pi_1", - "scheduler_hints": [ - { - "additional_properties": {}, - "build_near_host_ip": "", - "different_cell": [], - "different_host": [], - "group": "796fad91-fa0c-459b-9402-e8ba87aae810", - "query": [], - "same_host": [], - "target_cell": "" - } - ], - "security_groups": [ - "default_for_all", - "traffic_from_main_lb_to_haproxy_l7" - ], - "stop_before_destroy": false, - "tags": [], - "timeouts": null, - "updated": "2023-11-29 16:31:31 +0000 UTC", - "user_data": "bb83b25fd1219aa1b850ece9be8d7b0f31714608", - "vendor_options": [], - "volume": [] - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19", - "dependencies": [ - "openstack_compute_servergroup_v2.main_haproxy_l7", - "openstack_networking_secgroup_v2.main_lb_to_haproxy_l7" - ] - }, - { - "index_key": 1, - "schema_version": 0, - "attributes": { - "access_ip_v4": "10.1.32.12", - "access_ip_v6": "", - "admin_pass": null, - "all_metadata": {}, - "all_tags": [], - "availability_zone": "cnr-isti-nova-a", - "availability_zone_hints": "cnr-isti-nova-a", - "block_device": [ - { - "boot_index": 0, - "delete_on_termination": false, - "destination_type": "volume", - "device_type": "", - "disk_bus": "", - "guest_format": "", - "multiattach": false, - "source_type": "image", - "uuid": "54768889-8556-4be4-a2eb-82a4d9b34627", - "volume_size": 10, - "volume_type": "" - } - ], - "config_drive": null, - "created": "2023-11-29 16:30:52 +0000 UTC", - "flavor_id": "4", - "flavor_name": "m1.medium", - "floating_ip": null, - "force_delete": false, - "id": "440355f9-ea65-42e1-a1c6-921b8c77d58c", - "image_id": "Attempt to boot from volume - no image supplied", - "image_name": null, - "key_pair": "adellam", - "metadata": null, - "name": "main-haproxy-l7-02", - "network": [ - { - "access_network": false, - "fixed_ip_v4": "10.1.32.12", - "fixed_ip_v6": "", - "floating_ip": "", - "mac": "fa:16:3e:82:68:bf", - "name": "d4s-pre-cloud-main", - "port": "", - "uuid": "23fd8a99-d551-4ada-8d3a-9859542ebb8c" - } - ], - "network_mode": null, - "personality": [], - "power_state": "active", - "region": "isti_area_pi_1", - "scheduler_hints": [ - { - "additional_properties": {}, - "build_near_host_ip": "", - "different_cell": [], - "different_host": [], - "group": "796fad91-fa0c-459b-9402-e8ba87aae810", - "query": [], - "same_host": [], - "target_cell": "" - } - ], - "security_groups": [ - "default_for_all", - "traffic_from_main_lb_to_haproxy_l7" - ], - "stop_before_destroy": false, - "tags": [], - "timeouts": null, - "updated": "2023-11-29 16:31:38 +0000 UTC", - "user_data": "bb83b25fd1219aa1b850ece9be8d7b0f31714608", - "vendor_options": [], - "volume": [] - }, - "sensitive_attributes": [], - "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19", - "dependencies": [ - "openstack_compute_servergroup_v2.main_haproxy_l7", - "openstack_networking_secgroup_v2.main_lb_to_haproxy_l7" - ] - } - ] - }, { "mode": "managed", "type": "openstack_compute_instance_v2", @@ -1118,10 +698,7 @@ "schema_version": 0, "attributes": { "id": "796fad91-fa0c-459b-9402-e8ba87aae810", - "members": [ - "440355f9-ea65-42e1-a1c6-921b8c77d58c", - "15d40030-a532-44f5-8993-39a82c4b78f0" - ], + "members": [], "name": "main_haproxy_l7", "policies": [ "anti-affinity" diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/15-security-groups.tf b/openstack-tf/d4s-preprod/basic-infrastructure/15-security-groups.tf similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/15-security-groups.tf rename to openstack-tf/d4s-preprod/basic-infrastructure/15-security-groups.tf diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/20-octavia.tf b/openstack-tf/d4s-preprod/basic-infrastructure/20-octavia.tf similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/20-octavia.tf rename to openstack-tf/d4s-preprod/basic-infrastructure/20-octavia.tf diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/25-ssh-jump-proxy.tf b/openstack-tf/d4s-preprod/basic-infrastructure/25-ssh-jump-proxy.tf similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/25-ssh-jump-proxy.tf rename to openstack-tf/d4s-preprod/basic-infrastructure/25-ssh-jump-proxy.tf diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/30-internal-ca.tf b/openstack-tf/d4s-preprod/basic-infrastructure/30-internal-ca.tf similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/30-internal-ca.tf rename to openstack-tf/d4s-preprod/basic-infrastructure/30-internal-ca.tf diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/35-prometheus.tf b/openstack-tf/d4s-preprod/basic-infrastructure/35-prometheus.tf similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/35-prometheus.tf rename to openstack-tf/d4s-preprod/basic-infrastructure/35-prometheus.tf diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/40-postgresql.tf b/openstack-tf/d4s-preprod/basic-infrastructure/40-postgresql.tf similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/40-postgresql.tf rename to openstack-tf/d4s-preprod/basic-infrastructure/40-postgresql.tf diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/45-haproxy.tf b/openstack-tf/d4s-preprod/basic-infrastructure/45-haproxy.tf similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/45-haproxy.tf rename to openstack-tf/d4s-preprod/basic-infrastructure/45-haproxy.tf diff --git a/openstack-tf/d4s-preprod/basic-infrastructure/main.tf b/openstack-tf/d4s-preprod/basic-infrastructure/main.tf index 73d478bb..509fa0eb 100644 --- a/openstack-tf/d4s-preprod/basic-infrastructure/main.tf +++ b/openstack-tf/d4s-preprod/basic-infrastructure/main.tf @@ -17,6 +17,12 @@ data "terraform_remote_state" "privnet_dns_router" { } } -module "d4science_infra_setup" { - source = "../../modules/d4science_infra_setup" -} +# module "ssh_settings" { +# source = "../../modules/ssh-key-ref" +# } +# module "common_variables" { +# source = "../../modules/common_variables" +# } +#module "d4science_infra_setup" { +# source = "../../modules/d4science_infra_setup" +#} diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/outputs.tf b/openstack-tf/d4s-preprod/basic-infrastructure/outputs.tf similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/outputs.tf rename to openstack-tf/d4s-preprod/basic-infrastructure/outputs.tf diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/preprod.auto.tfvars b/openstack-tf/d4s-preprod/basic-infrastructure/preprod.auto.tfvars similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/preprod.auto.tfvars rename to openstack-tf/d4s-preprod/basic-infrastructure/preprod.auto.tfvars diff --git a/openstack-tf/d4s-preprod/basic-infrastructure/terraform.tfstate b/openstack-tf/d4s-preprod/basic-infrastructure/terraform.tfstate index 9c842013..6c3c5645 100644 --- a/openstack-tf/d4s-preprod/basic-infrastructure/terraform.tfstate +++ b/openstack-tf/d4s-preprod/basic-infrastructure/terraform.tfstate @@ -1,10 +1,10 @@ { "version": 4, "terraform_version": "1.6.4", - "serial": 213, + "serial": 219, "lineage": "6a53b692-c1a8-ed53-bc6c-b7fb5e017eb8", "outputs": { - "almalinux9_img": { + "almalinux_9": { "value": { "name": "AlmaLinux-9.0-20220718", "uuid": "541650fc-dd19-4f38-bb1d-7333ed9dd688" @@ -22,7 +22,37 @@ "value": "cnr-isti-nova-gpu-a", "type": "string" }, - "centos7_img": { + "availability_zones_names": { + "value": { + "availability_zone_no_gpu": "cnr-isti-nova-a", + "availability_zone_with_gpu": "cnr-isti-nova-gpu-a" + }, + "type": [ + "map", + "string" + ] + }, + "basic_services_ip": { + "value": { + "ca": "10.1.32.4", + "ca_cidr": "10.1.32.4/32", + "haproxy_l7_1": "10.1.32.11", + "haproxy_l7_1_cidr": "10.1.32.11/32", + "haproxy_l7_2": "10.1.32.12", + "haproxy_l7_2_cidr": "10.1.32.12/32", + "octavia_main": "10.1.32.20", + "octavia_main_cidr": "10.1.32.20/32", + "prometheus": "10.1.32.10", + "prometheus_cidr": "10.1.32.10/32", + "ssh_jump": "10.1.32.5", + "ssh_jump_cidr": "10.1.32.5/32" + }, + "type": [ + "map", + "string" + ] + }, + "centos_7": { "value": { "name": "CentOS-7", "uuid": "f0187a99-64f6-462a-ab5f-ef52fe62f2ca" @@ -32,30 +62,198 @@ "string" ] }, - "el7_datafile": { + "default_security_group_name": { + "value": "default_for_all", + "type": "string" + }, + "dns_zone": { + "value": { + "description": "DNS primary zone for the d4s-pre-cloud project", + "email": "postmaster@isti.cnr.it", + "id": "c1a4b4bc-f167-4387-855d-38f0f99ca05c", + "ttl": "8600", + "zone_name": "cloud-pre.d4science.org." + }, + "type": [ + "map", + "string" + ] + }, + "dns_zone_id": { + "value": "c1a4b4bc-f167-4387-855d-38f0f99ca05c", + "type": "string" + }, + "el7_data_file": { "value": "../../openstack_vm_data_scripts/el7.sh", "type": "string" }, + "external_network": { + "value": { + "id": "1d2ff137-6ff7-4017-be2b-0d6c4af2353b", + "name": "external-network" + }, + "type": [ + "map", + "string" + ] + }, "external_network_id": { "value": "1d2ff137-6ff7-4017-be2b-0d6c4af2353b", "type": "string" }, - "external_network_name": { - "value": "external-network", - "type": "string" + "external_router": { + "value": { + "description": "D4Science Preprod main router", + "id": "cc26064a-bb08-4c0b-929f-d0cb39f934a3", + "name": "d4s-pre-cloud-external-router" + }, + "type": [ + "map", + "string" + ] + }, + "floating_ip_pools": { + "value": { + "main_public_ip_pool": "external-network" + }, + "type": [ + "map", + "string" + ] + }, + "haproxy_l7_data": { + "value": { + "flavor": "m1.medium", + "haproxy_1": "haproxy-l7-1", + "haproxy_2": "haproxy-l7-2", + "name": "main-haproxy-l7", + "vm_count": "2" + }, + "type": [ + "map", + "string" + ] + }, + "internal_ca_data": { + "value": { + "flavor": "m1.small", + "name": "ca" + }, + "type": [ + "map", + "string" + ] + }, + "main_haproxy_l7_ip": { + "value": [ + "10.1.32.11", + "10.1.32.12" + ], + "type": [ + "list", + "string" + ] }, "main_loadbalancer_ip": { "value": "10.1.32.20", "type": "string" }, - "main_region_name": { + "main_private_network": { + "value": { + "description": "D4Science Preprod private network (use this as the main network)", + "name": "d4s-pre-cloud-main" + }, + "type": [ + "object", + { + "description": "string", + "name": "string" + } + ] + }, + "main_private_network_id": { + "value": "23fd8a99-d551-4ada-8d3a-9859542ebb8c", + "type": "string" + }, + "main_private_subnet": { + "value": { + "allocation_end": "10.1.35.254", + "allocation_start": "10.1.32.100", + "cidr": "10.1.32.0/22", + "description": "D4Science Preprod main private subnet", + "gateway_ip": "10.1.32.1", + "name": "d4s-pre-cloud-main-subnet" + }, + "type": [ + "map", + "string" + ] + }, + "main_private_subnet_id": { + "value": "cd77a2fd-4a36-4254-b1d0-70b3874c6d04", + "type": "string" + }, + "main_region": { "value": "isti_area_pi_1", "type": "string" }, - "mtu_size_value": { + "mtu_size": { "value": 8942, "type": "number" }, + "networks_with_d4s_services": { + "value": { + "garr_ct1_net": "90.147.166.0/23", + "garr_na_net": "90.147.152.0/24", + "garr_pa1_net": "90.147.188.0/23", + "infrascience_net": "146.48.122.0/23", + "isti_net": "146.48.80.0/21", + "s2i2s_net": "146.48.28.0/22" + }, + "type": [ + "map", + "string" + ] + }, + "octavia_information": { + "value": { + "main_lb_description": "Main L4 load balancer for the D4Science PRE production", + "main_lb_hostname": "main-lb", + "main_lb_name": "d4s-pre-cloud-l4-load-balancer", + "octavia_flavor": "octavia_amphora-mvcpu-ha", + "octavia_flavor_id": "394988b5-6603-4a1e-a939-8e177c6681c7", + "octavia_vrrp_ip_1": "10.1.34.232/32", + "octavia_vrrp_ip_2": "10.1.33.229/32", + "swarm_lb_name": "d4s-pre-cloud-l4-swarm-load-balancer" + }, + "type": [ + "map", + "string" + ] + }, + "os_project_data": { + "value": { + "id": "6fdc02e2827b405dad99f34698659742" + }, + "type": [ + "map", + "string" + ] + }, + "prometheus_server_data": { + "value": { + "flavor": "m1.medium", + "name": "prometheus", + "public_grafana_server_cidr": "146.48.122.132/32", + "vol_data_device": "/dev/vdb", + "vol_data_name": "prometheus-data", + "vol_data_size": "100" + }, + "type": [ + "map", + "string" + ] + }, "resolvers_ip": { "value": [ "146.48.29.97", @@ -67,7 +265,51 @@ "string" ] }, - "ssh_sources_list": { + "resource_registry_addresses": { + "value": {}, + "type": [ + "map", + "string" + ] + }, + "shared_postgresql_server_data": { + "value": { + "allocation_pool_end": "192.168.3.254", + "allocation_pool_start": "192.168.0.100", + "flavor": "m1.medium", + "name": "shared-postgresql-server", + "network_cidr": "192.168.0.0/22", + "network_description": "Network used to communicate with the shared postgresql service", + "network_name": "postgresql-srv-net", + "server_cidr": "192.168.0.5/22", + "server_ip": "192.168.0.5", + "vol_data_device": "/dev/vdb", + "vol_data_name": "shared-postgresql-data", + "vol_data_size": "100" + }, + "type": [ + "map", + "string" + ] + }, + "smartexecutor_addresses": { + "value": {}, + "type": [ + "map", + "string" + ] + }, + "ssh_jump_proxy": { + "value": { + "flavor": "m2.small", + "name": "ssh-jump-proxy" + }, + "type": [ + "map", + "string" + ] + }, + "ssh_sources": { "value": { "d4s_vpn_1_cidr": "146.48.122.27/32", "d4s_vpn_2_cidr": "146.48.122.49/32", @@ -81,11 +323,15 @@ "string" ] }, - "ubuntu1804_datafile": { + "ubuntu1804_data_file": { "value": "../../openstack_vm_data_scripts/ubuntu1804.sh", "type": "string" }, - "ubuntu1804_img": { + "ubuntu2204_data_file": { + "value": "../../openstack_vm_data_scripts/ubuntu2204.sh", + "type": "string" + }, + "ubuntu_1804": { "value": { "name": "Ubuntu-Bionic-18.04", "uuid": "7ed6a2cd-2b07-482e-8ce4-f018dff16c89" @@ -95,11 +341,7 @@ "string" ] }, - "ubuntu2204_datafile": { - "value": "../../openstack_vm_data_scripts/ubuntu2204.sh", - "type": "string" - }, - "ubuntu2204_img": { + "ubuntu_2204": { "value": { "name": "Ubuntu-Jammy-22.04", "uuid": "54768889-8556-4be4-a2eb-82a4d9b34627" @@ -436,6 +678,184 @@ } ] }, + { + "mode": "managed", + "type": "openstack_compute_instance_v2", + "name": "main_haproxy_l7", + "provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]", + "instances": [ + { + "index_key": 0, + "schema_version": 0, + "attributes": { + "access_ip_v4": "10.1.32.11", + "access_ip_v6": "", + "admin_pass": null, + "all_metadata": {}, + "all_tags": [], + "availability_zone": "cnr-isti-nova-a", + "availability_zone_hints": "cnr-isti-nova-a", + "block_device": [ + { + "boot_index": 0, + "delete_on_termination": false, + "destination_type": "volume", + "device_type": "", + "disk_bus": "", + "guest_format": "", + "multiattach": false, + "source_type": "image", + "uuid": "54768889-8556-4be4-a2eb-82a4d9b34627", + "volume_size": 10, + "volume_type": "" + } + ], + "config_drive": null, + "created": "2023-11-29 16:30:52 +0000 UTC", + "flavor_id": "4", + "flavor_name": "m1.medium", + "floating_ip": null, + "force_delete": false, + "id": "15d40030-a532-44f5-8993-39a82c4b78f0", + "image_id": "Attempt to boot from volume - no image supplied", + "image_name": null, + "key_pair": "adellam", + "metadata": null, + "name": "main-haproxy-l7-01", + "network": [ + { + "access_network": false, + "fixed_ip_v4": "10.1.32.11", + "fixed_ip_v6": "", + "floating_ip": "", + "mac": "fa:16:3e:4e:42:1d", + "name": "d4s-pre-cloud-main", + "port": "", + "uuid": "23fd8a99-d551-4ada-8d3a-9859542ebb8c" + } + ], + "network_mode": null, + "personality": [], + "power_state": "active", + "region": "isti_area_pi_1", + "scheduler_hints": [ + { + "additional_properties": {}, + "build_near_host_ip": "", + "different_cell": [], + "different_host": [], + "group": "796fad91-fa0c-459b-9402-e8ba87aae810", + "query": [], + "same_host": [], + "target_cell": "" + } + ], + "security_groups": [ + "default_for_all", + "traffic_from_main_lb_to_haproxy_l7" + ], + "stop_before_destroy": false, + "tags": [], + "timeouts": null, + "updated": "2023-11-29 16:31:31 +0000 UTC", + "user_data": "bb83b25fd1219aa1b850ece9be8d7b0f31714608", + "vendor_options": [], + "volume": [] + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19", + "dependencies": [ + "openstack_compute_servergroup_v2.main_haproxy_l7", + "openstack_networking_secgroup_v2.main_lb_to_haproxy_l7" + ] + }, + { + "index_key": 1, + "schema_version": 0, + "attributes": { + "access_ip_v4": "10.1.32.12", + "access_ip_v6": "", + "admin_pass": null, + "all_metadata": {}, + "all_tags": [], + "availability_zone": "cnr-isti-nova-a", + "availability_zone_hints": "cnr-isti-nova-a", + "block_device": [ + { + "boot_index": 0, + "delete_on_termination": false, + "destination_type": "volume", + "device_type": "", + "disk_bus": "", + "guest_format": "", + "multiattach": false, + "source_type": "image", + "uuid": "54768889-8556-4be4-a2eb-82a4d9b34627", + "volume_size": 10, + "volume_type": "" + } + ], + "config_drive": null, + "created": "2023-11-29 16:30:52 +0000 UTC", + "flavor_id": "4", + "flavor_name": "m1.medium", + "floating_ip": null, + "force_delete": false, + "id": "440355f9-ea65-42e1-a1c6-921b8c77d58c", + "image_id": "Attempt to boot from volume - no image supplied", + "image_name": null, + "key_pair": "adellam", + "metadata": null, + "name": "main-haproxy-l7-02", + "network": [ + { + "access_network": false, + "fixed_ip_v4": "10.1.32.12", + "fixed_ip_v6": "", + "floating_ip": "", + "mac": "fa:16:3e:82:68:bf", + "name": "d4s-pre-cloud-main", + "port": "", + "uuid": "23fd8a99-d551-4ada-8d3a-9859542ebb8c" + } + ], + "network_mode": null, + "personality": [], + "power_state": "active", + "region": "isti_area_pi_1", + "scheduler_hints": [ + { + "additional_properties": {}, + "build_near_host_ip": "", + "different_cell": [], + "different_host": [], + "group": "796fad91-fa0c-459b-9402-e8ba87aae810", + "query": [], + "same_host": [], + "target_cell": "" + } + ], + "security_groups": [ + "default_for_all", + "traffic_from_main_lb_to_haproxy_l7" + ], + "stop_before_destroy": false, + "tags": [], + "timeouts": null, + "updated": "2023-11-29 16:31:38 +0000 UTC", + "user_data": "bb83b25fd1219aa1b850ece9be8d7b0f31714608", + "vendor_options": [], + "volume": [] + }, + "sensitive_attributes": [], + "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19", + "dependencies": [ + "openstack_compute_servergroup_v2.main_haproxy_l7", + "openstack_networking_secgroup_v2.main_lb_to_haproxy_l7" + ] + } + ] + }, { "mode": "managed", "type": "openstack_compute_instance_v2", @@ -698,7 +1118,10 @@ "schema_version": 0, "attributes": { "id": "796fad91-fa0c-459b-9402-e8ba87aae810", - "members": [], + "members": [ + "440355f9-ea65-42e1-a1c6-921b8c77d58c", + "15d40030-a532-44f5-8993-39a82c4b78f0" + ], "name": "main_haproxy_l7", "policies": [ "anti-affinity" diff --git a/openstack-tf/d4s-preprod/basic-infrastructure-no-modules/variables.tf b/openstack-tf/d4s-preprod/basic-infrastructure/variables.tf similarity index 100% rename from openstack-tf/d4s-preprod/basic-infrastructure-no-modules/variables.tf rename to openstack-tf/d4s-preprod/basic-infrastructure/variables.tf