constellation/cli/internal/libvirt
Moritz Sanft 968cdc1a38
cli: move cli/internal libraries (#2623)
* cli: move internal packages

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* cli: fix buildfiles

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* bazel: fix exclude dir

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

* cli: move back libraries that will not be used by TF provider

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>

---------

Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
2023-11-22 14:52:56 +01:00
..
etc cli: convert libvirt container image to Bazel 2023-04-18 15:35:15 +02:00
nvram cli: convert libvirt container image to Bazel 2023-04-18 15:35:15 +02:00
BUILD.bazel cli: move cli/internal libraries (#2623) 2023-11-22 14:52:56 +01:00
libvirt.go cli: use apply command to start mini cluster (#2551) 2023-11-20 12:10:16 +01:00
libvirtd.conf cli: convert libvirt container image to Bazel 2023-04-18 15:35:15 +02:00
qemu.conf cli: convert libvirt container image to Bazel 2023-04-18 15:35:15 +02:00
README.md bazel: remove apko and Dockerfile where Bazel is used to build container images 2023-04-18 15:35:15 +02:00
start.sh cli: convert libvirt container image to Bazel 2023-04-18 15:35:15 +02:00

Containerized libvirt

To avoid dependency issues with the libvirt setup of the host, we provide a containerized libvirt instance. If no libvirt connection string is provided in the Constellation config file during create, this container is deployed to provide a libvirt daemon for orchestrating Constellation nodes in QEMU.

The container will listen for libvirt connections on localhost:16599. Connecting to the libvirt daemon running in the container and manage the deployment using virsh run the following:

virsh -c "qemu+tcp://localhost:16599/system"

Docker image

Build the image:

bazel build //cli/internal/libvirt:constellation_libvirt
bazel build //bazel/release:libvirt_sum
bazel build //bazel/release:libvirt_tar
bazel run //bazel/release:libvirt_push

A container of the image is automatically started by the CLI. You can also run the image manually using the following command:

docker run -it --rm \
    --network host \
    --privileged true \
    ghcr.io/edgelesssys/constellation/libvirt:latest