Fix the scilake intelcomp volumes.

This commit is contained in:
Andrea Dell'Amico 2024-05-22 01:07:31 +02:00
parent 47a3844d57
commit 2bd632462d
Signed by untrusted user: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 2151 additions and 1378 deletions

View File

@ -8,7 +8,7 @@ resource "openstack_sharedfilesystem_share_v2" "intelcomp_elasticsearch_data" {
}
# Allow access to the NFS share
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_mgr_private_data_share_access" {
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_mgr_elasticsearch_data_share_access" {
for_each = { for nfs_ip in data.terraform_remote_state.main_infrastructure.outputs.swarm_managers_nfs_ip_ports : join("", nfs_ip.all_fixed_ips) => nfs_ip }
share_id = openstack_sharedfilesystem_share_v2.intelcomp_elasticsearch_data.id
access_type = "ip"
@ -16,7 +16,7 @@ resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_mgr_private_dat
access_level = "rw"
}
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_workers_private_data_share_access" {
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_workers_elasticsearch_data_share_access" {
for_each = { for nfs_ip in data.terraform_remote_state.main_infrastructure.outputs.swarm_workers_nfs_ip_ports : join("", nfs_ip.all_fixed_ips) => nfs_ip }
share_id = openstack_sharedfilesystem_share_v2.intelcomp_elasticsearch_data.id
access_type = "ip"
@ -32,7 +32,7 @@ resource "openstack_sharedfilesystem_share_v2" "intelcomp_activemq_data" {
}
# Allow access to the NFS share
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_mgr_public_data_share_access" {
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_mgr_activemq_data_share_access" {
for_each = { for nfs_ip in data.terraform_remote_state.main_infrastructure.outputs.swarm_managers_nfs_ip_ports : join("", nfs_ip.all_fixed_ips) => nfs_ip }
share_id = openstack_sharedfilesystem_share_v2.intelcomp_activemq_data.id
access_type = "ip"
@ -40,7 +40,7 @@ resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_mgr_public_data
access_level = "rw"
}
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_workers_public_data_share_access" {
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_workers_activemq_data_share_access" {
for_each = { for nfs_ip in data.terraform_remote_state.main_infrastructure.outputs.swarm_workers_nfs_ip_ports : join("", nfs_ip.all_fixed_ips) => nfs_ip }
share_id = openstack_sharedfilesystem_share_v2.intelcomp_activemq_data.id
access_type = "ip"
@ -56,7 +56,7 @@ resource "openstack_sharedfilesystem_share_v2" "intelcomp_redis_cache" {
}
# Allow access to the NFS share
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_mgr_mysql_data_share_access" {
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_mgr_redis_cache_share_access" {
for_each = { for nfs_ip in data.terraform_remote_state.main_infrastructure.outputs.swarm_managers_nfs_ip_ports : join("", nfs_ip.all_fixed_ips) => nfs_ip }
share_id = openstack_sharedfilesystem_share_v2.intelcomp_redis_cache.id
access_type = "ip"
@ -64,7 +64,7 @@ resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_mgr_mysql_data_
access_level = "rw"
}
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_workers_mysql_data_share_access" {
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_workers_redis_cache_share_access" {
for_each = { for nfs_ip in data.terraform_remote_state.main_infrastructure.outputs.swarm_workers_nfs_ip_ports : join("", nfs_ip.all_fixed_ips) => nfs_ip }
share_id = openstack_sharedfilesystem_share_v2.intelcomp_redis_cache.id
access_type = "ip"
@ -72,45 +72,83 @@ resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_workers_mysql_d
access_level = "rw"
}
resource "openstack_sharedfilesystem_share_v2" "intelcomp_pgadmin_data" {
name = "scilake_intelcomp_pgadmin_data"
description = "NFS share for the scilake intelcomp pgadmin data"
share_proto = "NFS"
size = 10
}
output "intelcomp_nfs_private_data" {
# Allow access to the NFS share
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_mgr_pgadmin_data_share_access" {
for_each = { for nfs_ip in data.terraform_remote_state.main_infrastructure.outputs.swarm_managers_nfs_ip_ports : join("", nfs_ip.all_fixed_ips) => nfs_ip }
share_id = openstack_sharedfilesystem_share_v2.intelcomp_pgadmin_data.id
access_type = "ip"
access_to = each.key
access_level = "rw"
}
resource "openstack_sharedfilesystem_share_access_v2" "intelcomp_workers_pgadmin_data_share_access" {
for_each = { for nfs_ip in data.terraform_remote_state.main_infrastructure.outputs.swarm_workers_nfs_ip_ports : join("", nfs_ip.all_fixed_ips) => nfs_ip }
share_id = openstack_sharedfilesystem_share_v2.intelcomp_pgadmin_data.id
access_type = "ip"
access_to = each.key
access_level = "rw"
}
output "intelcomp_nfs_elasticsearch_data" {
value = openstack_sharedfilesystem_share_v2.intelcomp_elasticsearch_data
}
output "intelcomp_nfs_private_data_mgr_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_mgr_private_data_share_access
output "intelcomp_nfs_elasticsearch_data_mgr_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_mgr_elasticsearch_data_share_access
sensitive = true
}
output "intelcomp_nfs_private_data_workers_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_workers_private_data_share_access
output "intelcomp_nfs_elasticsearch_data_workers_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_workers_elasticsearch_data_share_access
sensitive = true
}
output "intelcomp_nfs_public_data" {
output "intelcomp_nfs_activemq_data" {
value = openstack_sharedfilesystem_share_v2.intelcomp_activemq_data
}
output "intelcomp_nfs_public_data_mgr_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_mgr_public_data_share_access
output "intelcomp_nfs_activemq_data_mgr_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_mgr_activemq_data_share_access
sensitive = true
}
output "intelcomp_nfs_public_data_workers_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_workers_public_data_share_access
output "intelcomp_nfs_activemq_data_workers_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_workers_activemq_data_share_access
sensitive = true
}
output "intelcomp_nfs_mysql_data" {
output "intelcomp_nfs_redis_cache" {
value = openstack_sharedfilesystem_share_v2.intelcomp_redis_cache
}
output "intelcomp_nfs_mysql_data_mgr_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_mgr_mysql_data_share_access
output "intelcomp_nfs_redis_cache_mgr_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_mgr_redis_cache_share_access
sensitive = true
}
output "intelcomp_nfs_mysql_data_workers_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_workers_mysql_data_share_access
output "intelcomp_nfs_redis_cache_workers_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_workers_redis_cache_share_access
sensitive = true
}
output "intelcomp_nfs_pgadmin_data" {
value = openstack_sharedfilesystem_share_v2.intelcomp_pgadmin_data
}
output "intelcomp_nfs_pgadminl_data_mgr_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_mgr_pgadmin_data_share_access
sensitive = true
}
output "intelcomp_nfs_pgadmin_data_workers_acls" {
value = openstack_sharedfilesystem_share_access_v2.intelcomp_workers_pgadmin_data_share_access
sensitive = true
}