Skip to content

Commit 78d2f7d

Browse files
authored
Add s390x support on multiarch docker images (jaegertracing#2948)
1 parent 127293d commit 78d2f7d

27 files changed

+297
-237
lines changed

.github/workflows/ci-all-in-one-build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ on:
99
jobs:
1010
all-in-one:
1111
runs-on: ubuntu-latest
12+
services:
13+
registry:
14+
image: registry:2
15+
ports:
16+
- 5000:5000
1217
steps:
1318
- uses: actions/[email protected]
1419
with:
@@ -31,6 +36,12 @@ jobs:
3136

3237
- name: Install tools
3338
run: make install-ci
39+
40+
- uses: docker/setup-qemu-action@v1
41+
42+
- uses: docker/setup-buildx-action@v1
43+
with:
44+
driver-opts: network=host
3445

3546
- name: Build, test, and publish all-in-one image
3647
run: bash scripts/build-all-in-one-image.sh

.github/workflows/ci-crossdock.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ on:
99
jobs:
1010
crossdock:
1111
runs-on: ubuntu-latest
12+
services:
13+
registry:
14+
image: registry:2
15+
ports:
16+
- 5000:5000
1217
strategy:
1318
matrix:
1419
steps:
@@ -33,6 +38,12 @@ jobs:
3338

3439
- name: Install tools
3540
run: make install-ci
41+
42+
- uses: docker/setup-qemu-action@v1
43+
44+
- uses: docker/setup-buildx-action@v1
45+
with:
46+
driver-opts: network=host
3647

3748
- name: Build, test, and publish ${{ matrix.steps.name }} image
3849
run: ${{ matrix.steps.cmd }}

.github/workflows/ci-docker-build.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ on:
99
jobs:
1010
docker-images:
1111
runs-on: ubuntu-latest
12+
13+
services:
14+
registry:
15+
image: registry:2
16+
ports:
17+
- 5000:5000
18+
1219
steps:
1320
- uses: actions/[email protected]
1421
with:
@@ -32,11 +39,14 @@ jobs:
3239
- name: Install tools
3340
run: make install-ci
3441

35-
- name: Build docker images
36-
run: make docker
42+
- uses: docker/setup-qemu-action@v1
3743

38-
- name: Upload docker images
39-
run: bash scripts/upload-all-docker-images.sh
44+
- uses: docker/setup-buildx-action@v1
45+
with:
46+
driver-opts: network=host
47+
48+
- name: Build and upload all docker images
49+
run: bash scripts/build-upload-docker-images.sh
4050
env:
4151
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
4252
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}

.github/workflows/ci-hotrod.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ on:
99
jobs:
1010
hotrod:
1111
runs-on: ubuntu-latest
12+
services:
13+
registry:
14+
image: registry:2
15+
ports:
16+
- 5000:5000
1217
steps:
1318
- uses: actions/[email protected]
1419
with:
@@ -27,6 +32,12 @@ jobs:
2732

2833
- name: Install tools
2934
run: make install-ci
35+
36+
- uses: docker/setup-qemu-action@v1
37+
38+
- uses: docker/setup-buildx-action@v1
39+
with:
40+
driver-opts: network=host
3041

3142
- name: Build, test, and publish hotrod image
3243
run: bash scripts/hotrod-integration-test.sh

.github/workflows/ci-release.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88
jobs:
99
publish-release:
1010
runs-on: ubuntu-latest
11+
services:
12+
registry:
13+
image: registry:2
14+
ports:
15+
- 5000:5000
16+
1117
steps:
1218
- uses: actions/[email protected]
1319
with:
@@ -49,13 +55,14 @@ jobs:
4955
repo_token: ${{ secrets.GITHUB_TOKEN }}
5056
if: steps.package-binaries.outcome == 'success'
5157

52-
- name: Build docker images
53-
id: build-images
54-
run: make docker
58+
- uses: docker/setup-qemu-action@v1
5559

56-
- name: Upload docker images
57-
run: bash scripts/upload-all-docker-images.sh
58-
if: steps.build-images.outcome == 'success'
60+
- uses: docker/setup-buildx-action@v1
61+
with:
62+
driver-opts: network=host
63+
64+
- name: Build and upload all docker images
65+
run: bash scripts/build-upload-docker-images.sh
5966
env:
6067
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
6168
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}

Makefile

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,6 @@ build-collector build-collector-debug:
269269
build-ingester build-ingester-debug:
270270
$(GOBUILD) $(DISABLE_OPTIMIZATIONS) -o ./cmd/ingester/ingester$(SUFFIX)-$(GOOS)-$(GOARCH) $(BUILD_INFO) ./cmd/ingester/main.go
271271

272-
.PHONY: docker
273-
docker: build-binaries-linux docker-images-only
274-
275272
.PHONY: build-binaries-linux
276273
build-binaries-linux:
277274
GOOS=linux GOARCH=amd64 $(MAKE) build-platform-binaries
@@ -308,7 +305,8 @@ build-platform-binaries: build-agent \
308305
build-all-in-one \
309306
build-examples \
310307
build-tracegen \
311-
build-anonymizer
308+
build-anonymizer \
309+
build-esmapping-generator
312310

