Altro volume per l'istanza scilake di test.

This commit is contained in:
Andrea Dell'Amico 2024-06-20 18:31:07 +02:00
parent d04758fea7
commit de011f40d5
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 82 additions and 26 deletions

View File

@ -4,7 +4,7 @@ terraform {
required_providers { required_providers {
openstack = { openstack = {
source = "terraform-provider-openstack/openstack" source = "terraform-provider-openstack/openstack"
# version = "~> 1.53.0" version = ">= 1.54.0"
} }
} }
} }
@ -43,6 +43,11 @@ resource "openstack_blockstorage_volume_v3" "elasticsearch_data_vol" {
size = 5 size = 5
} }
resource "openstack_blockstorage_volume_v3" "activemq_data_vol" {
name = "Scilake catalogue activemq data"
size = 5
}
resource "openstack_networking_port_v2" "scilake_ip_in_main_net" { resource "openstack_networking_port_v2" "scilake_ip_in_main_net" {
name = "scilake_main" name = "scilake_main"
admin_state_up = "true" admin_state_up = "true"
@ -100,6 +105,12 @@ resource "openstack_compute_volume_attach_v2" "elasticsearch_data_attach_vol" {
device = "/dev/vdd" device = "/dev/vdd"
} }
resource "openstack_compute_volume_attach_v2" "activemq_data_attach_vol" {
instance_id = openstack_compute_instance_v2.scilake_intelcomp_server.id
volume_id = openstack_blockstorage_volume_v3.activemq_data_vol.id
device = "/dev/vde"
}
# #
resource "openstack_networking_floatingip_v2" "scilake_catalogue_server_ip" { resource "openstack_networking_floatingip_v2" "scilake_catalogue_server_ip" {
pool = data.terraform_remote_state.privnet_dns_router.outputs.external_network.name pool = data.terraform_remote_state.privnet_dns_router.outputs.external_network.name
@ -110,3 +121,4 @@ resource "openstack_networking_floatingip_associate_v2" "scilake_catalogue_serve
floating_ip = openstack_networking_floatingip_v2.scilake_catalogue_server_ip.address floating_ip = openstack_networking_floatingip_v2.scilake_catalogue_server_ip.address
port_id = openstack_networking_port_v2.scilake_ip_in_main_net.id port_id = openstack_networking_port_v2.scilake_ip_in_main_net.id
} }

View File

@ -1,7 +1,7 @@
{ {
"version": 4, "version": 4,
"terraform_version": "1.7.5", "terraform_version": "1.7.5",
"serial": 43, "serial": 46,
"lineage": "6c778726-5dc6-47e2-aa9f-12d30f5345ff", "lineage": "6c778726-5dc6-47e2-aa9f-12d30f5345ff",
"outputs": { "outputs": {
"scilake_floating_ip": { "scilake_floating_ip": {
@ -91,7 +91,6 @@
"created": "2024-04-20 19:27:30 +0000 UTC", "created": "2024-04-20 19:27:30 +0000 UTC",
"flavor_id": "04a3f9ec-daf3-46ea-a6a4-8d5553b701f7", "flavor_id": "04a3f9ec-daf3-46ea-a6a4-8d5553b701f7",
"flavor_name": "m1.xxl", "flavor_name": "m1.xxl",
"floating_ip": null,
"force_delete": false, "force_delete": false,
"id": "37868eb3-aa56-4bfe-8823-14001f4151e6", "id": "37868eb3-aa56-4bfe-8823-14001f4151e6",
"image_id": "Attempt to boot from volume - no image supplied", "image_id": "Attempt to boot from volume - no image supplied",
@ -104,7 +103,6 @@
"access_network": false, "access_network": false,
"fixed_ip_v4": "192.168.100.104", "fixed_ip_v4": "192.168.100.104",
"fixed_ip_v6": "", "fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:c2:1f:a0", "mac": "fa:16:3e:c2:1f:a0",
"name": "isti-VM-CT1-net", "name": "isti-VM-CT1-net",
"port": "4979412a-f60a-4e3e-ac10-dc1bf118323c", "port": "4979412a-f60a-4e3e-ac10-dc1bf118323c",
@ -124,8 +122,7 @@
"timeouts": null, "timeouts": null,
"updated": "2024-04-20 19:28:34 +0000 UTC", "updated": "2024-04-20 19:28:34 +0000 UTC",
"user_data": "bb83b25fd1219aa1b850ece9be8d7b0f31714608", "user_data": "bb83b25fd1219aa1b850ece9be8d7b0f31714608",
"vendor_options": [], "vendor_options": []
"volume": []
}, },
"type": [ "type": [
"object", "object",
@ -166,7 +163,6 @@
"created": "string", "created": "string",
"flavor_id": "string", "flavor_id": "string",
"flavor_name": "string", "flavor_name": "string",
"floating_ip": "string",
"force_delete": "bool", "force_delete": "bool",
"id": "string", "id": "string",
"image_id": "string", "image_id": "string",
@ -185,7 +181,6 @@
"access_network": "bool", "access_network": "bool",
"fixed_ip_v4": "string", "fixed_ip_v4": "string",
"fixed_ip_v6": "string", "fixed_ip_v6": "string",
"floating_ip": "string",
"mac": "string", "mac": "string",
"name": "string", "name": "string",
"port": "string", "port": "string",
@ -265,17 +260,6 @@
"ignore_resize_confirmation": "bool" "ignore_resize_confirmation": "bool"
} }
] ]
],
"volume": [
"set",
[
"object",
{
"device": "string",
"id": "string",
"volume_id": "string"
}
]
] ]
} }
], ],
@ -406,6 +390,39 @@
} }
] ]
}, },
{
"mode": "managed",
"type": "openstack_blockstorage_volume_v3",
"name": "activemq_data_vol",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"attachment": [],
"availability_zone": "nova",
"backup_id": "",
"consistency_group_id": null,
"description": "",
"enable_online_resize": null,
"id": "fff3e742-5a21-4aae-90a8-8fd142655451",
"image_id": null,
"metadata": {},
"name": "Scilake catalogue activemq data",
"region": "garr-ct1",
"scheduler_hints": [],
"size": 5,
"snapshot_id": "",
"source_replica": null,
"source_vol_id": "",
"timeouts": null,
"volume_type": "__DEFAULT__"
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwfX0="
}
]
},
{ {
"mode": "managed", "mode": "managed",
"type": "openstack_blockstorage_volume_v3", "type": "openstack_blockstorage_volume_v3",
@ -430,7 +447,6 @@
"id": "0d23a62c-15d6-4ab7-aab1-5bdc1c9d2c66", "id": "0d23a62c-15d6-4ab7-aab1-5bdc1c9d2c66",
"image_id": null, "image_id": null,
"metadata": {}, "metadata": {},
"multiattach": null,
"name": "Scilake catalogue elasticsearch data", "name": "Scilake catalogue elasticsearch data",
"region": "garr-ct1", "region": "garr-ct1",
"scheduler_hints": [], "scheduler_hints": [],
@ -470,7 +486,6 @@
"id": "5cda33a5-85c0-4211-b1f7-26b0baff18e3", "id": "5cda33a5-85c0-4211-b1f7-26b0baff18e3",
"image_id": null, "image_id": null,
"metadata": {}, "metadata": {},
"multiattach": null,
"name": "Scilake catalogue mongodb data", "name": "Scilake catalogue mongodb data",
"region": "garr-ct1", "region": "garr-ct1",
"scheduler_hints": [], "scheduler_hints": [],
@ -510,7 +525,6 @@
"id": "5a4888df-5e16-49ac-bc84-28e811474659", "id": "5a4888df-5e16-49ac-bc84-28e811474659",
"image_id": null, "image_id": null,
"metadata": {}, "metadata": {},
"multiattach": null,
"name": "Scilake catalogue postgresql data", "name": "Scilake catalogue postgresql data",
"region": "garr-ct1", "region": "garr-ct1",
"scheduler_hints": [], "scheduler_hints": [],
@ -561,7 +575,6 @@
"created": "2024-04-20 19:27:30 +0000 UTC", "created": "2024-04-20 19:27:30 +0000 UTC",
"flavor_id": "04a3f9ec-daf3-46ea-a6a4-8d5553b701f7", "flavor_id": "04a3f9ec-daf3-46ea-a6a4-8d5553b701f7",
"flavor_name": "m1.xxl", "flavor_name": "m1.xxl",
"floating_ip": null,
"force_delete": false, "force_delete": false,
"id": "37868eb3-aa56-4bfe-8823-14001f4151e6", "id": "37868eb3-aa56-4bfe-8823-14001f4151e6",
"image_id": "Attempt to boot from volume - no image supplied", "image_id": "Attempt to boot from volume - no image supplied",
@ -574,7 +587,6 @@
"access_network": false, "access_network": false,
"fixed_ip_v4": "192.168.100.104", "fixed_ip_v4": "192.168.100.104",
"fixed_ip_v6": "", "fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:c2:1f:a0", "mac": "fa:16:3e:c2:1f:a0",
"name": "isti-VM-CT1-net", "name": "isti-VM-CT1-net",
"port": "4979412a-f60a-4e3e-ac10-dc1bf118323c", "port": "4979412a-f60a-4e3e-ac10-dc1bf118323c",
@ -594,8 +606,7 @@
"timeouts": null, "timeouts": null,
"updated": "2024-04-20 19:28:34 +0000 UTC", "updated": "2024-04-20 19:28:34 +0000 UTC",
"user_data": "bb83b25fd1219aa1b850ece9be8d7b0f31714608", "user_data": "bb83b25fd1219aa1b850ece9be8d7b0f31714608",
"vendor_options": [], "vendor_options": []
"volume": []
}, },
"sensitive_attributes": [], "sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19", "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19",
@ -606,6 +617,36 @@
} }
] ]
}, },
{
"mode": "managed",
"type": "openstack_compute_volume_attach_v2",
"name": "activemq_data_attach_vol",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"device": "/dev/vde",
"id": "37868eb3-aa56-4bfe-8823-14001f4151e6/fff3e742-5a21-4aae-90a8-8fd142655451",
"instance_id": "37868eb3-aa56-4bfe-8823-14001f4151e6",
"multiattach": null,
"region": "garr-ct1",
"tag": null,
"timeouts": null,
"vendor_options": [],
"volume_id": "fff3e742-5a21-4aae-90a8-8fd142655451"
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwfX0=",
"dependencies": [
"data.terraform_remote_state.privnet_dns_router",
"openstack_blockstorage_volume_v3.activemq_data_vol",
"openstack_compute_instance_v2.scilake_intelcomp_server",
"openstack_networking_port_v2.scilake_ip_in_main_net"
]
}
]
},
{ {
"mode": "managed", "mode": "managed",
"type": "openstack_compute_volume_attach_v2", "type": "openstack_compute_volume_attach_v2",
@ -620,6 +661,7 @@
"instance_id": "37868eb3-aa56-4bfe-8823-14001f4151e6", "instance_id": "37868eb3-aa56-4bfe-8823-14001f4151e6",
"multiattach": null, "multiattach": null,
"region": "garr-ct1", "region": "garr-ct1",
"tag": null,
"timeouts": null, "timeouts": null,
"vendor_options": [], "vendor_options": [],
"volume_id": "0d23a62c-15d6-4ab7-aab1-5bdc1c9d2c66" "volume_id": "0d23a62c-15d6-4ab7-aab1-5bdc1c9d2c66"
@ -649,6 +691,7 @@
"instance_id": "37868eb3-aa56-4bfe-8823-14001f4151e6", "instance_id": "37868eb3-aa56-4bfe-8823-14001f4151e6",
"multiattach": null, "multiattach": null,
"region": "garr-ct1", "region": "garr-ct1",
"tag": null,
"timeouts": null, "timeouts": null,
"vendor_options": [], "vendor_options": [],
"volume_id": "5cda33a5-85c0-4211-b1f7-26b0baff18e3" "volume_id": "5cda33a5-85c0-4211-b1f7-26b0baff18e3"
@ -678,6 +721,7 @@
"instance_id": "37868eb3-aa56-4bfe-8823-14001f4151e6", "instance_id": "37868eb3-aa56-4bfe-8823-14001f4151e6",
"multiattach": null, "multiattach": null,
"region": "garr-ct1", "region": "garr-ct1",
"tag": null,
"timeouts": null, "timeouts": null,
"vendor_options": [], "vendor_options": [],
"volume_id": "5a4888df-5e16-49ac-bc84-28e811474659" "volume_id": "5a4888df-5e16-49ac-bc84-28e811474659"