From 1cb51f7a5736034ca33ed0234bb7734d4cdad425 Mon Sep 17 00:00:00 2001 From: gonzalezzfelipe Date: Fri, 1 Nov 2024 17:12:00 -0300 Subject: [PATCH] chore: Build image with all hydra components --- .github/workflows/{sidecar.yml => hydra.yml} | 8 ++++---- docker/{dockerfile.sidecar => dockerfile.hydra} | 13 ++++++------- 2 files changed, 10 insertions(+), 11 deletions(-) rename .github/workflows/{sidecar.yml => hydra.yml} (85%) rename docker/{dockerfile.sidecar => dockerfile.hydra} (73%) diff --git a/.github/workflows/sidecar.yml b/.github/workflows/hydra.yml similarity index 85% rename from .github/workflows/sidecar.yml rename to .github/workflows/hydra.yml index 868bc65..18456f6 100644 --- a/.github/workflows/sidecar.yml +++ b/.github/workflows/hydra.yml @@ -1,12 +1,12 @@ -name: Sidecar +name: Hydra on: push: branches: - "main" paths: - - ".github/workflows/sidecar.yml" - - "docker/dockerfile.sidecar" + - ".github/workflows/hydra.yml" + - "docker/dockerfile.hydra" workflow_dispatch: inputs: mumak_version: @@ -20,7 +20,7 @@ jobs: include: - context: . file: docker/dockerfile.sidecar - endpoint: demeter-run/doom-patrol-metrics-exporter + endpoint: demeter-run/doom-patrol-hydra continue-on-error: true runs-on: ubuntu-latest diff --git a/docker/dockerfile.sidecar b/docker/dockerfile.hydra similarity index 73% rename from docker/dockerfile.sidecar rename to docker/dockerfile.hydra index c2fd75f..eecd861 100644 --- a/docker/dockerfile.sidecar +++ b/docker/dockerfile.hydra @@ -1,19 +1,17 @@ ARG RUST_VERSION=1.81.0 -ARG BIN=operator FROM rust:${RUST_VERSION}-slim-bullseye AS build -ARG BIN WORKDIR /app RUN apt-get update && apt-get install -y libssl-dev pkg-config git - -ARG HYDRA_CONTROL_PLANE_COMMIT=b8ba5686cd4e96ee9b0470b7a5bd69178efd52b5 -RUN git clone https://github.com/gonzalezzfelipe/hydra-control-plane.git -RUN cd hydra-control-plane && git checkout fix/sidecar +RUN git clone https://github.com/scarmuega/hydra-control-plane.git +RUN cd hydra-control-plane && git checkout feat/k8s-integration WORKDIR /app/hydra-control-plane RUN cargo build --locked --release RUN cp ./target/release/metrics-exporter /bin/metrics-exporter +RUN cp ./target/release/open-head /bin/open-head +RUN cp ./target/release/control-plane /bin/control-plane FROM debian:bullseye-slim AS final @@ -32,6 +30,8 @@ WORKDIR /home/app # Copy the executable from the "build" stage. COPY --from=build /bin/metrics-exporter /bin/metrics-exporter +COPY --from=build /bin/open-head /bin/open-head +COPY --from=build /bin/control-plane /bin/control-plane # Configure rocket to listen on all interfaces. ENV ROCKET_ADDRESS=0.0.0.0 @@ -40,5 +40,4 @@ ENV ROCKET_PORT=8000 # Expose the port that the application listens on. EXPOSE 8000 -# What the container should run when it is started. CMD ["/bin/metrics-exporter"]