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

Add AIX Support to the collector #1940

Draft
wants to merge 14 commits into
base: release/v2.0.0
Choose a base branch
from
Draft
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
83 changes: 65 additions & 18 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,29 @@ builds:
tags:
- bindplane
goos:
- windows
- linux
- aix
- darwin
- linux
- windows
goarch:
- amd64
- arm64
- arm
- ppc64
- ppc64le
ignore:
- goos: aix
goarch: arm64
- goos: aix
goarch: arm
- goos: aix
goarch: amd64
- goos: aix
goarch: ppc64le
- goos: darwin
goarch: ppc64
- goos: darwin
goarch: ppc64le
- goos: windows
goarch: arm
- goos: windows
Expand All @@ -39,27 +52,42 @@ builds:
goarch: ppc64
- goos: windows
goarch: ppc64le
- goos: darwin
goarch: ppc64
- goos: darwin
goarch: ppc64le
prebuilt:
path: tmp/collector_{{ .Os }}_{{ .Arch }}{{ .Ext }}
ldflags:
- -s -w
- -X github.com/observiq/bindplane-agent/internal/version.version=v{{ .Version }}
- -X github.com/observiq/bindplane-agent/internal/version.gitHash={{ .FullCommit }}
- -X github.com/observiq/bindplane-agent/internal/version.date={{ .Date }}
no_unique_dist_dir: false
- id: updater
builder: prebuilt
binary: updater
mod_timestamp: "{{ .CommitTimestamp }}"
goos:
- windows
- linux
- aix
- darwin
- linux
- windows
goarch:
- amd64
- arm64
- arm
- ppc64
- ppc64le
ignore:
- goos: aix
goarch: amd64
- goos: aix
goarch: arm64
- goos: aix
goarch: arm
- goos: aix
goarch: ppc64le
- goos: darwin
goarch: ppc64
- goos: darwin
goarch: ppc64le
- goos: windows
goarch: arm
- goos: windows
Expand All @@ -68,26 +96,35 @@ builds:
goarch: ppc64
- goos: windows
goarch: ppc64le
- goos: darwin
goarch: ppc64
- goos: darwin
goarch: ppc64le
prebuilt:
path: tmp/updater_{{ .Os }}_{{ .Arch }}{{ .Ext }}
- id: supervisor
builder: prebuilt
binary: opampsupervisor
goos:
- windows
- linux
- aix
- darwin
- linux
- windows
goarch:
- amd64
- arm64
- arm
- ppc64
- ppc64le
ignore:
- goos: aix
goarch: amd64
- goos: aix
goarch: arm64
- goos: aix
goarch: arm
- goos: aix
goarch: ppc64le
- goos: darwin
goarch: ppc64
- goos: darwin
goarch: ppc64le
- goos: windows
goarch: arm
- goos: windows
Expand All @@ -96,12 +133,14 @@ builds:
goarch: ppc64
- goos: windows
goarch: ppc64le
- goos: darwin
goarch: ppc64
- goos: darwin
goarch: ppc64le
prebuilt:
path: release_deps/supervisor_bin/opampsupervisor_{{ .Os }}_{{ .Arch }}{{ .Ext }}
ldflags:
- -s -w
- -X github.com/observiq/bindplane-agent/updater/internal/version.version=v{{ .Version }}
- -X github.com/observiq/bindplane-agent/updater/internal/version.gitHash={{ .FullCommit }}
- -X github.com/observiq/bindplane-agent/updater/internal/version.date={{ .Date }}
no_unique_dist_dir: false

# https://goreleaser.com/customization/archive/
archives:
Expand Down Expand Up @@ -133,6 +172,9 @@ archives:
- src: release_deps/sysconfig/observiq-otel-collector
dst: "install/sysconfig"
strip_parent: true
- src: release_deps/observiq-otel-collector.aix.env
dst: "install"
strip_parent: true
format_overrides:
- goos: windows
format: zip
Expand Down Expand Up @@ -217,13 +259,17 @@ nfpms:
mode: 0644
owner: root
group: root
# This file will be unused on modern systemd Linux
# The postinstall.sh file removes this if it isn't needed
- src: service/observiq-otel-collector
dst: /etc/init.d/observiq-otel-collector
type: config|noreplace
file_info:
mode: 0755
owner: root
group: root
# This file will be unused on modern systemd Linux
# The postinstall.sh file removes this if it isn't needed
- src: service/sysconfig/observiq-otel-collector
dst: /etc/sysconfig/observiq-otel-collector
type: config
Expand Down Expand Up @@ -695,6 +741,7 @@ release:

# https://goreleaser.com/customization/changelog/
changelog:
disable: false
use: github
sort: asc
groups:
Expand Down
23 changes: 22 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ agent:
builder --config="./manifests/observIQ/manifest.yaml" --ldflags "-s -w -X github.com/observiq/bindplane-agent/internal/version.version=$(VERSION)"
mkdir -p $(OUTDIR); cp ./builder/observiq-otel-collector $(OUTDIR)/collector_$(GOOS)_$(GOARCH)$(EXT)

# Builds the agent for current GOOS/GOARCH pair (aix)
.PHONY: agent-aix
agent-aix:
builder --config="./manifests/observIQ/manifest-aix.yaml" --ldflags "-s -w -X github.com/observiq/bindplane-agent/internal/version.version=$(VERSION)"
mkdir -p $(OUTDIR); cp ./builder/observiq-otel-collector $(OUTDIR)/collector_$(GOOS)_$(GOARCH)$(EXT)

