2023-12-15 16:35:17 +00:00
|
|
|
resource "juju_application" "neutron-gateway" {
|
|
|
|
name = "neutron-gateway"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2023-12-15 16:35:17 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "neutron-gateway"
|
2024-05-07 19:23:43 +00:00
|
|
|
channel = var.openstack-channel
|
2023-12-15 16:35:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
units = 3
|
|
|
|
placement = "${join(",",sort([
|
|
|
|
juju_machine.all_machines["100"].machine_id,
|
|
|
|
juju_machine.all_machines["101"].machine_id,
|
|
|
|
juju_machine.all_machines["102"].machine_id,
|
|
|
|
]))}"
|
|
|
|
|
|
|
|
|
|
|
|
config = {
|
|
|
|
worker-multiplier = var.worker-multiplier
|
|
|
|
openstack-origin = var.openstack-origin
|
|
|
|
bridge-mappings = var.bridge-mappings
|
|
|
|
data-port = var.data-port
|
|
|
|
aa-profile-mode = "enforce"
|
|
|
|
dns-servers = var.dns-servers
|
|
|
|
customize-failure-domain = var.customize-failure-domain
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-05-06 16:44:43 +00:00
|
|
|
resource "juju_machine" "neutron-api-1" {
|
2024-05-07 19:23:43 +00:00
|
|
|
model = var.model-name
|
|
|
|
placement = join(":",["lxd",juju_machine.all_machines["100"].machine_id])
|
2024-05-06 16:44:43 +00:00
|
|
|
constraints = "spaces=oam"
|
|
|
|
}
|
|
|
|
resource "juju_machine" "neutron-api-2" {
|
2024-05-07 19:23:43 +00:00
|
|
|
model = var.model-name
|
|
|
|
placement = join(":",["lxd",juju_machine.all_machines["101"].machine_id])
|
2024-05-06 16:44:43 +00:00
|
|
|
constraints = "spaces=oam"
|
|
|
|
}
|
|
|
|
resource "juju_machine" "neutron-api-3" {
|
2024-05-07 19:23:43 +00:00
|
|
|
model = var.model-name
|
|
|
|
placement = join(":",["lxd",juju_machine.all_machines["102"].machine_id])
|
2024-05-06 16:44:43 +00:00
|
|
|
constraints = "spaces=oam"
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_application" "neutron-api" {
|
|
|
|
name = "neutron-api"
|
|
|
|
|
2024-05-07 16:12:07 +00:00
|
|
|
model = var.model-name
|
2024-05-06 16:44:43 +00:00
|
|
|
|
|
|
|
charm {
|
|
|
|
name = "neutron-api"
|
2024-05-07 19:23:43 +00:00
|
|
|
channel = var.openstack-channel
|
2024-05-06 16:44:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
units = 3
|
|
|
|
|
|
|
|
placement = "${join(",",sort([
|
|
|
|
juju_machine.neutron-api-1.machine_id,
|
|
|
|
juju_machine.neutron-api-2.machine_id,
|
|
|
|
juju_machine.neutron-api-3.machine_id,
|
|
|
|
]))}"
|
|
|
|
|
|
|
|
endpoint_bindings = [{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.oam-space
|
2024-05-06 16:44:43 +00:00
|
|
|
},{
|
|
|
|
endpoint = "public"
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.public-space
|
2024-05-06 16:44:43 +00:00
|
|
|
},{
|
|
|
|
endpoint = "admin"
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.admin-space
|
2024-05-06 16:44:43 +00:00
|
|
|
},{
|
|
|
|
endpoint = "internal"
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.internal-space
|
2024-05-06 16:44:43 +00:00
|
|
|
},{
|
|
|
|
endpoint = "shared-db"
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.internal-space
|
2024-05-06 16:44:43 +00:00
|
|
|
}]
|
|
|
|
|
|
|
|
config = {
|
2024-05-07 19:23:43 +00:00
|
|
|
worker-multiplier = var.worker-multiplier
|
|
|
|
openstack-origin = var.openstack-origin
|
|
|
|
region = var.openstack-region
|
|
|
|
vip = var.vips["neutron-api"]
|
|
|
|
neutron-security-groups = "true"
|
|
|
|
#overlay-network-type = "vxlan gre"
|
|
|
|
overlay-network-type = "vxlan"
|
|
|
|
use-internal-endpoints = "true"
|
|
|
|
enable-l3ha = "true"
|
|
|
|
dhcp-agents-per-network = "2"
|
2024-05-06 16:44:43 +00:00
|
|
|
enable-ml2-port-security = "true"
|
2024-05-07 19:23:43 +00:00
|
|
|
l2-population = "true"
|
|
|
|
#global-physnet-mtu = "9000"
|
|
|
|
vlan-ranges = "physnet1:350:599"
|
|
|
|
flat-network-providers = "physnet1"
|
|
|
|
enable-vlan-trunking = "true"
|
2024-05-06 16:44:43 +00:00
|
|
|
default-tenant-network-type = "vxlan"
|
|
|
|
manage-neutron-plugin-legacy-mode = "true"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_application" "neutron-mysql-router" {
|
|
|
|
name = "neutron-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 = [{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.oam-space
|
2024-05-06 16:44:43 +00:00
|
|
|
},{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.internal-space
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "shared-db"
|
|
|
|
},{
|
2024-05-07 19:23:43 +00:00
|
|
|
space = var.internal-space
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "db-router"
|
|
|
|
}]
|
2023-12-15 16:35:17 +00:00
|
|
|
|
2024-05-06 16:44:43 +00:00
|
|
|
config = {
|
|
|
|
source = var.openstack-origin
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_application" "hacluster-neutron" {
|
|
|
|
name = "hacluster-neutron"
|
|
|
|
|
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" "neutron-ha" {
|
|
|
|
|
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-api.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "ha"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.hacluster-neutron.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "ha"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "neutron-mysql" {
|
|
|
|
|
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-api.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "shared-db"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.neutron-mysql-router.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "shared-db"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "neutron-db" {
|
|
|
|
|
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-mysql-router.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "db-router"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.mysql-innodb-cluster.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "db-router"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "neutron-keystone" {
|
|
|
|
|
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-api.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "identity-service"
|
|
|
|
}
|
|
|
|
|
|
|
|
application {
|
2024-05-07 19:23:43 +00:00
|
|
|
name = juju_application.keystone.name
|
2024-05-06 16:44:43 +00:00
|
|
|
endpoint = "identity-service"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "juju_integration" "neutron-api-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-api.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-gw-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-gateway.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"
|
|
|
|
}
|
|
|
|
}
|