smart executors in dev.

This commit is contained in:
Andrea Dell'Amico 2023-11-23 12:39:22 +01:00
parent 4038690933
commit b3561c388d
Signed by untrusted user: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
16 changed files with 931 additions and 170 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
# .tfstate files
# *.tfstate
*.tfstate.*
!terraform.tfstate
# Crash log files
crash.log

View File

@ -1,18 +1,7 @@
orientdb_nodes_count = 3
orientdb_node_flavor = "m1.medium"
orientdb_se_node_flavor = "m1.medium"
orientdb_se_ip = "192.168.10.4"
orientdb_se_cidr = "192.168.10.4/32"
orientdb_se_ip = "192.168.12.4"
orientdb_se_cidr = "192.168.12.4/32"
default_security_group_name = "default"
resource_registry_addresses = {
r1 = "10.1.28.73/32"
r2 = "10.1.28.157/32"
}
smartexecutor_addresses = {
sm1 = "10.1.31.225/32"
sm2 = "10.1.28.168/32"
sm3 = "10.1.30.101/32"
sm4 = "10.1.31.253/32"
}

View File

@ -1,7 +1,7 @@
{
"version": 4,
"terraform_version": "1.6.3",
"serial": 31,
"terraform_version": "1.6.4",
"serial": 44,
"lineage": "7607c85c-02c0-0227-fd2b-4958c821fe57",
"outputs": {},
"resources": [
@ -59,7 +59,7 @@
{
"schema_version": 0,
"attributes": {
"access_ip_v4": "10.1.30.10",
"access_ip_v4": "10.1.28.161",
"access_ip_v6": "",
"admin_pass": null,
"all_metadata": {},
@ -95,12 +95,12 @@
}
],
"config_drive": null,
"created": "2023-11-16 17:46:37 +0000 UTC",
"created": "2023-11-23 10:47:45 +0000 UTC",
"flavor_id": "4",
"flavor_name": "m1.medium",
"floating_ip": null,
"force_delete": false,
"id": "71889cbb-6efc-423c-88e4-8718bf331441",
"id": "1950343d-bd8b-4148-afde-b7d916ba0562",
"image_id": "Attempt to boot from volume - no image supplied",
"image_name": null,
"key_pair": "adellam",
@ -109,23 +109,23 @@
"network": [
{
"access_network": false,
"fixed_ip_v4": "10.1.30.10",
"fixed_ip_v4": "10.1.28.161",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:e2:34:4f",
"mac": "fa:16:3e:ad:32:69",
"name": "d4s-dev-cloud-main",
"port": "",
"uuid": "e0af5eba-f24a-4d0d-8184-bc654b980c4a"
},
{
"access_network": false,
"fixed_ip_v4": "192.168.10.4",
"fixed_ip_v4": "192.168.12.4",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:45:70:ec",
"name": "orientdb-net",
"mac": "fa:16:3e:64:49:1f",
"name": "orientdb-se-net",
"port": "",
"uuid": "64fbde08-3759-43ed-b754-998882a3dcd4"
"uuid": "f3123ccc-f4f9-4b82-95eb-bcd714ad38e6"
}
],
"network_mode": null,
@ -140,7 +140,7 @@
"stop_before_destroy": false,
"tags": null,
"timeouts": null,
"updated": "2023-11-16 17:47:14 +0000 UTC",
"updated": "2023-11-23 10:48:27 +0000 UTC",
"user_data": "bb83b25fd1219aa1b850ece9be8d7b0f31714608",
"vendor_options": [],
"volume": []
@ -148,9 +148,9 @@
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19",
"dependencies": [
"openstack_networking_network_v2.orientdb_network",
"openstack_networking_network_v2.orientdb_se_network",
"openstack_networking_secgroup_v2.access_to_orientdb_se",
"openstack_networking_subnet_v2.orientdb_subnet"
"openstack_networking_subnet_v2.orientdb_se_subnet"
]
}
]
@ -565,60 +565,46 @@
}
]
},
{
"mode": "managed",
"type": "openstack_networking_network_v2",
"name": "orientdb_se_network",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"admin_state_up": true,
"all_tags": [],
"availability_zone_hints": [],
"description": "Network used by the OrientDB for Smart Executor",
"dns_domain": "",
"external": false,
"id": "f3123ccc-f4f9-4b82-95eb-bcd714ad38e6",
"mtu": 8942,
"name": "orientdb-se-net",
"port_security_enabled": true,
"qos_policy_id": "",
"region": "isti_area_pi_1",
"segments": [],
"shared": false,
"tags": null,
"tenant_id": "e8f8ca72f30648a8b389b4e745ac83a9",
"timeouts": null,
"transparent_vlan": false,
"value_specs": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwfX0="
}
]
},
{
"mode": "managed",
"type": "openstack_networking_secgroup_rule_v2",
"name": "access_to_orient_from_clients",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"index_key": "10.1.28.157/32",
"schema_version": 0,
"attributes": {
"description": "TCP traffic from the resource registries and the SSH jump server",
"direction": "ingress",
"ethertype": "IPv4",
"id": "48e35bdc-617d-405c-95d3-bbef785d3113",
"port_range_max": 2490,
"port_range_min": 2424,
"protocol": "tcp",
"region": "isti_area_pi_1",
"remote_group_id": "",
"remote_ip_prefix": "10.1.28.157/32",
"security_group_id": "252ad4f7-f380-465b-ad9e-98d7ff7d5379",
"tenant_id": "e8f8ca72f30648a8b389b4e745ac83a9",
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo2MDAwMDAwMDAwMDB9fQ==",
"dependencies": [
"openstack_networking_secgroup_v2.access_to_orientdb"
]
},
{
"index_key": "10.1.28.73/32",
"schema_version": 0,
"attributes": {
"description": "TCP traffic from the resource registries and the SSH jump server",
"direction": "ingress",
"ethertype": "IPv4",
"id": "bbba3bc1-fd8d-4b3c-9e2a-f90c36b8a386",
"port_range_max": 2490,
"port_range_min": 2424,
"protocol": "tcp",
"region": "isti_area_pi_1",
"remote_group_id": "",
"remote_ip_prefix": "10.1.28.73/32",
"security_group_id": "252ad4f7-f380-465b-ad9e-98d7ff7d5379",
"tenant_id": "e8f8ca72f30648a8b389b4e745ac83a9",
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo2MDAwMDAwMDAwMDB9fQ==",
"dependencies": [
"openstack_networking_secgroup_v2.access_to_orientdb"
]
},
{
"index_key": "10.1.29.164/32",
"schema_version": 0,
@ -640,7 +626,35 @@
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo2MDAwMDAwMDAwMDB9fQ==",
"dependencies": [
"openstack_networking_secgroup_v2.access_to_orientdb"
"openstack_networking_network_v2.orientdb_network",
"openstack_networking_secgroup_v2.access_to_orientdb",
"openstack_networking_subnet_v2.orientdb_subnet"
]
},
{
"index_key": "192.168.10.0/24",
"schema_version": 0,
"attributes": {
"description": "TCP traffic from the resource registries and the SSH jump server",
"direction": "ingress",
"ethertype": "IPv4",
"id": "e00a578f-cf0e-4bcb-8221-a24183643769",
"port_range_max": 2490,
"port_range_min": 2424,
"protocol": "tcp",
"region": "isti_area_pi_1",
"remote_group_id": "",
"remote_ip_prefix": "192.168.10.0/24",
"security_group_id": "252ad4f7-f380-465b-ad9e-98d7ff7d5379",
"tenant_id": "e8f8ca72f30648a8b389b4e745ac83a9",
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo2MDAwMDAwMDAwMDB9fQ==",
"dependencies": [
"openstack_networking_network_v2.orientdb_network",
"openstack_networking_secgroup_v2.access_to_orientdb",
"openstack_networking_subnet_v2.orientdb_subnet"
]
}
]
@ -707,30 +721,6 @@
"name": "access_to_orient_se_from_clients",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"index_key": "10.1.28.168/32",
"schema_version": 0,
"attributes": {
"description": "TCP traffic from the resource registries and the SSH jump server",
"direction": "ingress",
"ethertype": "IPv4",
"id": "9bd69721-f3a5-4aae-b23b-8f99270fecd4",
"port_range_max": 2490,
"port_range_min": 2424,
"protocol": "tcp",
"region": "isti_area_pi_1",
"remote_group_id": "",
"remote_ip_prefix": "10.1.28.168/32",
"security_group_id": "f72e0d63-949e-47b7-95fa-69cc7ff2415a",
"tenant_id": "e8f8ca72f30648a8b389b4e745ac83a9",
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo2MDAwMDAwMDAwMDB9fQ==",
"dependencies": [
"openstack_networking_secgroup_v2.access_to_orientdb_se"
]
},
{
"index_key": "10.1.29.164/32",
"schema_version": 0,
@ -752,23 +742,25 @@
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo2MDAwMDAwMDAwMDB9fQ==",
"dependencies": [
"openstack_networking_secgroup_v2.access_to_orientdb_se"
"openstack_networking_network_v2.orientdb_se_network",
"openstack_networking_secgroup_v2.access_to_orientdb_se",
"openstack_networking_subnet_v2.orientdb_se_subnet"
]
},
{
"index_key": "10.1.30.101/32",
"index_key": "192.168.12.0/24",
"schema_version": 0,
"attributes": {
"description": "TCP traffic from the resource registries and the SSH jump server",
"direction": "ingress",
"ethertype": "IPv4",
"id": "50081189-a724-4c03-920d-17e53ebb809a",
"id": "f1c1e536-df8f-4da7-82b9-a4d564ed6744",
"port_range_max": 2490,
"port_range_min": 2424,
"protocol": "tcp",
"region": "isti_area_pi_1",
"remote_group_id": "",
"remote_ip_prefix": "10.1.30.101/32",
"remote_ip_prefix": "192.168.12.0/24",
"security_group_id": "f72e0d63-949e-47b7-95fa-69cc7ff2415a",
"tenant_id": "e8f8ca72f30648a8b389b4e745ac83a9",
"timeouts": null
@ -776,55 +768,9 @@
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo2MDAwMDAwMDAwMDB9fQ==",
"dependencies": [
"openstack_networking_secgroup_v2.access_to_orientdb_se"
]
},
{
"index_key": "10.1.31.225/32",
"schema_version": 0,
"attributes": {
"description": "TCP traffic from the resource registries and the SSH jump server",
"direction": "ingress",
"ethertype": "IPv4",
"id": "555fedb3-fad5-49a0-9c22-efdf04f548eb",
"port_range_max": 2490,
"port_range_min": 2424,
"protocol": "tcp",
"region": "isti_area_pi_1",
"remote_group_id": "",
"remote_ip_prefix": "10.1.31.225/32",
"security_group_id": "f72e0d63-949e-47b7-95fa-69cc7ff2415a",
"tenant_id": "e8f8ca72f30648a8b389b4e745ac83a9",
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo2MDAwMDAwMDAwMDB9fQ==",
"dependencies": [
"openstack_networking_secgroup_v2.access_to_orientdb_se"
]
},
{
"index_key": "10.1.31.253/32",
"schema_version": 0,
"attributes": {
"description": "TCP traffic from the resource registries and the SSH jump server",
"direction": "ingress",
"ethertype": "IPv4",
"id": "a3a619c4-0ba2-4f2b-8c39-7c7567e86a14",
"port_range_max": 2490,
"port_range_min": 2424,
"protocol": "tcp",
"region": "isti_area_pi_1",
"remote_group_id": "",
"remote_ip_prefix": "10.1.31.253/32",
"security_group_id": "f72e0d63-949e-47b7-95fa-69cc7ff2415a",
"tenant_id": "e8f8ca72f30648a8b389b4e745ac83a9",
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiZGVsZXRlIjo2MDAwMDAwMDAwMDB9fQ==",
"dependencies": [
"openstack_networking_secgroup_v2.access_to_orientdb_se"
"openstack_networking_network_v2.orientdb_se_network",
"openstack_networking_secgroup_v2.access_to_orientdb_se",
"openstack_networking_subnet_v2.orientdb_se_subnet"
]
}
]
@ -1037,6 +983,62 @@
}
]
},
{
"mode": "managed",
"type": "openstack_networking_subnet_v2",
"name": "orientdb_se_subnet",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"all_tags": [],
"allocation_pool": [
{
"end": "192.168.12.254",
"start": "192.168.12.11"
}
],
"allocation_pools": [
{
"end": "192.168.12.254",
"start": "192.168.12.11"
}
],
"cidr": "192.168.12.0/24",
"description": "Subnet used by the OrientDB for Smart Executor",
"dns_nameservers": [
"146.48.29.97",
"146.48.29.98",
"146.48.29.99"
],
"enable_dhcp": true,
"gateway_ip": "",
"host_routes": [],
"id": "1e610c70-b75e-44f0-b8c3-91144ffecf06",
"ip_version": 4,
"ipv6_address_mode": "",
"ipv6_ra_mode": "",
"name": "orientdb-se-subnet",
"network_id": "f3123ccc-f4f9-4b82-95eb-bcd714ad38e6",
"no_gateway": true,
"prefix_length": null,
"region": "isti_area_pi_1",
"service_types": [],
"subnetpool_id": "",
"tags": null,
"tenant_id": "e8f8ca72f30648a8b389b4e745ac83a9",
"timeouts": null,
"value_specs": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjo2MDAwMDAwMDAwMDAsImRlbGV0ZSI6NjAwMDAwMDAwMDAwfX0=",
"dependencies": [
"openstack_networking_network_v2.orientdb_se_network"
]
}
]
},
{
"mode": "managed",
"type": "openstack_networking_subnet_v2",

View File

@ -0,0 +1,24 @@
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/terraform-provider-openstack/openstack" {
version = "1.53.0"
constraints = "~> 1.53.0"
hashes = [
"h1:ZSJPqrlaHQ3sj7wyJuPSG+NblFZbAA6Y0d3GjSJf3o8=",
"zh:09da7ca98ffd3de7b9ce36c4c13446212a6e763ba1162be71b50f95d453cb68e",
"zh:14041bcbb87312411d88612056ed185650bfd01284b8ea0761ce8105a331708e",
"zh:35bf4c788fdbc17c8e40ebc7b33c7de4b45a2fa2efaa657b10f0e3bd37c9627f",
"zh:46ede8ef4cfa12d654c538afc1e1ec34a1f3e8eb4e986ee23dceae398b7176a6",
"zh:59675734990dab1e8d87997853ea75e8104bba730b3f5a7146ac735540c9d6bf",
"zh:6de52428849806498670e827b54810be7510a2a79449602c1aede4235a0ec036",
"zh:78b2a20601272afceffac8f8ca78a6b647b84196c0dd8dc710fae297f6be15a4",
"zh:7c41ed3a4fac09677e676ecf9f9edd1e38eef449e656cb01a848d2c799c6de8f",
"zh:852800228f4118a4aa6cfaa4468b851247cbed6f037fd204f08de69eb1edc149",
"zh:86d618e7f9a07d978b8bc4b190be350a00de64ec535f9c8f5dfe133542a55483",
"zh:963a9e72b66d8bcf43de9b14a674ae3ca3719ce2f829217f7a65b66fc3773397",
"zh:a8e72ab67795071bda61f99a6de3d2d40122fb51971768fd75e1324abe874ced",
"zh:ce1890cf3af17d569af3bc7673cec0a8f78e6f5d701767593f3d29c551f44848",
"zh:e6f1b96eb684f527a47f71923f268c86a36d7894751b31ee9e726d7502a639cd",
]
}

