mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-01 03:26: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
31
hack/qemu-metadata-api/Dockerfile
Normal file
31
hack/qemu-metadata-api/Dockerfile
Normal file
|
@ -0,0 +1,31 @@
|
|||
FROM fedora:36 as build
|
||||
|
||||
RUN dnf -y update && \
|
||||
dnf -y install libvirt-devel @development-tools pkg-config wget git && \
|
||||
dnf clean all
|
||||
|
||||
ARG GO_VER=1.18.3
|
||||
RUN wget https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz && \
|
||||
tar -C /usr/local -xzf go${GO_VER}.linux-amd64.tar.gz && \
|
||||
rm go${GO_VER}.linux-amd64.tar.gz
|
||||
ENV PATH ${PATH}:/usr/local/go/bin
|
||||
|
||||
WORKDIR /qemu-metadata-api
|
||||
COPY go.mod ./
|
||||
COPY go.sum ./
|
||||
RUN go mod download all
|
||||
|
||||
WORKDIR /qemu-metadata-api/hack
|
||||
COPY hack/go.mod ./go.mod
|
||||
COPY hack/go.sum ./go.sum
|
||||
RUN go mod download all
|
||||
|
||||
COPY . /qemu-metadata-api
|
||||
WORKDIR /qemu-metadata-api/hack/qemu-metadata-api
|
||||
RUN go build -o api-server ./main.go
|
||||
|
||||
FROM fedora:36 as release
|
||||
RUN dnf -y install libvirt-devel && \
|
||||
dnf clean all
|
||||
COPY --from=build /qemu-metadata-api/hack/qemu-metadata-api/api-server /server
|
||||
ENTRYPOINT [ "/server" ]
|
Loading…
Add table
Add a link
Reference in a new issue