2024-05-06 16:44:43 +00:00
|
|
|
resource "juju_machine" "cinder-1" {
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
placement = join(":",["lxd",juju_machine.all_machines["100"].machine_id])
|
|
|
|
constraints = "spaces=oam"
|
|
|
|
}
|
|
|
|
resource "juju_machine" "cinder-2" {
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
placement = join(":",["lxd",juju_machine.all_machines["101"].machine_id])
|
|
|
|
constraints = "spaces=oam"
|
|
|
|
}
|
|
|
|
resource "juju_machine" "cinder-3" {
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
placement = join(":",["lxd",juju_machine.all_machines["102"].machine_id])
|
|
|
|
constraints = "spaces=oam"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
resource "juju_application" "cinder" {
|
|
|
|
name = "cinder"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "cinder"
|
|
|
|
channel = "ussuri/stable"
|
|
|
|
}
|
|
|
|
|
|
|
|
units = 3
|
|
|
|
|
|
|
|
placement = "${join(",",sort([
|
|
|
|
juju_machine.cinder-1.machine_id,
|
|
|
|
juju_machine.cinder-2.machine_id,
|
|
|
|
juju_machine.cinder-3.machine_id,
|
|
|
|
]))}"
|
|
|
|
|
|
|
|
endpoint_bindings = [{
|
|
|
|
space = "oam"
|
|
|
|
},{
|
|
|
|
endpoint = "public"
|
|
|
|
space = "oam"
|
|
|
|
},{
|
|
|
|
endpoint = "admin"
|
|
|
|
space = "oam"
|
|
|
|
},{
|
|
|
|
endpoint = "internal"
|
|
|
|
space = "oam"
|
|
|
|
},{
|
|
|
|
endpoint = "shared-db"
|
|
|
|
space = "oam"
|
|
|
|
}]
|
|
|
|
|
|
|
|
config = {
|
|
|
|
worker-multiplier = var.worker-multiplier
|
|
|
|
openstack-origin = var.openstack-origin
|
|
|
|
region = var.openstack-region
|
|
|
|
vip = "10.0.1.212"
|
|
|
|
region = var.openstack-region
|
|
|
|
use-internal-endpoints = "true"
|
|
|
|
block-device = "None"
|
|
|
|
glance-api-version = "2"
|
|
|
|
enabled-services = "api,scheduler,volume"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_application" "cinder-ceph" {
|
|
|
|
name = "cinder-ceph"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "cinder-ceph"
|
|
|
|
channel = "ussuri/stable"
|
|
|
|
}
|
|
|
|
|
|
|
|
units = 0
|
|
|
|
|
|
|
|
config = {
|
|
|
|
restrict-ceph-pools = "false"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
resource "juju_application" "cinder-mysql-router" {
|
|
|
|
name = "cinder-mysql-router"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "mysql-router"
|
|
|
|
channel = "8.0/stable"
|
|
|
|
}
|
|
|
|
|
|
|
|
units = 0
|
|
|
|
|
|
|
|
endpoint_bindings = [{
|
|
|
|
space = "oam"
|
|
|
|
},{
|
|
|
|
space = "oam"
|
|
|
|
endpoint = "shared-db"
|
|
|
|
},{
|
|
|
|
space = "oam"
|
|
|
|
endpoint = "db-router"
|
|
|
|
}]
|
|
|
|
|
|
|
|
config = {
|
|
|
|
source = var.openstack-origin
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_application" "hacluster-cinder" {
|
|
|
|
name = "hacluster-cinder"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "hacluster"
|
|
|
|
channel = "2.0.3/stable"
|
|
|
|
}
|
|
|
|
|
|
|
|
units = 0
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "cinder-ha" {
|
|
|
|
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.cinder.name
|
|
|
|
endpoint = "ha"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.hacluster-cinder.name
|
|
|
|
endpoint = "ha"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "cinder-mysql" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.cinder.name
|
|
|
|
endpoint = "shared-db"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.cinder-mysql-router.name
|
|
|
|
endpoint = "shared-db"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "cinder-db" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.cinder-mysql-router.name
|
|
|
|
endpoint = "db-router"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.mysql-innodb-cluster.name
|
|
|
|
endpoint = "db-router"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "cinder-rmq" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.cinder.name
|
|
|
|
endpoint = "amqp"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.rabbitmq-server.name
|
|
|
|
endpoint = "amqp"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "cinder-keystone" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.cinder.name
|
|
|
|
endpoint = "identity-service"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.keystone.name
|
|
|
|
endpoint = "identity-service"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "cinder-ceph" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.cinder.name
|
|
|
|
endpoint = "ceph"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.ceph-mon.name
|
|
|
|
endpoint = "client"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
resource "juju_integration" "cinder-ceph-mon" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.cinder-ceph.name
|
|
|
|
endpoint = "ceph"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.ceph-mon.name
|
|
|
|
endpoint = "client"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "cinder-ceph-cinder" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.cinder-ceph.name
|
|
|
|
endpoint = "storage-backend"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
|
|
|
name = juju_application.cinder.name
|
|
|
|
endpoint = "storage-backend"
|
|
|
|
}
|
|
|
|
}
|