View File

@ -0,0 +1,26 @@
# 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"
}
}
# module "variables" {
# source = "../variables"
# }
# module "smart_executor_nodes" {
# source = "../../modules/smart_executor_nodes"
# }

View File

@ -0,0 +1,4 @@
provider "openstack" {
cloud = "d4s-dev"
}

View File

@ -0,0 +1 @@
../../modules/smart_executor_nodes/smart-executors.tf

View File

@ -0,0 +1,495 @@
{
"version": 4,
"terraform_version": "1.6.4",
"serial": 6,
"lineage": "ae8eda4c-51c3-13f0-219b-df8ea9af7818",
"outputs": {},
"resources": [
{
"mode": "data",
"type": "terraform_remote_state",
"name": "privnet_dns_router",
"provider": "provider[\"terraform.io/builtin/terraform\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"backend": "local",
"config": {
"value": {
"path": "../project-setup/terraform.tfstate"
},
"type": [
"object",
{
"path": "string"
}
]
},
"defaults": null,
"outputs": {
"value": {
"dns_zone_id": "cbae638a-9d99-44aa-946c-0f5ffb7fc488",
"external_gateway_ip": "146.48.31.109",
"main_private_network_id": "e0af5eba-f24a-4d0d-8184-bc654b980c4a",
"main_subnet_network_id": "2aa977f2-80b4-447c-a6b0-dfa06bf68751"
},
"type": [
"object",
{
"dns_zone_id": "string",
"external_gateway_ip": "string",
"main_private_network_id": "string",
"main_subnet_network_id": "string"
}
]
},
"workspace": null
},
"sensitive_attributes": []
}
]
},
{
"mode": "managed",
"type": "openstack_compute_instance_v2",
"name": "accounting_aggregator",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"access_ip_v4": "10.1.31.157",
"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": 10,
"volume_type": ""
}
],
"config_drive": null,
"created": "2023-11-23 11:31:58 +0000 UTC",
"flavor_id": "4",
"flavor_name": "m1.medium",
"floating_ip": null,
"force_delete": false,
"id": "896db334-83aa-4ed6-96a3-0adb7bd13b47",
"image_id": "Attempt to boot from volume - no image supplied",
"image_name": null,
"key_pair": "adellam",
"metadata": null,
"name": "accounting-aggregator-se-plugin",
"network": [
{
"access_network": false,
"fixed_ip_v4": "10.1.31.157",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:40:12:8f",
"name": "d4s-dev-cloud-main",
"port": "",
"uuid": "e0af5eba-f24a-4d0d-8184-bc654b980c4a"
},
{
"access_network": false,
"fixed_ip_v4": "192.168.12.141",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:94:98:8a",
"name": "orientdb-se-net",
"port": "",
"uuid": "f3123ccc-f4f9-4b82-95eb-bcd714ad38e6"
}
],
"network_mode": null,
"personality": [],
"power_state": "active",
"region": "isti_area_pi_1",
"scheduler_hints": [],
"security_groups": [
"default"
],
"stop_before_destroy": false,
"tags": null,
"timeouts": null,
"updated": "2023-11-23 11:32:53 +0000 UTC",
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
"vendor_options": [],
"volume": []
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19"
}
]
},
{
"mode": "managed",
"type": "openstack_compute_instance_v2",
"name": "accounting_dashboard_harvester",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"access_ip_v4": "10.1.28.203",
"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": 10,
"volume_type": ""
}
],
"config_drive": null,
"created": "2023-11-23 11:31:58 +0000 UTC",
"flavor_id": "4",
"flavor_name": "m1.medium",
"floating_ip": null,
"force_delete": false,
"id": "deb96f10-afba-414b-bab7-baf0e28fd8c8",
"image_id": "Attempt to boot from volume - no image supplied",
"image_name": null,
"key_pair": "adellam",
"metadata": null,
"name": "accounting-dashboard-harvester-se-plugin",
"network": [
{
"access_network": false,
"fixed_ip_v4": "10.1.28.203",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:53:4f:b2",
"name": "d4s-dev-cloud-main",
"port": "",
"uuid": "e0af5eba-f24a-4d0d-8184-bc654b980c4a"
},
{
"access_network": false,
"fixed_ip_v4": "192.168.12.67",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:14:25:f8",
"name": "orientdb-se-net",
"port": "",
"uuid": "f3123ccc-f4f9-4b82-95eb-bcd714ad38e6"
},
{
"access_network": false,
"fixed_ip_v4": "192.168.2.113",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:a2:2b:5a",
"name": "postgresql-srv-net",
"port": "",
"uuid": "00422a4a-4b8b-4c85-acf9-ef733df842b9"
}
],
"network_mode": null,
"personality": [],
"power_state": "active",
"region": "isti_area_pi_1",
"scheduler_hints": [],
"security_groups": [
"default"
],
"stop_before_destroy": false,
"tags": null,
"timeouts": null,
"updated": "2023-11-23 11:32:45 +0000 UTC",
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
"vendor_options": [],
"volume": []
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19"
}
]
},
{
"mode": "managed",
"type": "openstack_compute_instance_v2",
"name": "accounting_insert_storage",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"access_ip_v4": "10.1.31.185",
"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": 10,
"volume_type": ""
}
],
"config_drive": null,
"created": "2023-11-23 11:31:58 +0000 UTC",
"flavor_id": "3",
"flavor_name": "c1.small",
"floating_ip": null,
"force_delete": false,
"id": "859ceb6b-22a6-41d1-b80d-6cef299075ec",
"image_id": "Attempt to boot from volume - no image supplied",
"image_name": null,
"key_pair": "adellam",
"metadata": null,
"name": "accounting-insert-storage-se-plugin",
"network": [
{
"access_network": false,
"fixed_ip_v4": "10.1.31.185",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:cc:5e:7c",
"name": "d4s-dev-cloud-main",
"port": "",
"uuid": "e0af5eba-f24a-4d0d-8184-bc654b980c4a"
},
{
"access_network": false,
"fixed_ip_v4": "192.168.12.30",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:67:fe:74",
"name": "orientdb-se-net",
"port": "",
"uuid": "f3123ccc-f4f9-4b82-95eb-bcd714ad38e6"
}
],
"network_mode": null,
"personality": [],
"power_state": "active",
"region": "isti_area_pi_1",
"scheduler_hints": [],
"security_groups": [
"default"
],
"stop_before_destroy": false,
"tags": null,
"timeouts": null,
"updated": "2023-11-23 11:32:48 +0000 UTC",
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
"vendor_options": [],
"volume": []
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19"
}
]
},
{
"mode": "managed",
"type": "openstack_compute_instance_v2",
"name": "resource_checker",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"access_ip_v4": "10.1.31.155",
"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": 10,
"volume_type": ""
}
],
"config_drive": null,
"created": "2023-11-23 11:31:58 +0000 UTC",
"flavor_id": "3",
"flavor_name": "c1.small",
"floating_ip": null,
"force_delete": false,
"id": "54f38a23-fc25-4b83-8a79-4f39b561c141",
"image_id": "Attempt to boot from volume - no image supplied",
"image_name": null,
"key_pair": "adellam",
"metadata": null,
"name": "resource-checker-se-plugin",
"network": [
{
"access_network": false,
"fixed_ip_v4": "10.1.31.155",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:8f:c0:36",
"name": "d4s-dev-cloud-main",
"port": "",
"uuid": "e0af5eba-f24a-4d0d-8184-bc654b980c4a"
},
{
"access_network": false,
"fixed_ip_v4": "192.168.12.51",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:7b:f7:f4",
"name": "orientdb-se-net",
"port": "",
"uuid": "f3123ccc-f4f9-4b82-95eb-bcd714ad38e6"
}
],
"network_mode": null,
"personality": [],
"power_state": "active",
"region": "isti_area_pi_1",
"scheduler_hints": [],
"security_groups": [
"default"
],
"stop_before_destroy": false,
"tags": null,
"timeouts": null,
"updated": "2023-11-23 11:32:50 +0000 UTC",
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
"vendor_options": [],
"volume": []
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19"
}
]
},
{
"mode": "managed",
"type": "openstack_compute_instance_v2",
"name": "social_data_indexer",
"provider": "provider[\"registry.terraform.io/terraform-provider-openstack/openstack\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"access_ip_v4": "10.1.30.173",
"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": 10,
"volume_type": ""
}
],
"config_drive": null,
"created": "2023-11-23 11:31:58 +0000 UTC",
"flavor_id": "3",
"flavor_name": "c1.small",
"floating_ip": null,
"force_delete": false,
"id": "5109e0c1-6c9b-4435-a9f3-8b8fc954545a",
"image_id": "Attempt to boot from volume - no image supplied",
"image_name": null,
"key_pair": "adellam",
"metadata": null,
"name": "social-data-indexer-se-plugin",
"network": [
{
"access_network": false,
"fixed_ip_v4": "10.1.30.173",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:2b:36:52",
"name": "d4s-dev-cloud-main",
"port": "",
"uuid": "e0af5eba-f24a-4d0d-8184-bc654b980c4a"
},
{
"access_network": false,
"fixed_ip_v4": "192.168.12.89",
"fixed_ip_v6": "",
"floating_ip": "",
"mac": "fa:16:3e:3c:2f:cd",
"name": "orientdb-se-net",
"port": "",
"uuid": "f3123ccc-f4f9-4b82-95eb-bcd714ad38e6"
}
],
"network_mode": null,
"personality": [],
"power_state": "active",
"region": "isti_area_pi_1",
"scheduler_hints": [],
"security_groups": [
"default"
],
"stop_before_destroy": false,
"tags": null,
"timeouts": null,
"updated": "2023-11-23 11:32:44 +0000 UTC",
"user_data": "47d4769e61324c305c4b70ed6673de4fad84150d",
"vendor_options": [],
"volume": []
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19"
}
]
}
],
"check_results": null
}

