improve db format for templates,

add additional per user customization for instance network interfaces,
update tempalte localdb
This commit is contained in:
2023-06-29 02:07:57 +00:00
parent 7719911d5a
commit 81d2841b79
2 changed files with 49 additions and 29 deletions

View File

@@ -88,31 +88,32 @@
}
},
"users": {
"exampleuser@authrealm": {
"exampleuser@examplepool": {
"resources": {
"max": {
"cpu": ["kvm64", "host"],
"cores": 0,
"memory": 0,
"swap": 0,
"local": 0,
"cephpl": 0,
"network": 0,
"pci": ["[GeForce GTX 1070]", "[GeForce GTX 1080 Ti]"]
"cores": 128,
"memory": 131072,
"swap": 131072,
"local": 1099511627776,
"cephpl": 1099511627776,
"network": 100000,
"pci": ["Device Name Matcher 1", "Device Name Matcher 2"]
}
},
"nodes": [
"node1",
"node2"
"examplenode1",
"examplenode2"
],
"instances": {
"cluster": {
"vmid": {
"min": 100,
"max": 199
"min": 200,
"max": 299
},
"pool": "exampleuserpool",
"vlan": "10",
"templates": {
"pool": "examplepool"
},
"templates": {
"instances": {
"lxc": {
"net0": {
"value": "name=eth0,bridge=vmbr0,ip=dhcp,ip6=dhcp,tag=10,type=veth,rate=1000",
@@ -123,6 +124,10 @@
}
},
"qemu": {
"cpu": {
"value": "host",
"resource": null
},
"net0": {
"value": "virtio,bridge=vmbr0,tag=10,rate=1000",
"resource": {
@@ -131,6 +136,21 @@
}
}
}
},
"network": {
"lxc": {
"type": "veth",
"bridge": "vmbr0",
"vlan": 10,
"ip": "dhcp",
"ip6": "dhcp"
},
"qemu": {
"type": "virtio",
"bridge": "vmbr0",
"vlan": 10
}
}
}
}