2024-05-07 15:57:23 +00:00
|
|
|
resource "juju_application" "nova-compute-kvm" {
|
|
|
|
name = "nova-compute-kvm"
|
2023-11-29 10:40:29 +00:00
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-11-29 10:40:29 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "nova-compute"
|
2024-05-07 19:23:43 +00:00
|
|
|
channel = var.openstack-channel
|
2023-11-29 10:40:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
units = 8
|
|
|
|
placement = "${join(",",sort([
|
|
|
|
juju_machine.all_machines["1000"].machine_id,
|
|
|
|
juju_machine.all_machines["1001"].machine_id,
|
|
|
|
juju_machine.all_machines["1002"].machine_id,
|
|
|
|
juju_machine.all_machines["1003"].machine_id,
|
|
|
|
juju_machine.all_machines["1004"].machine_id,
|
|
|
|
juju_machine.all_machines["1005"].machine_id,
|
|
|
|
juju_machine.all_machines["1006"].machine_id,
|
|
|
|
juju_machine.all_machines["1007"].machine_id,
|
|
|
|
]))}"
|
|
|
|
|
2024-05-03 09:09:36 +00:00
|
|
|
endpoint_bindings = [{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.oam-space
|
2024-05-03 09:09:36 +00:00
|
|
|
},{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.internal-space
|
2024-05-03 09:09:36 +00:00
|
|
|
endpoint = "internal"
|
|
|
|
}]
|
2023-11-29 10:40:29 +00:00
|
|
|
|
|
|
|
config = {
|
2024-05-07 19:23:43 +00:00
|
|
|
openstack-origin = var.openstack-origin
|
|
|
|
enable-live-migration = "true"
|
|
|
|
enable-resize = "true"
|
|
|
|
migration-auth-type = "ssh"
|
2023-11-29 10:40:29 +00:00
|
|
|
use-internal-endpoints = "true"
|
2024-05-07 19:23:43 +00:00
|
|
|
libvirt-image-backend = "rbd"
|
|
|
|
restrict-ceph-pools = "false"
|
|
|
|
aa-profile-mode = "complain"
|
|
|
|
virt-type = "kvm"
|
2023-11-29 10:40:29 +00:00
|
|
|
customize-failure-domain = var.customize-failure-domain
|
2024-05-07 19:23:43 +00:00
|
|
|
reserved-host-memory = var.reserved-host-memory
|
|
|
|
#cpu-mode = "custom"
|
|
|
|
#cpu-model = "EPYC-IBPB"
|
|
|
|
#cpu-model-extra-flags = "svm,pcid"
|
2023-12-15 16:35:17 +00:00
|
|
|
pci-passthrough-whitelist = jsonencode([
|
|
|
|
{vendor_id: "1af4", product_id: "1000", address: "00:08.0"},
|
|
|
|
{vendor_id: "1af4", product_id: "1000", address: "00:07.0"},
|
|
|
|
{vendor_id: "1af4", product_id: "1000", address: "00:06.0"},
|
|
|
|
])
|
|
|
|
pci-alias = jsonencode({
|
|
|
|
vendor_id: "1af4",
|
|
|
|
product_id: "1000",
|
|
|
|
device_type: "type-PCI",
|
|
|
|
name: "arifpass",
|
|
|
|
numa_policy: "preferred"
|
|
|
|
})
|
2023-11-29 10:40:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_application" "ceilometer-agent" {
|
|
|
|
name = "ceilometer-agent"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-11-29 10:40:29 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "ceilometer-agent"
|
2024-05-07 19:23:43 +00:00
|
|
|
channel = var.openstack-channel
|
2023-11-29 10:40:29 +00:00
|
|
|
}
|
|
|
|
|
2024-05-02 20:44:41 +00:00
|
|
|
units = 0
|
|
|
|
|
2023-12-15 16:35:17 +00:00
|
|
|
config = {
|
|
|
|
use-internal-endpoints = "true"
|
|
|
|
}
|
2023-11-29 10:40:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_application" "neutron-openvswitch" {
|
|
|
|
name = "neutron-openvswitch"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-11-29 10:40:29 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "neutron-openvswitch"
|
2024-05-07 19:23:43 +00:00
|
|
|
channel = var.openstack-channel
|
2023-11-29 10:40:29 +00:00
|
|
|
}
|
|
|
|
|
2024-05-02 20:44:41 +00:00
|
|
|
units = 0
|
|
|
|
|
2024-05-03 09:09:36 +00:00
|
|
|
endpoint_bindings = [{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.oam-space
|
2024-05-03 09:09:36 +00:00
|
|
|
},{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.overlay-space
|
2024-05-03 09:09:36 +00:00
|
|
|
endpoint = "data"
|
|
|
|
}]
|
|
|
|
|
2023-11-29 10:40:29 +00:00
|
|
|
config = {
|
2024-05-07 19:23:43 +00:00
|
|
|
data-port = var.data-port
|
|
|
|
dns-servers = var.dns-servers
|
2023-11-29 10:40:29 +00:00
|
|
|
enable-local-dhcp-and-metadata = "true"
|
|
|
|
firewall-driver = "openvswitch"
|
2024-05-07 19:23:43 +00:00
|
|
|
worker-multiplier = var.worker-multiplier
|
2023-11-29 10:40:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-12-15 16:35:17 +00:00
|
|
|
resource "juju_application" "sysconfig-compute" {
|
|
|
|
name = "sysconfig-compute"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-12-15 16:35:17 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "sysconfig"
|
|
|
|
channel = "latest/stable"
|
|
|
|
revision = "19"
|
|
|
|
}
|
|
|
|
|
2024-05-02 20:44:41 +00:00
|
|
|
units = 0
|
|
|
|
|
2023-12-15 16:35:17 +00:00
|
|
|
config = {
|
|
|
|
# enable-iommu = "false"
|
|
|
|
governor = "performance"
|
|
|
|
enable-pti = "on"
|
|
|
|
update-grub = "true"
|
|
|
|
enable-tsx = "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-11-29 10:40:29 +00:00
|
|
|
resource "juju_integration" "compute-ceilometer" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-11-29 10:40:29 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.nova-compute-kvm.name
|
2023-11-29 10:40:29 +00:00
|
|
|
endpoint = "nova-ceilometer"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.ceilometer-agent.name
|
2023-11-29 10:40:29 +00:00
|
|
|
endpoint = "nova-ceilometer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "compute-ovs" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-11-29 10:40:29 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.neutron-openvswitch.name
|
2023-11-29 10:40:29 +00:00
|
|
|
endpoint = "neutron-plugin"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.nova-compute-kvm.name
|
2023-11-29 10:40:29 +00:00
|
|
|
endpoint = "neutron-plugin"
|
|
|
|
}
|
|
|
|
}
|
2023-12-15 16:35:17 +00:00
|
|
|
|
|
|
|
resource "juju_integration" "compute-sysconfig" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-12-15 16:35:17 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.nova-compute-kvm.name
|
2023-12-15 16:35:17 +00:00
|
|
|
endpoint = "juju-info"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.sysconfig-compute.name
|
2023-12-15 16:35:17 +00:00
|
|
|
endpoint = "juju-info"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "compute-ceph-mon" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-12-15 16:35:17 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.nova-compute-kvm.name
|
2023-12-15 16:35:17 +00:00
|
|
|
endpoint = "ceph"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.ceph-mon.name
|
2023-12-15 16:35:17 +00:00
|
|
|
endpoint = "client"
|
|
|
|
}
|
|
|
|
}
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
resource "juju_integration" "neutron-api-ovs" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.neutron-openvswitch.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "neutron-plugin-api"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.neutron-api.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "neutron-plugin-api"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "nova-compute-rmq" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.nova-compute-kvm.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "amqp"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.rabbitmq-server.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "amqp"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "neutron-ovs-rmq" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.neutron-openvswitch.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "amqp"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.rabbitmq-server.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "amqp"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "ceilometer-agent-rmq" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.ceilometer-agent.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "amqp"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.rabbitmq-server.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "amqp"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "nova-compute-glance" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.nova-compute-kvm.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "image-service"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.glance.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "image-service"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "nova-compute-cinder-ceph" {
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.nova-compute-kvm.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "ceph-access"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.cinder-ceph.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "ceph-access"
|
|
|
|
}
|
|
|
|
}
|