View File

@ -0,0 +1 @@
../variables/variables-dev.tf

View File

@ -0,0 +1 @@
../../modules/smart_executor_nodes/variables-smart-executors.tf

View File

@ -0,0 +1 @@
../../modules/common_variables/variables.tf

View File

@ -87,3 +87,33 @@ variable "basic_services_ip" {
octavia_main_cidr = "10.1.28.227/32"
}
}
variable "orientdb_net" {
type = map(string)
default = {
network_name = "orientdb-net"
network_description = "Network used by the OrientDB cluster and to access the service"
network_cidr = "192.168.10.0/24"
allocation_pool_start = "192.168.10.11"
allocation_pool_end = "192.168.10.254"
}
}
variable "orientdb_se_net" {
type = map(string)
default = {
network_name = "orientdb-se-net"
network_description = "Network used by the OrientDB for Smart Executor"
network_cidr = "192.168.12.0/24"
allocation_pool_start = "192.168.12.11"
allocation_pool_end = "192.168.12.254"
}
}
variable "orientdb_se_secgroup" {
default = "access_to_orientdb_se"
}
variable "postgresql_secgroup" {
default = "PostgreSQL service"
}

View File

@ -183,6 +183,36 @@ resource "openstack_networking_subnet_v2" "orientdb_subnet" {
}
}
#
# Network for the OrientDB SE
#
resource "openstack_networking_network_v2" "orientdb_se_network" {
name = var.orientdb_se_net.network_name
admin_state_up = "true"
external = "false"
description = var.orientdb_se_net.network_description
mtu = var.mtu_size
port_security_enabled = true
shared = false
region = var.main_region
}
# Subnet
resource "openstack_networking_subnet_v2" "orientdb_se_subnet" {
name = "orientdb-se-subnet"
description = "Subnet used by the OrientDB for Smart Executor"
network_id = openstack_networking_network_v2.orientdb_se_network.id
cidr = var.orientdb_se_net.network_cidr
dns_nameservers = var.resolvers_ip
ip_version = 4
enable_dhcp = true
no_gateway = true
allocation_pool {
start = var.orientdb_se_net.allocation_pool_start
end = var.orientdb_se_net.allocation_pool_end
}
}
#
# Security groups
#
@ -212,7 +242,7 @@ resource "openstack_networking_secgroup_v2" "access_to_orientdb" {
description = "Clients that talk to the OrientDB service"
}
resource "openstack_networking_secgroup_rule_v2" "access_to_orient_from_clients" {
for_each = toset([var.basic_services_ip.ssh_jump_cidr, var.resource_registry_addresses.r1, var.resource_registry_addresses.r2])
for_each = toset([var.basic_services_ip.ssh_jump_cidr, openstack_networking_subnet_v2.orientdb_subnet.cidr])
security_group_id = openstack_networking_secgroup_v2.access_to_orientdb.id
description = "TCP traffic from the resource registries and the SSH jump server"
port_range_min = 2424
@ -242,7 +272,7 @@ resource "openstack_networking_secgroup_v2" "access_to_orientdb_se" {
description = "Clients that talk to the OrientDB service"
}
resource "openstack_networking_secgroup_rule_v2" "access_to_orient_se_from_clients" {
for_each = toset([var.basic_services_ip.ssh_jump_cidr, var.smartexecutor_addresses.sm1, var.smartexecutor_addresses.sm2,var.smartexecutor_addresses.sm3, var.smartexecutor_addresses.sm4])
for_each = toset([var.basic_services_ip.ssh_jump_cidr, openstack_networking_subnet_v2.orientdb_se_subnet.cidr])
security_group_id = openstack_networking_secgroup_v2.access_to_orientdb_se.id
description = "TCP traffic from the resource registries and the SSH jump server"
port_range_min = 2424
@ -265,9 +295,9 @@ resource "openstack_networking_secgroup_rule_v2" "access_to_orient_se_from_hapro
}
#
# Swarm Manager VMs
# OrientDB main cluster
#
# Instance
# Instances used by the resource registry
resource "openstack_compute_instance_v2" "orientdb_servers" {
count = local.orientdb_nodes_count
name = format("%s-%02d", var.orientdb_data.node_name, count.index+1)
@ -307,6 +337,7 @@ resource "openstack_compute_instance_v2" "orientdb_servers" {
depends_on = [ openstack_networking_subnet_v2.orientdb_subnet ]
}
# Instance used by the smart executors
resource "openstack_compute_instance_v2" "orientdb_se_server" {
name = "orientdb-se"
availability_zone_hints = var.availability_zones_names.availability_zone_no_gpu
@ -334,12 +365,12 @@ resource "openstack_compute_instance_v2" "orientdb_se_server" {
name = var.main_private_network.name
}
network {
name = var.orientdb_net.network_name
name = var.orientdb_se_net.network_name
fixed_ip_v4 = var.orientdb_se_ip
}
user_data = "${file("${var.ubuntu2204_data_file}")}"
depends_on = [ openstack_networking_subnet_v2.orientdb_subnet ]
depends_on = [ openstack_networking_subnet_v2.orientdb_se_subnet ]
}
locals {

View File

@ -35,14 +35,3 @@ variable "orientdb_se_ip" {
variable "orientdb_se_cidr" {
default = ""
}
variable "orientdb_net" {
type = map(string)
default = {
network_name = "orientdb-net"
network_description = "Network used by the OrientDB cluster and to access the service"
network_cidr = "192.168.10.0/24"
allocation_pool_start = "192.168.10.11"
allocation_pool_end = "192.168.10.254"
}
}

View File

@ -0,0 +1,122 @@
# Accounting dashboard harvester
resource "openstack_compute_instance_v2" "accounting_dashboard_harvester" {
name = var.accounting_dashboard_harvester.name
availability_zone_hints = var.availability_zones_names.availability_zone_no_gpu
flavor_name = var.accounting_dashboard_harvester.flavor
key_pair = var.ssh_key_file.name
security_groups = [var.default_security_group_name]
block_device {
uuid = var.ubuntu_1804.uuid
source_type = "image"
volume_size = 10
boot_index = 0
destination_type = "volume"
delete_on_termination = false
}
network {
name = var.main_private_network.name
}
network {
name = var.orientdb_se_net.network_name
}
network {
name = var.shared_postgresql_server_data.network_name
}
user_data = "${file("${var.ubuntu1804_data_file}")}"
}
# Resource checker
resource "openstack_compute_instance_v2" "resource_checker" {
name = var.resource_checker.name
availability_zone_hints = var.availability_zones_names.availability_zone_no_gpu
flavor_name = var.resource_checker.flavor
key_pair = var.ssh_key_file.name
security_groups = [var.default_security_group_name]
block_device {
uuid = var.ubuntu_1804.uuid
source_type = "image"
volume_size = 10
boot_index = 0
destination_type = "volume"
delete_on_termination = false
}
network {
name = var.main_private_network.name
}
network {
name = var.orientdb_se_net.network_name
}
user_data = "${file("${var.ubuntu1804_data_file}")}"
}
# Social data indexer
resource "openstack_compute_instance_v2" "social_data_indexer" {
name = var.social_data_indexer.name
availability_zone_hints = var.availability_zones_names.availability_zone_no_gpu
flavor_name = var.social_data_indexer.flavor
key_pair = var.ssh_key_file.name
security_groups = [var.default_security_group_name]
block_device {
uuid = var.ubuntu_1804.uuid
source_type = "image"
volume_size = 10
boot_index = 0
destination_type = "volume"
delete_on_termination = false
}
network {
name = var.main_private_network.name
}
network {
name = var.orientdb_se_net.network_name
}
user_data = "${file("${var.ubuntu1804_data_file}")}"
}
# Accounting insert storage
resource "openstack_compute_instance_v2" "accounting_insert_storage" {
name = var.accounting_insert_storage.name
availability_zone_hints = var.availability_zones_names.availability_zone_no_gpu
flavor_name = var.accounting_insert_storage.flavor
key_pair = var.ssh_key_file.name
security_groups = [var.default_security_group_name]
block_device {
uuid = var.ubuntu_1804.uuid
source_type = "image"
volume_size = 10
boot_index = 0
destination_type = "volume"
delete_on_termination = false
}
network {
name = var.main_private_network.name
}
network {
name = var.orientdb_se_net.network_name
}
user_data = "${file("${var.ubuntu1804_data_file}")}"
}
# Accounting aggregator
resource "openstack_compute_instance_v2" "accounting_aggregator" {
name = var.accounting_aggregator.name
availability_zone_hints = var.availability_zones_names.availability_zone_no_gpu
flavor_name = var.accounting_aggregator.flavor
key_pair = var.ssh_key_file.name
security_groups = [var.default_security_group_name]
block_device {
uuid = var.ubuntu_1804.uuid
source_type = "image"
volume_size = 10
boot_index = 0
destination_type = "volume"
delete_on_termination = false
}
network {
name = var.main_private_network.name
}
network {
name = var.orientdb_se_net.network_name
}
user_data = "${file("${var.ubuntu1804_data_file}")}"
}

View File

@ -0,0 +1,44 @@
variable "accounting_dashboard_harvester" {
type = map(string)
default = {
name = "accounting-dashboard-harvester-se-plugin"
description = "Accounting Dashboard Harvester SE plugin"
flavor = "m1.medium"
}
}
variable "resource_checker" {
type = map(string)
default = {
name = "resource-checker-se-plugin"
description = "Resource checker SE plugin"
flavor = "c1.small"
}
}
variable "social_data_indexer" {
type = map(string)
default = {
name = "social-data-indexer-se-plugin"
description = "Social data indexer SE plugin"
flavor = "c1.small"
}
}
variable "accounting_insert_storage" {
type = map(string)
default = {
name = "accounting-insert-storage-se-plugin"
description = "Accounting insert storage SE plugin"
flavor = "c1.small"
}
}
variable "accounting_aggregator" {
type = map(string)
default = {
name = "accounting-aggregator-se-plugin"
description = "Accounting aggregator SE plugin"
flavor = "m1.medium"
}
}