More terraform plans
* Add all the ceph juju resources * Initial start of the MAAS resources * test of a local-lxd juju environment
This commit is contained in:
parent
e25ea09ed4
commit
47b58e8c65
@ -1,4 +1,3 @@
|
||||
|
||||
resource "juju_application" "ceph-osd" {
|
||||
name = "ceph-osd"
|
||||
|
||||
@ -10,16 +9,24 @@ resource "juju_application" "ceph-osd" {
|
||||
}
|
||||
|
||||
units = 8
|
||||
#placement = "1000,1002,1003,1004,1005,1006,1007"
|
||||
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,
|
||||
]))}"
|
||||
|
||||
config = {
|
||||
osd-devices = var.osd-devices
|
||||
source = var.openstack-origin
|
||||
autotune = "false"
|
||||
aa-profile-mode = "complain"
|
||||
bluestore = "true"
|
||||
osd-encrypt = "true"
|
||||
osd-encrypt-keymanager = "vault"
|
||||
customize-failure-domain = "true"
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,6 +59,7 @@ resource "juju_application" "ceph-radosgw" {
|
||||
charm {
|
||||
name = "ceph-radosgw"
|
||||
channel = "octopus/stable"
|
||||
|
||||
}
|
||||
|
||||
units = 3
|
||||
@ -59,8 +67,10 @@ resource "juju_application" "ceph-radosgw" {
|
||||
config = {
|
||||
source: var.openstack-origin
|
||||
vip = "10.0.1.224"
|
||||
region = "RegionOne"
|
||||
operator-roles = "Member,admin" # Contrail requires admin and not Admin
|
||||
operator-roles = "Member,admin"
|
||||
os-admin-hostname = "swift-internal.example.com"
|
||||
os-internal-hostname = "swift-internal.example.com"
|
||||
os-public-hostname = "swift.example.com"
|
||||
}
|
||||
}
|
||||
|
||||
|
1
juju/local-lxd/00-init.tf
Symbolic link
1
juju/local-lxd/00-init.tf
Symbolic link
@ -0,0 +1 @@
|
||||
../init.tf
|
21
juju/local-lxd/01-cloud.tf
Normal file
21
juju/local-lxd/01-cloud.tf
Normal file
@ -0,0 +1,21 @@
|
||||
resource "juju_model" "default" {
|
||||
name = "default"
|
||||
|
||||
cloud {
|
||||
name = "localhost"
|
||||
region = "localhost"
|
||||
}
|
||||
|
||||
config = {
|
||||
cloudinit-userdata = file("user-data.yaml")
|
||||
|
||||
apt-mirror = "http://192.168.1.12/archive.ubuntu.com/ubuntu"
|
||||
lxd-snap-channel = "5.0/stable"
|
||||
|
||||
container-image-metadata-url = "http://192.168.1.12/lxd/"
|
||||
container-image-stream = "released"
|
||||
|
||||
agent-metadata-url = "http://192.168.1.12/juju/tools/"
|
||||
agent-stream = "released"
|
||||
}
|
||||
}
|
4
juju/local-lxd/user-data.yaml
Normal file
4
juju/local-lxd/user-data.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apt:
|
||||
primary:
|
||||
- arches: [amd64]
|
||||
uri: http://192.168.1.12/archive.ubuntu.com/ubuntu
|
1
maas/arif-home/00-init.tf
Symbolic link
1
maas/arif-home/00-init.tf
Symbolic link
@ -0,0 +1 @@
|
||||
../init.tf
|
16
maas/arif-home/00-spaces.tf
Normal file
16
maas/arif-home/00-spaces.tf
Normal file
@ -0,0 +1,16 @@
|
||||
locals {
|
||||
spaces = ["external","oam","ceph-access","ceph-replica","overlay","admin","internal"]
|
||||
}
|
||||
|
||||
resource "maas_space" "maas_spaces" {
|
||||
|
||||
for_each = toset(local.spaces)
|
||||
name = each.value
|
||||
|
||||
}
|
||||
|
||||
resource "maas_fabric" "fabric-0" {
|
||||
|
||||
name = "fabric-0"
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user