2024-05-07 15:57:23 +00:00
|
|
|
resource "juju_machine" "ceilometer-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"
|
|
|
|
}
|
|
|
|
resource "juju_machine" "ceilometer-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"
|
|
|
|
}
|
|
|
|
resource "juju_machine" "ceilometer-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"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
resource "juju_application" "ceilometer" {
|
|
|
|
name = "ceilometer"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-07 15:57:23 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "ceilometer"
|
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.ceilometer-1.machine_id,
|
|
|
|
juju_machine.ceilometer-2.machine_id,
|
|
|
|
juju_machine.ceilometer-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
|
|
|
}]
|
|
|
|
|
|
|
|
config = {
|
|
|
|
openstack-origin = var.openstack-origin
|
2024-05-07 19:23:43 +00:00
|
|
|
region = var.openstack-region
|
2024-05-07 15:57:23 +00:00
|
|
|
use-internal-endpoints = "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "ceilometer-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.ceilometer.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" "ceilometer-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.ceilometer.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "identity-credentials"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.keystone.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "identity-credentials"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "ceilometer-ceil-agent" {
|
|
|
|
|
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.ceilometer.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "ceilometer-service"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.ceilometer-agent.name
|
2024-05-07 15:57:23 +00:00
|
|
|
endpoint = "ceilometer-service"
|
|
|
|
}
|
|
|
|
}
|