Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 4.validation_and_observability/3.efa-node-exporter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ ARG PROCFS_EXPORTER_VERSION=v0.19.2

# Install ProcFS
RUN git clone -b $PROCFS_EXPORTER_VERSION https://github.com/prometheus/procfs.git /workspace/procfs
COPY class_amazon_efa.go /workspace/procfs/sysfs/
COPY class_amazon_efa.go /workspace/procfs/sysfs/
RUN cd /workspace/procfs && make test

# Install Node Exporter
RUN git clone -b $NODE_EXPORTER_VERSION https://github.com/prometheus/node_exporter.git /workspace/node_exporter
COPY amazon_efa_linux.go /workspace/node_exporter/collector/

WORKDIR /workspace/node_exporter
RUN go mod edit --replace=github.com/prometheus/procfs=/workspace/procfs
RUN go mod tidy && CGO_ENABLED=0 go build -o /go/bin/node_exporter
RUN go mod edit --replace=github.com/prometheus/procfs=/workspace/procfs
RUN go mod tidy && CGO_ENABLED=0 go build -o /go/bin/node_exporter

FROM gcr.io/distroless/static-debian12
COPY --from=build /go/bin/node_exporter /workspace/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ phases:
- docker image tag ${REPO_URI}:${TAG} public.ecr.aws/hpc-cloud/${ECR_REPOSITORY_NAME}:latest
- docker push public.ecr.aws/hpc-cloud/${ECR_REPOSITORY_NAME}:${TAG}
- docker push public.ecr.aws/hpc-cloud/${ECR_REPOSITORY_NAME}:latest

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '2.1'
version: "2.1"

services:

node_exporter_efa:
build: .
container_name: node_exporter_efa
Expand All @@ -10,9 +9,9 @@ services:
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
- "--path.procfs=/host/proc"
- "--path.rootfs=/rootfs"
- "--path.sysfs=/host/sys"
- "--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)"
restart: unless-stopped
network_mode: host