Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPC support #2308

Merged
merged 5 commits into from
Dec 2, 2022
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ jobs:
needs: [setup-environment]
strategy:
matrix:
SYS_BINARIES: [ "binaries-darwin_amd64", "binaries-linux_amd64", "binaries-linux_arm64", "binaries-windows_amd64" ]
SYS_BINARIES: [ "binaries-darwin_amd64", "binaries-linux_amd64", "binaries-linux_arm64", "binaries-windows_amd64", "binaries-linux_ppc64le" ]
steps:
- name: Check out the codebase.
uses: actions/checkout@v3
Expand Down Expand Up @@ -470,7 +470,7 @@ jobs:
needs: [cross-compile]
strategy:
matrix:
ARCH: [ "amd64", "arm64" ]
ARCH: [ "amd64", "arm64", "ppc64le" ]
steps:
- name: Check out the codebase.
uses: actions/checkout@v3
Expand All @@ -490,10 +490,10 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}

- name: Set up QEMU
if: ${{ matrix.ARCH == 'arm64'}}
if: ${{ matrix.ARCH != 'amd64'}}
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
platforms: ${{ matrix.ARCH }}

- name: Downloading binaries-linux_${{ matrix.ARCH }}
uses: actions/download-artifact@v3
Expand Down
11 changes: 7 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ compile:
stage: build
parallel:
matrix:
- TARGET: [binaries-darwin_amd64, binaries-linux_amd64, binaries-linux_arm64, binaries-windows_amd64]
- TARGET: [binaries-darwin_amd64, binaries-linux_amd64, binaries-linux_arm64, binaries-windows_amd64, binaries-linux_ppc64le]
script: make $TARGET
after_script:
- if [ -e bin/otelcol ]; then rm -f bin/otelcol; fi # remove the symlink
Expand Down Expand Up @@ -209,7 +209,7 @@ build-linux-image:
- compile
parallel:
matrix:
- ARCH: [amd64, arm64]
- ARCH: [amd64, arm64, ppc64le]
retry: 2
script:
- make docker-otelcol ARCH=${ARCH} SKIP_COMPILE=true
Expand Down Expand Up @@ -405,6 +405,7 @@ push-linux-image:
before_script:
- docker load -i dist/otelcol-amd64.tar
- docker load -i dist/otelcol-arm64.tar
- docker load -i dist/otelcol-ppc64le.tar
script:
- docker login -u $CIRCLECI_QUAY_USERNAME -p $CIRCLECI_QUAY_PASSWORD quay.io
- |
Expand All @@ -420,7 +421,7 @@ push-linux-image:
- |
# Tag and push images
set -e
for arch in "amd64" "arm64"; do
for arch in "amd64" "arm64" "ppc64le"; do
ARCH_TAG="${MANIFEST_TAG}-${arch}"
echo "Tagging and pushing ${IMAGE_NAME}:${ARCH_TAG}"
docker tag otelcol:${arch} ${IMAGE_NAME}:${ARCH_TAG}
Expand All @@ -442,17 +443,19 @@ push-linux-image:
if [[ "${CI_COMMIT_BRANCH:-}" = "main" ]] || [[ "${CI_COMMIT_TAG:-}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# only push latest manifest tag for main and stable releases
echo "Creating and pushing ${IMAGE_NAME}:latest manifest"
docker manifest create ${IMAGE_NAME}:latest --amend ${IMAGE_NAME}:latest-amd64 --amend ${IMAGE_NAME}:latest-arm64
docker manifest create ${IMAGE_NAME}:latest --amend ${IMAGE_NAME}:latest-amd64 --amend ${IMAGE_NAME}:latest-arm64 --amend ${IMAGE_NAME}:latest-ppc64le
docker manifest push ${IMAGE_NAME}:latest
fi
- docker pull ${IMAGE_NAME}:${MANIFEST_TAG}
- docker inspect --format='{{.RepoDigests}}' ${IMAGE_NAME}:${MANIFEST_TAG}-amd64 | tee dist/linux_amd64_digest.txt
- docker inspect --format='{{.RepoDigests}}' ${IMAGE_NAME}:${MANIFEST_TAG}-arm64 | tee dist/linux_arm64_digest.txt
- docker inspect --format='{{.RepoDigests}}' ${IMAGE_NAME}:${MANIFEST_TAG}-ppc64le | tee dist/linux_ppc64le_digest.txt
- docker manifest inspect ${IMAGE_NAME}:${MANIFEST_TAG} | tee dist/manifest_digest.txt
artifacts:
paths:
- dist/linux_amd64_digest.txt
- dist/linux_arm64_digest.txt
- dist/linux_ppc64le_digest.txt
- dist/manifest_digest.txt

build-push-windows-image:
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ endif
rm ./cmd/otelcol/collect-libs.sh

.PHONY: binaries-all-sys
binaries-all-sys: binaries-darwin_amd64 binaries-linux_amd64 binaries-linux_arm64 binaries-windows_amd64
binaries-all-sys: binaries-darwin_amd64 binaries-linux_amd64 binaries-linux_arm64 binaries-windows_amd64 binaries-linux_ppc64le

.PHONY: binaries-darwin_amd64
binaries-darwin_amd64:
Expand All @@ -198,6 +198,12 @@ binaries-windows_amd64:
GOOS=windows GOARCH=amd64 EXTENSION=.exe $(MAKE) translatesfx
GOOS=windows GOARCH=amd64 EXTENSION=.exe $(MAKE) migratecheckpoint

.PHONY: binaries-linux_ppc64le
binaries-linux_ppc64le:
GOOS=linux GOARCH=ppc64le $(MAKE) otelcol
GOOS=linux GOARCH=ppc64le $(MAKE) translatesfx
GOOS=linux GOARCH=ppc64le $(MAKE) migratecheckpoint

.PHONY: deb-rpm-tar-package
%-package:
ifneq ($(SKIP_COMPILE), true)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver v0.66.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.66.0
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.66.0
github.com/signalfx/golib/v3 v3.3.46
github.com/signalfx/golib/v3 v3.3.47
github.com/signalfx/signalfx-agent v1.0.1-0.20221111170137-60843d376e91
github.com/signalfx/splunk-otel-collector/extension/smartagentextension v0.0.0-00010101000000-000000000000
github.com/signalfx/splunk-otel-collector/processor/timestampprocessor v0.0.0-00010101000000-000000000000
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1995,8 +1995,8 @@ github.com/signalfx/gohistogram v0.0.0-20160107210732-1ccfd2ff5083/go.mod h1:adP
github.com/signalfx/golib v2.5.1+incompatible h1:rw16Flfx5Z29DahDSNGAA3ch8dOeNc3oOMUJm493yao=
github.com/signalfx/golib v2.5.1+incompatible/go.mod h1:nWYefOwlUKWm/SpN/LgVSBnyH1T9NpT1ANlmgRIi1Cs=
github.com/signalfx/golib/v3 v3.3.37/go.mod h1:zH70SVnrzVUqDmUFEwDk1HSwS71Pi2w3bSsNpnOtYuQ=
github.com/signalfx/golib/v3 v3.3.46 h1:eiR2kQA5eVTB7nqETfn8raeem8HZhOUNcuMRVzZnOOk=
github.com/signalfx/golib/v3 v3.3.46/go.mod h1:N7bdXqA6fGQQn03WHZRDXvyN/GUFI+BXjoJgidfncZU=
github.com/signalfx/golib/v3 v3.3.47 h1:awph3lTi4Yp766nIOUU1bgvaS8BxB4ujW0ZwByaxiYE=
github.com/signalfx/golib/v3 v3.3.47/go.mod h1:N7bdXqA6fGQQn03WHZRDXvyN/GUFI+BXjoJgidfncZU=
github.com/signalfx/gomemcache v0.0.0-20180823214636-4f7ef64c72a9/go.mod h1:Ytb8KfCSyuwy/VILnROdgCvbQLA5ch0nkbG7lKT0BXw=
github.com/signalfx/ingest-protocols v0.1.14 h1:rsTZppsoTXmEfE1RY5u+h4PePKUzqhfEdxq1pNGY2pA=
github.com/signalfx/ingest-protocols v0.1.14/go.mod h1:CYKWPtxFWF9RCUGfN0Hh6javdTTqediTCbXFbW0BF60=
Expand Down
3 changes: 3 additions & 0 deletions internal/buildscripts/packaging/release/gh-release-notes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ REPO_DIR="$( cd "$SCRIPT_DIR"/../../../../ && pwd )"
VERSION="$1"
LINUX_AMD64_DIGEST="${2:-${REPO_DIR}/dist/linux_amd64_digest.txt}"
LINUX_ARM64_DIGEST="${2:-${REPO_DIR}/dist/linux_arm64_digest.txt}"
LINUX_PPC64LE_DIGEST="${2:-${REPO_DIR}/dist/linux_ppc64le_digest.txt}"
WINDOWS_DIGEST="${3:-${REPO_DIR}/dist/windows_digest.txt}"
WINDOWS_2022_DIGEST="${3:-${REPO_DIR}/dist/windows_2022_digest.txt}"
CHANGELOG="${4:-${REPO_DIR}/CHANGELOG.md}"
Expand All @@ -40,6 +41,7 @@ fi

linux_amd64_digest="$( get_digest "$LINUX_AMD64_DIGEST" )"
linux_arm64_digest="$( get_digest "$LINUX_ARM64_DIGEST" )"
linux_ppc64le_digest="$( get_digest "$LINUX_PPC64LE_DIGEST" )"

windows_digest="$( get_digest "$WINDOWS_DIGEST" )"
windows_2022_digest="$( get_digest "$WINDOWS_2022_DIGEST" )"
Expand All @@ -49,6 +51,7 @@ changes="""$changes
> Docker Images:
> - \`quay.io/signalfx/splunk-otel-collector:${VERSION#v}-amd64\` (digest: \`$linux_amd64_digest\`)
> - \`quay.io/signalfx/splunk-otel-collector:${VERSION#v}-arm64\` (digest: \`$linux_arm64_digest\`)
> - \`quay.io/signalfx/splunk-otel-collector:${VERSION#v}-ppc64le\` (digest: \`$linux_ppc64le_digest\`)
> - \`quay.io/signalfx/splunk-otel-collector-windows:${VERSION#v}\` (digest: \`$windows_digest\`)
> - \`quay.io/signalfx/splunk-otel-collector-windows:${VERSION#v}-2022\` (digest: \`$windows_2022_digest\`)
"""
Expand Down
2 changes: 1 addition & 1 deletion pkg/receiver/smartagent/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.66.0
github.com/openzipkin/zipkin-go v0.4.1
github.com/signalfx/defaults v1.2.2-0.20180531161417-70562fe60657
github.com/signalfx/golib/v3 v3.3.46
github.com/signalfx/golib/v3 v3.3.47
github.com/signalfx/signalfx-agent v1.0.1-0.20221102193914-2f61b1078d54
github.com/signalfx/splunk-otel-collector/extension/smartagentextension v0.0.0-00010101000000-000000000000
github.com/signalfx/splunk-otel-collector/tests v0.0.0-00010101000000-000000000000
Expand Down
4 changes: 2 additions & 2 deletions pkg/receiver/smartagent/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1910,8 +1910,8 @@ github.com/signalfx/gohistogram v0.0.0-20160107210732-1ccfd2ff5083/go.mod h1:adP
github.com/signalfx/golib v2.5.1+incompatible h1:rw16Flfx5Z29DahDSNGAA3ch8dOeNc3oOMUJm493yao=
github.com/signalfx/golib v2.5.1+incompatible/go.mod h1:nWYefOwlUKWm/SpN/LgVSBnyH1T9NpT1ANlmgRIi1Cs=
github.com/signalfx/golib/v3 v3.3.37/go.mod h1:zH70SVnrzVUqDmUFEwDk1HSwS71Pi2w3bSsNpnOtYuQ=
github.com/signalfx/golib/v3 v3.3.46 h1:eiR2kQA5eVTB7nqETfn8raeem8HZhOUNcuMRVzZnOOk=
github.com/signalfx/golib/v3 v3.3.46/go.mod h1:N7bdXqA6fGQQn03WHZRDXvyN/GUFI+BXjoJgidfncZU=
github.com/signalfx/golib/v3 v3.3.47 h1:awph3lTi4Yp766nIOUU1bgvaS8BxB4ujW0ZwByaxiYE=
github.com/signalfx/golib/v3 v3.3.47/go.mod h1:N7bdXqA6fGQQn03WHZRDXvyN/GUFI+BXjoJgidfncZU=
github.com/signalfx/gomemcache v0.0.0-20180823214636-4f7ef64c72a9/go.mod h1:Ytb8KfCSyuwy/VILnROdgCvbQLA5ch0nkbG7lKT0BXw=
github.com/signalfx/ingest-protocols v0.1.14 h1:rsTZppsoTXmEfE1RY5u+h4PePKUzqhfEdxq1pNGY2pA=
github.com/signalfx/ingest-protocols v0.1.14/go.mod h1:CYKWPtxFWF9RCUGfN0Hh6javdTTqediTCbXFbW0BF60=
Expand Down