2024-05-07 15:57:23 +00:00
|
|
|
resource "juju_machine" "gnocchi-1" {
|
2024-05-07 19:23:43 +00:00
|
|
|
model = var.model-name
|
|
|
|
placement = join(":",["lxd",juju_machine.all_machines["103"].machine_id])
|
2024-05-07 15:57:23 +00:00
|
|
|
constraints = "spaces=oam,ceph-access"
|
|
|
|
}
|
|
|
|
resource "juju_machine" "gnocchi-2" {
|
2024-05-07 19:23:43 +00:00
|
|
|
model = var.model-name
|
|
|
|
placement = join(":",["lxd",juju_machine.all_machines["104"].machine_id])
|
2024-05-07 15:57:23 +00:00
|
|
|
constraints = "spaces=oam,ceph-access"
|
|
|
|
}
|
|
|
|
resource "juju_machine" "gnocchi-3" {
|
2024-05-07 19:23:43 +00:00
|
|
|
model = var.model-name
|
|
|
|
placement = join(":",["lxd",juju_machine.all_machines["105"].machine_id])
|
2024-05-07 15:57:23 +00:00
|
|
|
constraints = "spaces=oam,ceph-access"
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_application" "gnocchi" {
|
|
|
|
name = "gnocchi"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "gnocchi"
|
2024-05-07 19:23:43 +00:00
|
|
|
channel = var.openstack-channel
|
2024-05-07 15:57:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
units = 3
|
|
|
|
|
|
|
|
placement = "${join(",",sort([
|
|
|
|
juju_machine.gnocchi-1.machine_id,
|
|
|
|
juju_machine.gnocchi-2.machine_id,
|
|
|
|
juju_machine.gnocchi-3.machine_id,
|
|
|
|
]))}"
|
|
|
|
|
|
|
|
endpoint_bindings = [{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.oam-space
|
2024-05-07 15:57:23 +00:00
|
|
|
},{
|
|
|
|
endpoint = "public"
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.public-space
|
2024-05-07 15:57:23 +00:00
|
|
|
},{
|
|
|
|
endpoint = "admin"
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.admin-space
|
2024-05-07 15:57:23 +00:00
|
|
|
},{
|
|
|
|
endpoint = "internal"
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.internal-space
|
2024-05-07 15:57:23 +00:00
|
|
|
},{
|
|
|
|
endpoint = "shared-db"
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.internal-space
|
2024-05-07 15:57:23 +00:00
|
|
|
},{
|
|
|
|
endpoint = "storage-ceph"
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.ceph-public-space
|
2024-05-07 15:57:23 +00:00
|
|
|
},{
|
|
|
|
endpoint = "coordinator-memcached"
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.internal-space
|
2024-05-07 15:57:23 +00:00
|
|
|
}]
|
|
|
|
|
|
|
|
config = {
|
|
|
|
worker-multiplier = var.worker-multiplier
|
2024-05-07 19:23:43 +00:00
|
|
|
openstack-origin = var.openstack-origin
|
|
|
|
region = var.openstack-region
|
|
|
|
vip = var.vips["gnocchi"]
|
2024-05-07 15:57:23 +00:00
|
|
|
use-internal-endpoints = "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_application" "gnocchi-mysql-router" {
|
|
|
|
name = "gnocchi-mysql-router"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
charm {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = "mysql-router"
|
2024-05-07 15:57:23 +00:00
|
|
|
channel = "8.0/stable"
|
|
|
|
}
|
|
|
|
|
|
|
|
units = 0
|
|
|
|
|
|
|
|
endpoint_bindings = [{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.oam-space
|
2024-05-07 15:57:23 +00:00
|
|
|
},{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.internal-space
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "shared-db"
|
|
|
|
},{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.internal-space
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "db-router"
|
|
|
|
}]
|
|
|
|
|
|
|
|
config = {
|
|
|
|
source = var.openstack-origin
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_application" "hacluster-gnocchi" {
|
|
|
|
name = "hacluster-gnocchi"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "hacluster"
|
|
|
|
channel = "2.0.3/stable"
|
|
|
|
}
|
|
|
|
|
|
|
|
units = 0
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "gnocchi-ha" {
|
|
|
|
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.gnocchi.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "ha"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.hacluster-gnocchi.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "ha"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "gnocchi-mysql" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.gnocchi.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "shared-db"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.gnocchi-mysql-router.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "shared-db"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "gnocchi-db" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.gnocchi-mysql-router.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "db-router"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.mysql-innodb-cluster.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "db-router"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "gnocchi-rmq" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.gnocchi.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "amqp"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.rabbitmq-server.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "amqp"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "gnocchi-keystone" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.gnocchi.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "identity-service"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.keystone.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "identity-service"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "gnocchi-ceph" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.gnocchi.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "storage-ceph"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.ceph-mon.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "client"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "gnocchi-memcache" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.gnocchi.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "coordinator-memcached"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.memcached.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "cache"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "gnocchi-ceilometer" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.gnocchi.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "metric-service"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.ceilometer.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "metric-service"
|
|
|
|
}
|
|
|
|
}
|