# Builds a custom distro for the current GOOS/GOARCH pair using the manifest specified
# MANIFEST = path to the manifest file for the distro to be built
# Usage: make distro MANIFEST="./manifests/custom/my_distro_manifest.yaml"
Expand Down Expand Up @@ -71,12 +77,22 @@ reset: kill
.PHONY: build-binaries
build-binaries: agent updater

# Builds the updater + agent for current GOOS/GOARCH pair
.PHONY: build-binaries-aix
build-binaries-aix: agent-aix updater

.PHONY: build-all
build-all: build-linux build-darwin build-windows
build-all: build-linux build-unix build-windows

.PHONY: build-linux
build-linux: build-linux-amd64 build-linux-arm64 build-linux-arm build-linux-ppc64 build-linux-ppc64le

.PHONY: build-unix
build-unix: build-darwin build-aix

.PHONY: build-aix
build-aix: build-aix-ppc64

.PHONY: build-darwin
build-darwin: build-darwin-amd64 build-darwin-arm64

Expand All @@ -103,6 +119,10 @@ build-linux-arm64:
build-linux-arm:
GOOS=linux GOARCH=arm $(MAKE) build-binaries -j2

.PHONY: build-aix-ppc64
build-aix-ppc64:
GOOS=aix GOARCH=ppc64 $(MAKE) build-binaries-aix -j2

.PHONY: build-darwin-amd64
build-darwin-amd64:
GOOS=darwin GOARCH=amd64 $(MAKE) build-binaries -j2
Expand Down Expand Up @@ -251,6 +271,7 @@ release-prep:
@jq ".files[] | select(.service != null)" windows/wix.json >> release_deps/windows_service.json
@cp service/observiq-otel-collector.service release_deps/observiq-otel-collector.service
@cp service/observiq-otel-collector release_deps/observiq-otel-collector
@cp service/observiq-otel-collector.aix.env release_deps/observiq-otel-collector.aix.env
@cp -r ./service/sysconfig release_deps/

# Build and sign, skip release and ignore dirty git tree
Expand Down
108 changes: 108 additions & 0 deletions manifests/observIQ/manifest-aix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# This manifest is a combination of the upstream opentelemetry-collector-contrib manifest & components unique to observIQ's distribution.
# https://github.com/open-telemetry/opentelemetry-collector-releases/blob/main/distributions/otelcol-contrib/manifest.yaml
dist:
module: github.com/observiq/bindplane-agent
name: observiq-otel-collector
description: ObservIQ's custom distro for OpenTelemetry Collector
version: "v2.0.0"
output_path: ./builder
otelcol_version: 0.111.0
conf_resolver:
default_uri_scheme: "env"
extensions:
- gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.111.0
# ballastextension deprecated, keeping at v0.108.1
- gomod: go.opentelemetry.io/collector/extension/ballastextension v0.108.1
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/asapauthextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/zipkinencodingextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/httpforwarderextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/jaegerremotesampling v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecstaskobserver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/hostobserver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/k8sobserver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/oidcauthextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/pprofextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/dbstorage v0.111.0
- gomod: github.com/observiq/bindplane-agent/extension/bindplaneextension v1.61.1
path: "./extension/bindplaneextension"
exporters:
- gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.111.0
- gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.111.0
- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.111.0
- gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.111.0
processors:
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.111.0
- gomod: github.com/observiq/bindplane-agent/processor/snapshotprocessor v1.61.1
path: "./processor/snapshotprocessor"
- gomod: github.com/observiq/bindplane-agent/processor/throughputmeasurementprocessor v1.61.1
path: "./processor/throughputmeasurementprocessor"
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbyattrsprocessor v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.111.0
receivers:
- gomod: go.opentelemetry.io/collector/receiver/nopreceiver v0.111.0
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sapmreceiver v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.111.0
- gomod: github.com/observiq/bindplane-agent/receiver/pluginreceiver v1.61.1
path: "./receiver/pluginreceiver"
- gomod: github.com/observiq/bindplane-agent/receiver/routereceiver v1.61.1
path: "./receiver/routereceiver"
- gomod: github.com/observiq/bindplane-agent/receiver/telemetrygeneratorreceiver v1.61.1
path: "./receiver/telemetrygeneratorreceiver"
connectors:
- gomod: go.opentelemetry.io/collector/connector/forwardconnector v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/exceptionsconnector v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafanacloudconnector v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/roundrobinconnector v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.111.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.111.0
providers:
- gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.17.0
- gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.17.0
- gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v1.17.0
- gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.17.0
- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.17.0
# When adding a replace, add a comment before it to document why it's needed and when it can be removed
replaces:
# See https://github.com/google/gnostic/issues/262
- github.com/googleapis/gnostic v0.5.6 => github.com/googleapis/gnostic v0.5.5
# See https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/12322#issuecomment-1185029670
- github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 => github.com/docker/go-connections v0.4.0
# see https://github.com/mattn/go-ieproxy/issues/45
- github.com/mattn/go-ieproxy => github.com/mattn/go-ieproxy v0.0.1
# see https://github.com/openshift/api/pull/1515
- github.com/openshift/api => github.com/openshift/api v0.0.0-20230726162818-81f778f3b3ec
# replace for datapointcountprocessor
- github.com/observiq/bindplane-agent/receiver/routereceiver => ../receiver/routereceiver
# replace statements for internal imports
- github.com/observiq/bindplane-agent/internal/expr => ../internal/expr
- github.com/observiq/bindplane-agent/internal/counter => ../internal/counter
- github.com/observiq/bindplane-agent/internal/report => ../internal/report
- github.com/observiq/bindplane-agent/internal/testutils => ../internal/testutils
- github.com/observiq/bindplane-agent/internal/rehydration => ../internal/rehydration
Loading
Loading