Finalise basic openstack bundle
This commit is contained in:
parent
f1b2063a93
commit
3b311ce95c
@ -56,6 +56,7 @@ resource "juju_application" "keystone" {
|
||||
region = var.openstack-region
|
||||
preferred-api-version = "3"
|
||||
token-provider = "fernet"
|
||||
admin-password = "openstack"
|
||||
}
|
||||
}
|
||||
|
||||
|
100
juju/home-maas/05-ceilometer.tf
Normal file
100
juju/home-maas/05-ceilometer.tf
Normal file
@ -0,0 +1,100 @@
|
||||
resource "juju_machine" "ceilometer-1" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["103"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
resource "juju_machine" "ceilometer-2" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["104"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
resource "juju_machine" "ceilometer-3" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["105"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
|
||||
|
||||
resource "juju_application" "ceilometer" {
|
||||
name = "ceilometer"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "ceilometer"
|
||||
channel = "ussuri/stable"
|
||||
}
|
||||
|
||||
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 = [{
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "public"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "admin"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "internal"
|
||||
space = "oam"
|
||||
}]
|
||||
|
||||
config = {
|
||||
openstack-origin = var.openstack-origin
|
||||
region = var.openstack-region
|
||||
use-internal-endpoints = "true"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "ceilometer-rmq" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.ceilometer.name
|
||||
endpoint = "amqp"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.rabbitmq-server.name
|
||||
endpoint = "amqp"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "ceilometer-keystone" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.ceilometer.name
|
||||
endpoint = "identity-credentials"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.keystone.name
|
||||
endpoint = "identity-credentials"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "ceilometer-ceil-agent" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.ceilometer.name
|
||||
endpoint = "ceilometer-service"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.ceilometer-agent.name
|
||||
endpoint = "ceilometer-service"
|
||||
}
|
||||
}
|
||||
|
226
juju/home-maas/05-gnocchi.tf
Normal file
226
juju/home-maas/05-gnocchi.tf
Normal file
@ -0,0 +1,226 @@
|
||||
resource "juju_machine" "gnocchi-1" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["103"].machine_id])
|
||||
constraints = "spaces=oam,ceph-access"
|
||||
}
|
||||
resource "juju_machine" "gnocchi-2" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["104"].machine_id])
|
||||
constraints = "spaces=oam,ceph-access"
|
||||
}
|
||||
resource "juju_machine" "gnocchi-3" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["105"].machine_id])
|
||||
constraints = "spaces=oam,ceph-access"
|
||||
}
|
||||
|
||||
|
||||
resource "juju_application" "gnocchi" {
|
||||
name = "gnocchi"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "gnocchi"
|
||||
channel = "ussuri/stable"
|
||||
}
|
||||
|
||||
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 = [{
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "public"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "admin"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "internal"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "shared-db"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "storage-ceph"
|
||||
space = "ceph-access"
|
||||
},{
|
||||
endpoint = "coordinator-memcached"
|
||||
space = "oam"
|
||||
}]
|
||||
|
||||
config = {
|
||||
worker-multiplier = var.worker-multiplier
|
||||
openstack-origin = var.openstack-origin
|
||||
vip = "10.0.1.220"
|
||||
region = var.openstack-region
|
||||
use-internal-endpoints = "true"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_application" "gnocchi-mysql-router" {
|
||||
name = "gnocchi-mysql-router"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "mysql-router"
|
||||
channel = "8.0/stable"
|
||||
}
|
||||
|
||||
units = 0
|
||||
|
||||
endpoint_bindings = [{
|
||||
space = "oam"
|
||||
},{
|
||||
space = "oam"
|
||||
endpoint = "shared-db"
|
||||
},{
|
||||
space = "oam"
|
||||
endpoint = "db-router"
|
||||
}]
|
||||
|
||||
config = {
|
||||
source = var.openstack-origin
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_application" "hacluster-gnocchi" {
|
||||
name = "hacluster-gnocchi"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "hacluster"
|
||||
channel = "2.0.3/stable"
|
||||
}
|
||||
|
||||
units = 0
|
||||
}
|
||||
|
||||
resource "juju_integration" "gnocchi-ha" {
|
||||
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.gnocchi.name
|
||||
endpoint = "ha"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.hacluster-gnocchi.name
|
||||
endpoint = "ha"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "gnocchi-mysql" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.gnocchi.name
|
||||
endpoint = "shared-db"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.gnocchi-mysql-router.name
|
||||
endpoint = "shared-db"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "gnocchi-db" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.gnocchi-mysql-router.name
|
||||
endpoint = "db-router"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.mysql-innodb-cluster.name
|
||||
endpoint = "db-router"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "gnocchi-rmq" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.gnocchi.name
|
||||
endpoint = "amqp"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.rabbitmq-server.name
|
||||
endpoint = "amqp"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "gnocchi-keystone" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.gnocchi.name
|
||||
endpoint = "identity-service"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.keystone.name
|
||||
endpoint = "identity-service"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "gnocchi-ceph" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.gnocchi.name
|
||||
endpoint = "storage-ceph"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.ceph-mon.name
|
||||
endpoint = "client"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "gnocchi-memcache" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.gnocchi.name
|
||||
endpoint = "coordinator-memcached"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.memcached.name
|
||||
endpoint = "cache"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "gnocchi-ceilometer" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.gnocchi.name
|
||||
endpoint = "metric-service"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.ceilometer.name
|
||||
endpoint = "metric-service"
|
||||
}
|
||||
}
|
176
juju/home-maas/05-heat.tf
Normal file
176
juju/home-maas/05-heat.tf
Normal file
@ -0,0 +1,176 @@
|
||||
resource "juju_machine" "heat-1" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["100"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
resource "juju_machine" "heat-2" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["101"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
resource "juju_machine" "heat-3" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["102"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
|
||||
|
||||
resource "juju_application" "heat" {
|
||||
name = "heat"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "heat"
|
||||
channel = "ussuri/stable"
|
||||
}
|
||||
|
||||
units = 3
|
||||
|
||||
placement = "${join(",",sort([
|
||||
juju_machine.heat-1.machine_id,
|
||||
juju_machine.heat-2.machine_id,
|
||||
juju_machine.heat-3.machine_id,
|
||||
]))}"
|
||||
|
||||
endpoint_bindings = [{
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "public"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "admin"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "internal"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "shared-db"
|
||||
space = "oam"
|
||||
}]
|
||||
|
||||
config = {
|
||||
worker-multiplier = var.worker-multiplier
|
||||
openstack-origin = var.openstack-origin
|
||||
region = var.openstack-region
|
||||
vip = "10.0.1.215"
|
||||
use-internal-endpoints = "true"
|
||||
config-flags = "max_nested_stack_depth=20"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_application" "heat-mysql-router" {
|
||||
name = "heat-mysql-router"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "mysql-router"
|
||||
channel = "8.0/stable"
|
||||
}
|
||||
|
||||
units = 0
|
||||
|
||||
endpoint_bindings = [{
|
||||
space = "oam"
|
||||
},{
|
||||
space = "oam"
|
||||
endpoint = "shared-db"
|
||||
},{
|
||||
space = "oam"
|
||||
endpoint = "db-router"
|
||||
}]
|
||||
|
||||
config = {
|
||||
source = var.openstack-origin
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_application" "hacluster-heat" {
|
||||
name = "hacluster-heat"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "hacluster"
|
||||
channel = "2.0.3/stable"
|
||||
}
|
||||
|
||||
units = 0
|
||||
}
|
||||
|
||||
resource "juju_integration" "heat-ha" {
|
||||
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.heat.name
|
||||
endpoint = "ha"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.hacluster-heat.name
|
||||
endpoint = "ha"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "heat-mysql" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.heat.name
|
||||
endpoint = "shared-db"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.heat-mysql-router.name
|
||||
endpoint = "shared-db"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "heat-db" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.heat-mysql-router.name
|
||||
endpoint = "db-router"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.mysql-innodb-cluster.name
|
||||
endpoint = "db-router"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "heat-rmq" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.heat.name
|
||||
endpoint = "amqp"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.rabbitmq-server.name
|
||||
endpoint = "amqp"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "heat-keystone" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.heat.name
|
||||
endpoint = "identity-service"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.keystone.name
|
||||
endpoint = "identity-service"
|
||||
}
|
||||
}
|
63
juju/home-maas/05-memcache.tf
Normal file
63
juju/home-maas/05-memcache.tf
Normal file
@ -0,0 +1,63 @@
|
||||
resource "juju_machine" "memcache-1" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["100"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
resource "juju_machine" "memcache-2" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["101"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
resource "juju_machine" "memcache-3" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["102"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
|
||||
resource "juju_application" "memcached" {
|
||||
name = "memcached"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "memcached"
|
||||
channel = "latest/stable"
|
||||
base = "ubuntu@20.04"
|
||||
}
|
||||
|
||||
units = 3
|
||||
|
||||
placement = "${join(",",sort([
|
||||
juju_machine.memcache-1.machine_id,
|
||||
juju_machine.memcache-2.machine_id,
|
||||
juju_machine.memcache-3.machine_id,
|
||||
]))}"
|
||||
|
||||
endpoint_bindings = [{
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "cache"
|
||||
space = "oam"
|
||||
}]
|
||||
|
||||
config = {
|
||||
allow-ufw-ip6-softfail = "true"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "nova-cloud-controller-memcache" {
|
||||
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-cloud-controller.name
|
||||
endpoint = "memcache"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.memcached.name
|
||||
endpoint = "cache"
|
||||
}
|
||||
}
|
||||
|
228
juju/home-maas/05-nova.tf
Normal file
228
juju/home-maas/05-nova.tf
Normal file
@ -0,0 +1,228 @@
|
||||
resource "juju_machine" "ncc-1" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["103"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
resource "juju_machine" "ncc-2" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["104"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
resource "juju_machine" "ncc-3" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["105"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
|
||||
|
||||
resource "juju_application" "nova-cloud-controller" {
|
||||
name = "nova-cloud-controller"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "nova-cloud-controller"
|
||||
channel = "ussuri/stable"
|
||||
}
|
||||
|
||||
units = 3
|
||||
|
||||
placement = "${join(",",sort([
|
||||
juju_machine.ncc-1.machine_id,
|
||||
juju_machine.ncc-2.machine_id,
|
||||
juju_machine.ncc-3.machine_id,
|
||||
]))}"
|
||||
|
||||
endpoint_bindings = [{
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "public"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "admin"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "internal"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "shared-db"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "memcache"
|
||||
space = "oam"
|
||||
}]
|
||||
|
||||
config = {
|
||||
worker-multiplier = var.worker-multiplier
|
||||
openstack-origin = var.openstack-origin
|
||||
region = var.openstack-region
|
||||
vip = "10.0.1.219"
|
||||
network-manager = "Neutron"
|
||||
console-access-protocol = "novnc"
|
||||
console-proxy-ip = "local"
|
||||
use-internal-endpoints = "true"
|
||||
ram-allocation-ratio: "1.0"
|
||||
cpu-allocation-ratio: "2.0"
|
||||
config-flags = "scheduler_max_attempts=20"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_application" "nova-cloud-controller-mysql-router" {
|
||||
name = "nova-cloud-controller-mysql-router"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "mysql-router"
|
||||
channel = "8.0/stable"
|
||||
}
|
||||
|
||||
units = 0
|
||||
|
||||
endpoint_bindings = [{
|
||||
space = "oam"
|
||||
},{
|
||||
space = "oam"
|
||||
endpoint = "shared-db"
|
||||
},{
|
||||
space = "oam"
|
||||
endpoint = "db-router"
|
||||
}]
|
||||
|
||||
config = {
|
||||
source = var.openstack-origin
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_application" "hacluster-nova" {
|
||||
name = "hacluster-nova"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "hacluster"
|
||||
channel = "2.0.3/stable"
|
||||
}
|
||||
|
||||
units = 0
|
||||
}
|
||||
|
||||
resource "juju_integration" "nova-cloud-controller-ha" {
|
||||
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-cloud-controller.name
|
||||
endpoint = "ha"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.hacluster-nova.name
|
||||
endpoint = "ha"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "nova-cloud-controller-mysql" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-cloud-controller.name
|
||||
endpoint = "shared-db"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.nova-cloud-controller-mysql-router.name
|
||||
endpoint = "shared-db"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "nova-cloud-controller-db" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-cloud-controller-mysql-router.name
|
||||
endpoint = "db-router"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.mysql-innodb-cluster.name
|
||||
endpoint = "db-router"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "nova-cloud-controller-rmq" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-cloud-controller.name
|
||||
endpoint = "amqp"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.rabbitmq-server.name
|
||||
endpoint = "amqp"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "nova-cloud-controller-keystone" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-cloud-controller.name
|
||||
endpoint = "identity-service"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.keystone.name
|
||||
endpoint = "identity-service"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "nova-cloud-controller-neutron" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-cloud-controller.name
|
||||
endpoint = "neutron-api"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.neutron-api.name
|
||||
endpoint = "neutron-api"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "nova-cloud-controller-nova-compute" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-cloud-controller.name
|
||||
endpoint = "cloud-compute"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.nova-compute-kvm.name
|
||||
endpoint = "cloud-compute"
|
||||
}
|
||||
}
|
||||
resource "juju_integration" "nova-cloud-controller-glance" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-cloud-controller.name
|
||||
endpoint = "image-service"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.glance.name
|
||||
endpoint = "image-service"
|
||||
}
|
||||
}
|
174
juju/home-maas/05-placement.tf
Normal file
174
juju/home-maas/05-placement.tf
Normal file
@ -0,0 +1,174 @@
|
||||
resource "juju_machine" "placement-1" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["103"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
resource "juju_machine" "placement-2" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["104"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
resource "juju_machine" "placement-3" {
|
||||
model = juju_model.cpe-focal.name
|
||||
placement = join(":",["lxd",juju_machine.all_machines["105"].machine_id])
|
||||
constraints = "spaces=oam"
|
||||
}
|
||||
|
||||
resource "juju_application" "placement" {
|
||||
name = "placement"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "placement"
|
||||
channel = "ussuri/stable"
|
||||
}
|
||||
|
||||
units = 3
|
||||
|
||||
placement = "${join(",",sort([
|
||||
juju_machine.placement-1.machine_id,
|
||||
juju_machine.placement-2.machine_id,
|
||||
juju_machine.placement-3.machine_id,
|
||||
]))}"
|
||||
|
||||
endpoint_bindings = [{
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "public"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "admin"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "internal"
|
||||
space = "oam"
|
||||
},{
|
||||
endpoint = "shared-db"
|
||||
space = "oam"
|
||||
}]
|
||||
|
||||
config = {
|
||||
worker-multiplier = var.worker-multiplier
|
||||
openstack-origin = var.openstack-origin
|
||||
vip = "10.0.1.223"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_application" "placement-mysql-router" {
|
||||
name = "placement-mysql-router"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "mysql-router"
|
||||
channel = "8.0/stable"
|
||||
}
|
||||
|
||||
units = 0
|
||||
|
||||
endpoint_bindings = [{
|
||||
space = "oam"
|
||||
},{
|
||||
space = "oam"
|
||||
endpoint = "shared-db"
|
||||
},{
|
||||
space = "oam"
|
||||
endpoint = "db-router"
|
||||
}]
|
||||
|
||||
config = {
|
||||
source = var.openstack-origin
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_application" "hacluster-placement" {
|
||||
name = "hacluster-placement"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
charm {
|
||||
name = "hacluster"
|
||||
channel = "2.0.3/stable"
|
||||
}
|
||||
|
||||
units = 0
|
||||
}
|
||||
|
||||
|
||||
|
||||
resource "juju_integration" "placement-ha" {
|
||||
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.placement.name
|
||||
endpoint = "ha"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.hacluster-placement.name
|
||||
endpoint = "ha"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "placement-mysql" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.placement.name
|
||||
endpoint = "shared-db"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.placement-mysql-router.name
|
||||
endpoint = "shared-db"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "placement-db" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.placement-mysql-router.name
|
||||
endpoint = "db-router"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.mysql-innodb-cluster.name
|
||||
endpoint = "db-router"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "placement-keystone" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.placement.name
|
||||
endpoint = "identity-service"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.keystone.name
|
||||
endpoint = "identity-service"
|
||||
}
|
||||
}
|
||||
|
||||
resource "juju_integration" "placement-nova" {
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.placement.name
|
||||
endpoint = "placement"
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.nova-cloud-controller.name
|
||||
endpoint = "placement"
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
resource "juju_application" "nova-compute" {
|
||||
name = "nova-compute"
|
||||
resource "juju_application" "nova-compute-kvm" {
|
||||
name = "nova-compute-kvm"
|
||||
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
@ -131,7 +131,7 @@ resource "juju_integration" "compute-ceilometer" {
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-compute.name
|
||||
name = juju_application.nova-compute-kvm.name
|
||||
endpoint = "nova-ceilometer"
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ resource "juju_integration" "compute-ovs" {
|
||||
}
|
||||
|
||||
application {
|
||||
name = juju_application.nova-compute.name
|
||||
name = juju_application.nova-compute-kvm.name
|
||||
endpoint = "neutron-plugin"
|
||||
}
|
||||
}
|
||||
@ -161,7 +161,7 @@ resource "juju_integration" "compute-sysconfig" {
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-compute.name
|
||||
name = juju_application.nova-compute-kvm.name
|
||||
endpoint = "juju-info"
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ resource "juju_integration" "compute-ceph-mon" {
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-compute.name
|
||||
name = juju_application.nova-compute-kvm.name
|
||||
endpoint = "ceph"
|
||||
}
|
||||
|
||||
@ -206,7 +206,7 @@ resource "juju_integration" "nova-compute-rmq" {
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-compute.name
|
||||
name = juju_application.nova-compute-kvm.name
|
||||
endpoint = "amqp"
|
||||
}
|
||||
|
||||
@ -251,7 +251,7 @@ resource "juju_integration" "nova-compute-glance" {
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-compute.name
|
||||
name = juju_application.nova-compute-kvm.name
|
||||
endpoint = "image-service"
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ resource "juju_integration" "nova-compute-cinder-ceph" {
|
||||
model = juju_model.cpe-focal.name
|
||||
|
||||
application {
|
||||
name = juju_application.nova-compute.name
|
||||
name = juju_application.nova-compute-kvm.name
|
||||
endpoint = "ceph-access"
|
||||
}
|
||||
|
||||
|
@ -93,6 +93,9 @@ resource "juju_application" "neutron-api" {
|
||||
l2-population = "true"
|
||||
#global-physnet-mtu = "9000"
|
||||
manage-neutron-plugin-legacy-mode = "true"
|
||||
vlan-ranges = "physnet1:350:599"
|
||||
flat-network-providers = "physnet1"
|
||||
enable-vlan-trunking = "true"
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
cloud = "arif-home"
|
||||
domain_id = "3fd5a53e08e243b49ac3b171d57b4e4a"
|
||||
domain_id = "3ab4c220c60c475aa3cab2e7407c03f8"
|
||||
|
@ -1 +1,2 @@
|
||||
Ht8NdKTGdpJjRsS4V33tsVW4mSztgZMs
|
||||
sXNkqpmgprNs69SdF7jXM9JP9Nfc7m7n
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user