2024-05-12 13:43:53 +00:00
|
|
|
resource "juju_machine" "ceilometer" {
|
|
|
|
count = var.num_units
|
2024-05-07 19:23:43 +00:00
|
|
|
model = var.model-name
|
2024-05-12 13:43:53 +00:00
|
|
|
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids_high[count.index+var.num_units]].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
|
|
|
|
|
2024-05-12 13:43:53 +00:00
|
|
|
placement = "${join(",", sort([
|
|
|
|
for index, _ in slice(var.controller_ids, var.num_units, length(var.controller_ids)) :
|
|
|
|
juju_machine.ceilometer[index].machine_id
|
2024-05-07 15:57:23 +00:00
|
|
|
]))}"
|
|
|
|
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
}
|