mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-10 07:50:08 -04: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
50
hack/qemu-metadata-api/README.md
Normal file
50
hack/qemu-metadata-api/README.md
Normal file
|
@ -0,0 +1,50 @@
|
|||
# QEMU metadata API
|
||||
|
||||
This program provides a metadata API for Constellation on QEMU.
|
||||
|
||||
## Dependencies
|
||||
|
||||
To interact with QEMU `libvirt` is required.
|
||||
Install the C libraries:
|
||||
|
||||
On Ubuntu:
|
||||
|
||||
```shell
|
||||
sudo apt install libvirt-dev
|
||||
```
|
||||
|
||||
On Fedora:
|
||||
|
||||
```shell
|
||||
sudo dnf install libvirt-devel
|
||||
```
|
||||
|
||||
## Firewalld
|
||||
|
||||
If your system uses `firewalld` virtmanager will add itself to the firewall rules managed by `firewalld`.
|
||||
Your VMs might be unable to communicate with the host.
|
||||
|
||||
To fix this open port `8080` (the default port for the QEMU metadata API) for the `libvirt` zone:
|
||||
|
||||
```shell
|
||||
# Open the port
|
||||
sudo firewall-cmd --zone libvirt --add-port 8080/tcp --permanent
|
||||
```
|
||||
|
||||
## Docker image
|
||||
|
||||
Build the image:
|
||||
|
||||
```shell
|
||||
DOCKER_BUILDKIT=1 docker build -t ghcr.io/edgelesssys/constellation/qemu-metadata-api:latest -f hack/qemu-metadata-api/Dockerfile .
|
||||
```
|
||||
|
||||
A container of the image is automatically started by Terraform.
|
||||
You can also run the image manually using the following command:
|
||||
|
||||
```shell
|
||||
docker run -it --rm \
|
||||
--network host \
|
||||
-v /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock \
|
||||
ghcr.io/edgelesssys/constellation/qemu-metadata-api:latest
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue