Added Ariadne service in prod

This commit is contained in:
Giancarlo Panichi 2024-02-26 17:17:11 +01:00
parent d3a7219766
commit c56cf21862
5 changed files with 614 additions and 5 deletions

View File

@ -0,0 +1,36 @@
# Instance
resource "openstack_compute_instance_v2" "aggregator_ariadne" {
name = "aggregator-ariadne"
availability_zone_hints = module.common_variables.availability_zone_no_gpu_name
flavor_name = module.common_variables.flavor_list.m1_medium
key_pair = module.ssh_settings.ssh_key_name
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]
block_device {
uuid = module.common_variables.ubuntu_1804.uuid
source_type = "image"
volume_size = 30
boot_index = 0
destination_type = "volume"
delete_on_termination = false
}
# Creates the networks according to input networks
dynamic "network" {
for_each = toset([data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name])
content {
name = network.value
}
}
# user_data script used
user_data = file("${module.common_variables.ubuntu_1804.user_data_file}")
# Do not replace the instance when the ssh key changes
lifecycle {
ignore_changes = [
# Ignore changes to tags, e.g. because a management agent
# updates these based on some ruleset managed elsewhere.
key_pair, user_data, network
]
}
}

View File

@ -55,6 +55,38 @@ module "dns_records_create" {
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
aggregator-ariadne = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["aggregator-ariadne", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "Aggregator aggregator-ariadne"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
opensearch-ariadne = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["opensearch-ariadne", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "OpenSearch opensearch-ariadne"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
opensearch-test-ariadne = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["opensearch-test-ariadne", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "OpenSearch opensearch-test-ariadne"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
},
solr-ariadne = {
zone_id = data.terraform_remote_state.privnet_dns_router.outputs.dns_zone_id
name = join(".", ["solr-ariadne", data.terraform_remote_state.privnet_dns_router.outputs.dns_zone.zone_name])
description = "Solr solr-ariadne"
ttl = 8600
type = "CNAME"
records = [local.cname_target]
}
}
}

View File

@ -0,0 +1,73 @@
# Instance
resource "openstack_compute_instance_v2" "opensearch_ariadne" {
name = "opensearch-ariadne"
availability_zone_hints = module.common_variables.availability_zone_no_gpu_name
flavor_name = module.common_variables.flavor_list.m2_medium
key_pair = module.ssh_settings.ssh_key_name
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]
block_device {
uuid = module.common_variables.ubuntu_1804.uuid
source_type = "image"
volume_size = 40
boot_index = 0
destination_type = "volume"
delete_on_termination = false
}
# Creates the networks according to input networks
dynamic "network" {
for_each = toset([data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name])
content {
name = network.value
}
}
# user_data script used
user_data = file("${module.common_variables.ubuntu_1804.user_data_file}")
# Do not replace the instance when the ssh key changes
lifecycle {
ignore_changes = [
# Ignore changes to tags, e.g. because a management agent
# updates these based on some ruleset managed elsewhere.
key_pair, user_data, network
]
}
}
resource "openstack_compute_instance_v2" "opensearch_test_ariadne" {
name = "opensearch-test-ariadne"
availability_zone_hints = module.common_variables.availability_zone_no_gpu_name
flavor_name = module.common_variables.flavor_list.m2_small
key_pair = module.ssh_settings.ssh_key_name
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]
block_device {
uuid = module.common_variables.ubuntu_1804.uuid
source_type = "image"
volume_size = 30
boot_index = 0
destination_type = "volume"
delete_on_termination = false
}
# Creates the networks according to input networks
dynamic "network" {
for_each = toset([data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name])
content {
name = network.value
}
}
# user_data script used
user_data = file("${module.common_variables.ubuntu_1804.user_data_file}")
# Do not replace the instance when the ssh key changes
lifecycle {
ignore_changes = [
# Ignore changes to tags, e.g. because a management agent
# updates these based on some ruleset managed elsewhere.
key_pair, user_data, network
]
}
}

View File

@ -0,0 +1,36 @@
# Instance
resource "openstack_compute_instance_v2" "solr_ariadne" {
name = "solr-ariadne"
availability_zone_hints = module.common_variables.availability_zone_no_gpu_name
flavor_name = module.common_variables.flavor_list.m1_large
key_pair = module.ssh_settings.ssh_key_name
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]
block_device {
uuid = module.common_variables.ubuntu_1804.uuid
source_type = "image"
volume_size = 100
boot_index = 0
destination_type = "volume"
delete_on_termination = false
}
# Creates the networks according to input networks
dynamic "network" {
for_each = toset([data.terraform_remote_state.privnet_dns_router.outputs.main_private_network.name])
content {
name = network.value
}
}
# user_data script used
user_data = file("${module.common_variables.ubuntu_1804.user_data_file}")
# Do not replace the instance when the ssh key changes
lifecycle {
ignore_changes = [
# Ignore changes to tags, e.g. because a management agent
# updates these based on some ruleset managed elsewhere.
key_pair, user_data, network
]
}
}

View File

@ -1,7 +1,7 @@
{
"version": 4,
"terraform_version": "1.6.4",
"serial": 9,
"serial": 18,
"lineage": "96b4c93b-a422-59e9-c895-c67a8a545404",
"outputs": {},
"resources": [
@ -403,7 +403,13 @@
{
"schema_version": 0,
"attributes": {
"attachment": [],
"attachment": [
{
"device": "/dev/vdb",
"id": "622bee20-67a1-49e0-9e1b-3fef0f48db81",
"instance_id": "b19efc8c-bf76-4b69-918b-4f610b4b8346"
}
],
"availability_zone": "nova",
"consistency_group_id": null,
"description": "",
@ -436,7 +442,13 @@
{
"schema_version": 0,
"attributes": {
"attachment": [],
"attachment": [
{
"device": "/dev/vdb",
"id": "ce034c49-5531-481f-8550-19db04bf1bf9",
"instance_id": "7b34891c-92ab-4eb9-8b2a-0799cd968524"
}
],
"availability_zone": "nova",
"consistency_group_id": null,
"description": "",
@ -460,6 +472,86 @@
}
]
},
{
"mode": "managed",
"type": "openstack_compute_instance_v2",
"name": "aggregator_ariadne",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"access_ip_v4": "10.1.43.139",
"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": "7ed6a2cd-2b07-482e-8ce4-f018dff16c89",
"volume_size": 30,
"volume_type": ""
}
],
"config_drive": null,
"created": "2024-02-26 16:13:58 +0000 UTC",
"flavor_id": "4",
"flavor_name": "m1.medium",
"floating_ip": null,
"force_delete": false,
"id": "2640dee8-172b-484e-9d7c-40a745abf901",
"image_id": "Attempt to boot from volume - no image supplied",
"image_name": null,
"key_pair": "Giancarlo Panichi",
"metadata": null,
"name": "aggregator-ariadne",
"network": [
{
"access_network": false,
"fixed_ip_v4": "10.1.43.139",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:4e:92:fc",
"name": "d4s-production-cloud-main",
"port": "",
"uuid": "020df98d-ae72-452a-b376-3b6dc289acac"
}
],
"network_mode": null,
"personality": [],
"power_state": "active",
"region": "isti_area_pi_1",
"scheduler_hints": [],
"security_groups": [
"default_for_all",
"traffic_from_the_main_load_balancers"
],
"stop_before_destroy": false,
"tags": null,
"timeouts": null,
"updated": "2024-02-26 16:15:02 +0000 UTC",
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
"vendor_options": [],
"volume": []
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19",
"dependencies": [
"data.terraform_remote_state.privnet_dns_router"
]
}
]
},
{
"mode": "managed",
"type": "openstack_compute_instance_v2",
@ -525,7 +617,7 @@
"traffic_from_the_main_load_balancers"
],
"stop_before_destroy": false,
"tags": null,
"tags": [],
"timeouts": null,
"updated": "2024-02-26 15:20:01 +0000 UTC",
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
@ -605,7 +697,7 @@
"traffic_from_the_main_load_balancers"
],
"stop_before_destroy": false,
"tags": null,
"tags": [],
"timeouts": null,
"updated": "2024-02-26 15:19:58 +0000 UTC",
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
@ -620,6 +712,246 @@
}
]
},
{
"mode": "managed",
"type": "openstack_compute_instance_v2",
"name": "opensearch_ariadne",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"access_ip_v4": "10.1.42.54",
"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": "7ed6a2cd-2b07-482e-8ce4-f018dff16c89",
"volume_size": 40,
"volume_type": ""
}
],
"config_drive": null,
"created": "2024-02-26 16:13:59 +0000 UTC",
"flavor_id": "15",
"flavor_name": "m2.medium",
"floating_ip": null,
"force_delete": false,
"id": "998a7ad0-98b1-46ef-a6ea-80792493d315",
"image_id": "Attempt to boot from volume - no image supplied",
"image_name": null,
"key_pair": "Giancarlo Panichi",
"metadata": null,
"name": "opensearch-ariadne",
"network": [
{
"access_network": false,
"fixed_ip_v4": "10.1.42.54",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:66:a0:26",
"name": "d4s-production-cloud-main",
"port": "",
"uuid": "020df98d-ae72-452a-b376-3b6dc289acac"
}
],
"network_mode": null,
"personality": [],
"power_state": "active",
"region": "isti_area_pi_1",
"scheduler_hints": [],
"security_groups": [
"default_for_all",
"traffic_from_the_main_load_balancers"
],
"stop_before_destroy": false,
"tags": null,
"timeouts": null,
"updated": "2024-02-26 16:15:01 +0000 UTC",
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
"vendor_options": [],
"volume": []
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19",
"dependencies": [
"data.terraform_remote_state.privnet_dns_router"
]
}
]
},
{
"mode": "managed",
"type": "openstack_compute_instance_v2",
"name": "opensearch_test_ariadne",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"access_ip_v4": "10.1.42.210",
"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": "7ed6a2cd-2b07-482e-8ce4-f018dff16c89",
"volume_size": 30,
"volume_type": ""
}
],
"config_drive": null,
"created": "2024-02-26 16:13:58 +0000 UTC",
"flavor_id": "10",
"flavor_name": "m2.small",
"floating_ip": null,
"force_delete": false,
"id": "55394a06-3ae2-4a08-a548-bbf3e1e0eb9b",
"image_id": "Attempt to boot from volume - no image supplied",
"image_name": null,
"key_pair": "Giancarlo Panichi",
"metadata": null,
"name": "opensearch-test-ariadne",
"network": [
{
"access_network": false,
"fixed_ip_v4": "10.1.42.210",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:00:9d:1c",
"name": "d4s-production-cloud-main",
"port": "",
"uuid": "020df98d-ae72-452a-b376-3b6dc289acac"
}
],
"network_mode": null,
"personality": [],
"power_state": "active",
"region": "isti_area_pi_1",
"scheduler_hints": [],
"security_groups": [
"default_for_all",
"traffic_from_the_main_load_balancers"
],
"stop_before_destroy": false,
"tags": null,
"timeouts": null,
"updated": "2024-02-26 16:14:57 +0000 UTC",
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
"vendor_options": [],
"volume": []
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19",
"dependencies": [
"data.terraform_remote_state.privnet_dns_router"
]
}
]
},
{
"mode": "managed",
"type": "openstack_compute_instance_v2",
"name": "solr_ariadne",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"access_ip_v4": "10.1.45.140",
"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": "7ed6a2cd-2b07-482e-8ce4-f018dff16c89",
"volume_size": 100,
"volume_type": ""
}
],
"config_drive": null,
"created": "2024-02-26 16:13:58 +0000 UTC",
"flavor_id": "9",
"flavor_name": "m1.large",
"floating_ip": null,
"force_delete": false,
"id": "2b8592a6-2334-4056-8fdf-b79a3c84bb0c",
"image_id": "Attempt to boot from volume - no image supplied",
"image_name": null,
"key_pair": "Giancarlo Panichi",
"metadata": null,
"name": "solr-ariadne",
"network": [
{
"access_network": false,
"fixed_ip_v4": "10.1.45.140",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:fc:0f:6e",
"name": "d4s-production-cloud-main",
"port": "",
"uuid": "020df98d-ae72-452a-b376-3b6dc289acac"
}
],
"network_mode": null,
"personality": [],
"power_state": "active",
"region": "isti_area_pi_1",
"scheduler_hints": [],
"security_groups": [
"default_for_all",
"traffic_from_the_main_load_balancers"
],
"stop_before_destroy": false,
"tags": null,
"timeouts": null,
"updated": "2024-02-26 16:14:50 +0000 UTC",
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
"vendor_options": [],
"volume": []
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19",
"dependencies": [
"data.terraform_remote_state.privnet_dns_router"
]
}
]
},
{
"mode": "managed",
"type": "openstack_compute_volume_attach_v2",
@ -683,6 +1015,31 @@
"name": "add_dns_recordset",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"index_key": "aggregator-ariadne",
"schema_version": 0,
"attributes": {
"description": "Aggregator aggregator-ariadne",
"disable_status_check": false,
"id": "74135b34-1a9c-4c01-8cf0-22450a5660c4/d17d928b-e66a-4643-ae28-a2733c3a6bb6",
"name": "aggregator-ariadne.cloud.d4science.org.",
"project_id": "1b45adf388934758b56d0dfdb4bfacf3",
"records": [
"main-lb.cloud.d4science.org."
],
"region": "isti_area_pi_1",
"timeouts": null,
"ttl": 8600,
"type": "CNAME",
"value_specs": null,
"zone_id": "74135b34-1a9c-4c01-8cf0-22450a5660c4"
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwLCJ1cGRhdGUiOjYwMDAwMDAwMDAwMH19",
"dependencies": [
"data.terraform_remote_state.privnet_dns_router"
]
},
{
"index_key": "graphdb-ariadne",
"schema_version": 0,
@ -732,6 +1089,81 @@
"dependencies": [
"data.terraform_remote_state.privnet_dns_router"
]
},
{
"index_key": "opensearch-ariadne",
"schema_version": 0,
"attributes": {
"description": "OpenSearch opensearch-ariadne",
"disable_status_check": false,
"id": "74135b34-1a9c-4c01-8cf0-22450a5660c4/a5bd20be-874f-431b-973e-02aca6cda76e",
"name": "opensearch-ariadne.cloud.d4science.org.",
"project_id": "1b45adf388934758b56d0dfdb4bfacf3",
"records": [
"main-lb.cloud.d4science.org."
],
"region": "isti_area_pi_1",
"timeouts": null,
"ttl": 8600,
"type": "CNAME",
"value_specs": null,
"zone_id": "74135b34-1a9c-4c01-8cf0-22450a5660c4"
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwLCJ1cGRhdGUiOjYwMDAwMDAwMDAwMH19",
"dependencies": [
"data.terraform_remote_state.privnet_dns_router"
]
},
{
"index_key": "opensearch-test-ariadne",
"schema_version": 0,
"attributes": {
"description": "OpenSearch opensearch-test-ariadne",
"disable_status_check": false,
"id": "74135b34-1a9c-4c01-8cf0-22450a5660c4/6bb1335a-0edc-444d-bf2b-b8c034a32418",
"name": "opensearch-test-ariadne.cloud.d4science.org.",
"project_id": "1b45adf388934758b56d0dfdb4bfacf3",
"records": [
"main-lb.cloud.d4science.org."
],
"region": "isti_area_pi_1",
"timeouts": null,
"ttl": 8600,
"type": "CNAME",
"value_specs": null,
"zone_id": "74135b34-1a9c-4c01-8cf0-22450a5660c4"
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwLCJ1cGRhdGUiOjYwMDAwMDAwMDAwMH19",
"dependencies": [
"data.terraform_remote_state.privnet_dns_router"
]
},
{
"index_key": "solr-ariadne",
"schema_version": 0,
"attributes": {
"description": "Solr solr-ariadne",
"disable_status_check": false,
"id": "74135b34-1a9c-4c01-8cf0-22450a5660c4/973f9e7d-eb84-48b1-a991-c96ab296c49a",
"name": "solr-ariadne.cloud.d4science.org.",
"project_id": "1b45adf388934758b56d0dfdb4bfacf3",
"records": [
"main-lb.cloud.d4science.org."
],
"region": "isti_area_pi_1",
"timeouts": null,
"ttl": 8600,
"type": "CNAME",
"value_specs": null,
"zone_id": "74135b34-1a9c-4c01-8cf0-22450a5660c4"
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwLCJ1cGRhdGUiOjYwMDAwMDAwMDAwMH19",
"dependencies": [
"data.terraform_remote_state.privnet_dns_router"
]
}
]
}