313311
.PHONY: build-all-platforms
314312
build-all-platforms: build-binaries-linux build-binaries-windows build-binaries-darwin build-binaries-s390x build-binaries-arm64 build-binaries-ppc64le
@@ -319,9 +317,10 @@ docker-images-cassandra:
319317
@echo "Finished building jaeger-cassandra-schema =============="
320318

321319
.PHONY: docker-images-elastic
322-
docker-images-elastic: build-esmapping-generator-linux
320+
docker-images-elastic:
321+
GOOS=linux GOARCH=$(GOARCH) $(MAKE) build-esmapping-generator
323322
docker build -t $(DOCKER_NAMESPACE)/jaeger-es-index-cleaner:${DOCKER_TAG} plugin/storage/es
324-
docker build -t $(DOCKER_NAMESPACE)/jaeger-es-rollover:${DOCKER_TAG} plugin/storage/es -f plugin/storage/es/Dockerfile.rollover
323+
docker build -t $(DOCKER_NAMESPACE)/jaeger-es-rollover:${DOCKER_TAG} plugin/storage/es -f plugin/storage/es/Dockerfile.rollover --build-arg TARGETARCH=$(GOARCH)
325324
@echo "Finished building jaeger-es-indices-clean =============="
326325

327326
docker-images-jaeger-backend: TARGET = release
@@ -358,21 +357,13 @@ docker-images-only: docker-images-cassandra \
358357
docker-images-tracegen \
359358
docker-images-anonymizer
360359

361-
.PHONY: docker-push
362-
docker-push:
363-
@while [ -z "$$CONFIRM" ]; do \
364-
read -r -p "Do you really want to push images to repository \"${DOCKER_NAMESPACE}\"? [y/N] " CONFIRM; \
365-
done ; \
366-
if [ $$CONFIRM != "y" ] && [ $$CONFIRM != "Y" ]; then \
367-
echo "Exiting." ; exit 1 ; \
368-
fi
369-
for component in agent cassandra-schema es-index-cleaner es-rollover collector query ingester example-hotrod tracegen anonymizer; do \
370-
docker push $(DOCKER_NAMESPACE)/jaeger-$$component ; \
371-
done
360+
.PHONY: build-crossdock-binary
361+
build-crossdock-binary:
362+
$(GOBUILD) -o ./crossdock/crossdock-$(GOOS)-$(GOARCH) ./crossdock/main.go
372363

373364
.PHONY: build-crossdock-linux
374365
build-crossdock-linux:
375-
GOOS=linux $(GOBUILD) -o ./crossdock/crossdock-linux ./crossdock/main.go
366+
GOOS=linux $(MAKE) build-crossdock-binary
376367

377368
include crossdock/rules.mk
378369

@@ -385,7 +376,7 @@ build-crossdock-ui-placeholder:
385376

386377
.PHONY: build-crossdock
387378
build-crossdock: build-crossdock-ui-placeholder build-binaries-linux build-crossdock-linux docker-images-cassandra docker-images-jaeger-backend
388-
docker build -t $(DOCKER_NAMESPACE)/test-driver:${DOCKER_TAG} crossdock/
379+
docker build -t $(DOCKER_NAMESPACE)/test-driver:${DOCKER_TAG} --build-arg TARGETARCH=$(GOARCH) crossdock/
389380
@echo "Finished building test-driver ==============" ; \
390381

391382
.PHONY: build-and-run-crossdock

cmd/agent/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ARG base_image
22
ARG debug_image
33

44
FROM $base_image AS release
5-
ARG TARGETARCH=amd64
5+
ARG TARGETARCH
66
ARG USER_UID=10001
77
COPY agent-linux-$TARGETARCH /go/bin/agent-linux
88
EXPOSE 5775/udp 6831/udp 6832/udp 5778/tcp

cmd/all-in-one/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ARG base_image
22
ARG debug_image
33

44
FROM $base_image AS release
5-
ARG TARGETARCH=amd64
5+
ARG TARGETARCH
66

77
# Agent zipkin.thrift compact
88
EXPOSE 5775/udp

cmd/anonymizer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM scratch
2-
ARG TARGETARCH=amd64
2+
ARG TARGETARCH
33

44
COPY anonymizer-linux-$TARGETARCH /go/bin/anonymizer-linux
55
ENTRYPOINT ["/go/bin/anonymizer-linux"]

cmd/collector/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ARG base_image
22
ARG debug_image
33

44
FROM $base_image AS release
5-
ARG TARGETARCH=amd64
5+
ARG TARGETARCH
66
COPY collector-linux-$TARGETARCH /go/bin/collector-linux
77
EXPOSE 14250/tcp
88
ENTRYPOINT ["/go/bin/collector-linux"]

0 commit comments

Comments
 (0)