From 7df6da2445e0bfb8d1991d051e3b8bee50a94d26 Mon Sep 17 00:00:00 2001 From: Krishna Harsha Voora Date: Tue, 20 Jul 2021 04:24:01 -0400 Subject: [PATCH 1/2] Add ppc64le support on multiarch docker images Signed-off-by: Krishna Harsha Voora --- docker/Makefile | 2 +- docker/debug/Dockerfile | 2 +- scripts/build-all-in-one-image.sh | 3 ++- scripts/build-upload-docker-images.sh | 3 ++- scripts/hotrod-integration-test.sh | 3 ++- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docker/Makefile b/docker/Makefile index 44ac62e66bf..edb6897c49a 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -5,7 +5,7 @@ GOLANG_IMAGE := golang:1.15-alpine BASE_IMAGE := localhost:5000/baseimg_alpine:latest DEBUG_IMAGE := localhost:5000/debugimg_alpine:latest -PLATFORMS := linux/amd64,linux/s390x,linux/arm64 +PLATFORMS := linux/amd64,linux/s390x,linux/ppc64le,linux/arm64 create-baseimg-debugimg: create-baseimg create-debugimg diff --git a/docker/debug/Dockerfile b/docker/debug/Dockerfile index ab25713e891..5160509c46a 100644 --- a/docker/debug/Dockerfile +++ b/docker/debug/Dockerfile @@ -5,7 +5,7 @@ ARG TARGETARCH ENV GOPATH /go RUN apk add --update --no-cache ca-certificates make git #Once go-delve adds support for s390x (see PR #2948), remove this entire conditional. -RUN if [[ "$TARGETARCH" != "s390x" ]] ; then \ +RUN if [[ "$TARGETARCH" != "s390x" ] || [ "$TARGETARCH" != "ppc64le" ]] ; then \ go get github.com/go-delve/delve/cmd/dlv && \ cd /go/src/github.com/go-delve/delve && \ make install; \ diff --git a/scripts/build-all-in-one-image.sh b/scripts/build-all-in-one-image.sh index 6dd6985384d..b82795451d7 100755 --- a/scripts/build-all-in-one-image.sh +++ b/scripts/build-all-in-one-image.sh @@ -38,8 +38,9 @@ make create-baseimg-debugimg make build-all-in-one GOOS=linux GOARCH=amd64 make build-all-in-one GOOS=linux GOARCH=s390x +make build-all-in-one GOOS=linux GOARCH=ppc64le make build-all-in-one GOOS=linux GOARCH=arm64 -platforms="linux/amd64,linux/s390x,linux/arm64" +platforms="linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" repo=jaegertracing/all-in-one #build all-in-one image locally for integration test bash scripts/build-upload-a-docker-image.sh -l -b -c all-in-one -d cmd/all-in-one -p "${platforms}" -t release diff --git a/scripts/build-upload-docker-images.sh b/scripts/build-upload-docker-images.sh index 5b8716aad2f..fd28807be97 100644 --- a/scripts/build-upload-docker-images.sh +++ b/scripts/build-upload-docker-images.sh @@ -7,10 +7,11 @@ make create-baseimg-debugimg # build multi-arch binaries make build-binaries-linux make build-binaries-s390x +make build-binaries-ppc64le make build-binaries-arm64 # build multi-arch docker images -platforms="linux/amd64,linux/s390x,linux/arm64" +platforms="linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" # build/upload images for release version of Jaeger backend components for component in agent collector query ingester diff --git a/scripts/hotrod-integration-test.sh b/scripts/hotrod-integration-test.sh index 3436e75e323..07c7c659e3e 100755 --- a/scripts/hotrod-integration-test.sh +++ b/scripts/hotrod-integration-test.sh @@ -4,10 +4,11 @@ set -euxf -o pipefail make build-examples GOOS=linux GOARCH=amd64 make build-examples GOOS=linux GOARCH=s390x +make build-examples GOOS=linux GOARCH=ppc64le make build-examples GOOS=linux GOARCH=arm64 REPO=jaegertracing/example-hotrod -platforms="linux/amd64,linux/s390x,linux/arm64" +platforms="linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" #build image locally for integration test bash scripts/build-upload-a-docker-image.sh -l -c example-hotrod -d examples/hotrod -p "${platforms}" From 5468b511e76a71d22791dfd866e8bf2688ea5ea8 Mon Sep 17 00:00:00 2001 From: Krishna Harsha Voora Date: Thu, 22 Jul 2021 01:39:55 -0400 Subject: [PATCH 2/2] Update the if-else condition Signed-off-by: Krishna Harsha Voora --- docker/debug/Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker/debug/Dockerfile b/docker/debug/Dockerfile index 5160509c46a..a0bf9d1a84f 100644 --- a/docker/debug/Dockerfile +++ b/docker/debug/Dockerfile @@ -5,12 +5,13 @@ ARG TARGETARCH ENV GOPATH /go RUN apk add --update --no-cache ca-certificates make git #Once go-delve adds support for s390x (see PR #2948), remove this entire conditional. -RUN if [[ "$TARGETARCH" != "s390x" ] || [ "$TARGETARCH" != "ppc64le" ]] ; then \ +#Once go-delve adds support for ppc64le (see PR go-delve/delve#1564), remove this entire conditional. +RUN if [[ "$TARGETARCH" == "s390x" || "$TARGETARCH" == "ppc64le" ]] ; then \ + touch /go/bin/dlv; \ + else \ go get github.com/go-delve/delve/cmd/dlv && \ cd /go/src/github.com/go-delve/delve && \ make install; \ - else \ - touch /go/bin/dlv; \ fi FROM $golang_image