mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-12-15 16:09:39 -05:00
AB#2114 Add QEMU metadata API (#237)
* Add QEMU metadata API * API server is started automatically when using terraform to deploy a QEMU cluster * Enable QEMU metadata usage for disk-mapper, debugd and the Coordinator Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
b0aafd0c2a
commit
040e498b42
17 changed files with 648 additions and 23 deletions
|
|
@ -6,6 +6,7 @@ Prerequisite:
|
|||
|
||||
- [qcow2 constellation image](/image/)
|
||||
- [setup](#setup-libvirt--terraform)
|
||||
- [qemu-metadata-api](/hack/qemu-metadata-api/README.md)
|
||||
|
||||
Optional: Write a `terraform.tfvars` file in the terraform workspace (`terraform/libvirt`), defining required variables and overriding optional variables.
|
||||
See [variables.tf](./variables.tf) for a description of all available variables.
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ terraform {
|
|||
source = "dmacvicar/libvirt"
|
||||
version = "0.6.14"
|
||||
}
|
||||
docker = {
|
||||
source = "kreuzwerker/docker"
|
||||
version = "2.17.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -11,6 +15,32 @@ provider "libvirt" {
|
|||
uri = "qemu:///session"
|
||||
}
|
||||
|
||||
provider "docker" {
|
||||
host = "unix:///var/run/docker.sock"
|
||||
|
||||
registry_auth {
|
||||
address = "ghcr.io"
|
||||
config_file = pathexpand("~/.docker/config.json")
|
||||
}
|
||||
}
|
||||
|
||||
resource "docker_image" "qemu-metadata" {
|
||||
name = "ghcr.io/edgelesssys/constellation/qemu-metadata-api:latest"
|
||||
keep_locally = true
|
||||
}
|
||||
|
||||
resource "docker_container" "qemu-metadata" {
|
||||
name = "qemu-metadata"
|
||||
image = docker_image.qemu-metadata.latest
|
||||
network_mode = "host"
|
||||
rm = true
|
||||
mounts {
|
||||
source = "/var/run/libvirt/libvirt-sock"
|
||||
target = "/var/run/libvirt/libvirt-sock"
|
||||
type = "bind"
|
||||
}
|
||||
}
|
||||
|
||||
module "control_plane" {
|
||||
source = "./modules/instance_group"
|
||||
role = "control-plane"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue