diff --git a/.github/workflows/ci-goreleaser.yaml b/.github/workflows/ci-goreleaser.yaml index e31c4b99f..27402bfab 100644 --- a/.github/workflows/ci-goreleaser.yaml +++ b/.github/workflows/ci-goreleaser.yaml @@ -5,14 +5,12 @@ on: branches: [main] paths: - ".goreleaser.yaml" - - "distributions/otelcol/manifest.yaml" - - "distributions/otelcol-contrib/manifest.yaml" + - "distributions/axoflow-otel-collector/manifest.yaml" pull_request: branches: [main] paths: - ".goreleaser.yaml" - - "distributions/otelcol/manifest.yaml" - - "distributions/otelcol-contrib/manifest.yaml" + - "distributions/axoflow-otel-collector/manifest.yaml" jobs: check-goreleaser: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8f640ffd4..ad2acec5d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,13 +1,13 @@ -project_name: opentelemetry-collector-releases +project_name: axoflow-otel-collector-releases builds: - - id: otelcol-contrib + - id: axoflow-otel-collector goos: - linux goarch: - amd64 - arm64 - dir: distributions/otelcol-contrib/_build - binary: otelcol-contrib + dir: distributions/axoflow-otel-collector/_build + binary: axoflow-otel-collector ldflags: - -s - -w @@ -16,21 +16,21 @@ builds: env: - CGO_ENABLED=0 archives: - - id: otelcol-contrib + - id: axoflow-otel-collector builds: - - otelcol-contrib + - axoflow-otel-collector name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}' checksum: name_template: '{{ .ProjectName }}_checksums.txt' dockers: - goos: linux goarch: amd64 - dockerfile: distributions/otelcol-contrib/Dockerfile + dockerfile: distributions/axoflow-otel-collector/Dockerfile image_templates: - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }}-amd64 - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest-amd64 extra_files: - - configs/otelcol-contrib.yaml + - configs/axoflow-otel-collector.yaml build_flag_templates: - --pull - --platform=linux/amd64 @@ -42,12 +42,12 @@ dockers: use: buildx - goos: linux goarch: arm64 - dockerfile: distributions/otelcol-contrib/Dockerfile + dockerfile: distributions/axoflow-otel-collector/Dockerfile image_templates: - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }}-arm64 - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest-arm64 extra_files: - - configs/otelcol-contrib.yaml + - configs/axoflow-otel-collector.yaml build_flag_templates: - --pull - --platform=linux/arm64 diff --git a/Makefile b/Makefile index e90f3995a..6296cc795 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ OTELCOL_BUILDER_VERSION ?= 0.97.0 OTELCOL_BUILDER_DIR ?= ${HOME}/bin OTELCOL_BUILDER ?= ${OTELCOL_BUILDER_DIR}/ocb -DISTRIBUTIONS ?= "otelcol-contrib" +DISTRIBUTIONS ?= "axoflow-otel-collector" ci: check build check: ensure-goreleaser-up-to-date @@ -64,7 +64,7 @@ goreleaser: fi \ } -REMOTE?=git@github.com:axoflow/opentelemetry-collector-releases.git +REMOTE?=git@github.com:axoflow/axoflow-otel-collector-releases.git .PHONY: push-tags push-tags: @[ "${TAG}" ] || ( echo ">> env var TAG is not set"; exit 1 ) diff --git a/cmd/goreleaser/internal/configure.go b/cmd/goreleaser/internal/configure.go index c261d145a..44bcb2108 100644 --- a/cmd/goreleaser/internal/configure.go +++ b/cmd/goreleaser/internal/configure.go @@ -38,7 +38,7 @@ var ( func Generate(imagePrefixes []string, dists []string) config.Project { return config.Project{ - ProjectName: "opentelemetry-collector-releases", + ProjectName: "axoflow-otel-collector-releases", Checksum: config.Checksum{ NameTemplate: "{{ .ProjectName }}_checksums.txt", }, @@ -233,7 +233,7 @@ func DockerManifest(prefix, version, dist string) config.DockerManifest { // imageName translates a distribution name to a container image name. func imageName(dist string) string { - return strings.Replace(dist, "otelcol", "opentelemetry-collector", 1) + return strings.Replace(dist, "otelcol", "axoflow-otel-collector", 1) } // archName translates architecture to docker platform names. diff --git a/configs/otelcol-contrib.yaml b/configs/axoflow-otel-collector.yaml similarity index 100% rename from configs/otelcol-contrib.yaml rename to configs/axoflow-otel-collector.yaml diff --git a/distributions/axoflow-otel-collector/Dockerfile b/distributions/axoflow-otel-collector/Dockerfile new file mode 100644 index 000000000..c81352f19 --- /dev/null +++ b/distributions/axoflow-otel-collector/Dockerfile @@ -0,0 +1,14 @@ +FROM alpine:3.16 as certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --chmod=755 axoflow-otel-collector /axoflow-otel-collector +COPY configs/axoflow-otel-collector.yaml /etc/axoflow-otel-collector/config.yaml +ENTRYPOINT ["/axoflow-otel-collector"] +CMD ["--config", "/etc/axoflow-otel-collector/config.yaml"] +EXPOSE 4317 55678 55679 diff --git a/distributions/otelcol-contrib/README.md b/distributions/axoflow-otel-collector/README.md similarity index 100% rename from distributions/otelcol-contrib/README.md rename to distributions/axoflow-otel-collector/README.md diff --git a/distributions/otelcol-contrib/manifest.yaml b/distributions/axoflow-otel-collector/manifest.yaml similarity index 99% rename from distributions/otelcol-contrib/manifest.yaml rename to distributions/axoflow-otel-collector/manifest.yaml index 37051d21e..3267066ce 100644 --- a/distributions/otelcol-contrib/manifest.yaml +++ b/distributions/axoflow-otel-collector/manifest.yaml @@ -1,7 +1,7 @@ dist: - module: github.com/open-telemetry/opentelemetry-collector-releases/contrib - name: otelcol-contrib - description: OpenTelemetry Collector Contrib + module: github.com/axoflow/axoflow-otel-collector-releases + name: axoflow-otel-collector + description: Axoflow Distribution for OpenTelemetry Collector version: 0.97.0 output_path: ./_build otelcol_version: 0.97.0 diff --git a/distributions/axoflow-otel-collector/otelcol-contrib.conf b/distributions/axoflow-otel-collector/otelcol-contrib.conf new file mode 100644 index 000000000..7613d53b2 --- /dev/null +++ b/distributions/axoflow-otel-collector/otelcol-contrib.conf @@ -0,0 +1,5 @@ +# Systemd environment file for the axoflow-otel-collector service + +# Command-line options for the axoflow-otel-collector service. +# Run `/usr/bin/axoflow-otel-collector --help` to see all available options. +OTELCOL_OPTIONS="--config=/etc/axoflow-otel-collector/config.yaml" diff --git a/distributions/axoflow-otel-collector/otelcol-contrib.service b/distributions/axoflow-otel-collector/otelcol-contrib.service new file mode 100644 index 000000000..0770b4c0a --- /dev/null +++ b/distributions/axoflow-otel-collector/otelcol-contrib.service @@ -0,0 +1,15 @@ +[Unit] +Description=OpenTelemetry Collector Contrib +After=network.target + +[Service] +EnvironmentFile=/etc/axoflow-otel-collector/axoflow-otel-collector.conf +ExecStart=/usr/bin/axoflow-otel-collector $OTELCOL_OPTIONS +KillMode=mixed +Restart=on-failure +Type=simple +User=axoflow-otel-collector +Group=axoflow-otel-collector + +[Install] +WantedBy=multi-user.target diff --git a/distributions/otelcol-contrib/postinstall.sh b/distributions/axoflow-otel-collector/postinstall.sh similarity index 79% rename from distributions/otelcol-contrib/postinstall.sh rename to distributions/axoflow-otel-collector/postinstall.sh index 3ec790bac..41ffb7f8e 100755 --- a/distributions/otelcol-contrib/postinstall.sh +++ b/distributions/axoflow-otel-collector/postinstall.sh @@ -15,8 +15,8 @@ # limitations under the License. if command -v systemctl >/dev/null 2>&1; then - systemctl enable otelcol-contrib.service - if [ -f /etc/otelcol-contrib/config.yaml ]; then - systemctl start otelcol-contrib.service + systemctl enable axoflow-otel-collector.service + if [ -f /etc/axoflow-otel-collector/config.yaml ]; then + systemctl start axoflow-otel-collector.service fi fi diff --git a/distributions/otelcol-contrib/preinstall.sh b/distributions/axoflow-otel-collector/preinstall.sh similarity index 80% rename from distributions/otelcol-contrib/preinstall.sh rename to distributions/axoflow-otel-collector/preinstall.sh index 8737cae66..9a26be358 100755 --- a/distributions/otelcol-contrib/preinstall.sh +++ b/distributions/axoflow-otel-collector/preinstall.sh @@ -14,4 +14,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -getent passwd otelcol-contrib >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin otelcol-contrib +getent passwd axoflow-otel-collector >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin axoflow-otel-collector diff --git a/distributions/otelcol-contrib/preremove.sh b/distributions/axoflow-otel-collector/preremove.sh similarity index 86% rename from distributions/otelcol-contrib/preremove.sh rename to distributions/axoflow-otel-collector/preremove.sh index 5739d608a..e3ab91368 100755 --- a/distributions/otelcol-contrib/preremove.sh +++ b/distributions/axoflow-otel-collector/preremove.sh @@ -15,6 +15,6 @@ # limitations under the License. if command -v systemctl >/dev/null 2>&1; then - systemctl stop otelcol-contrib.service - systemctl disable otelcol-contrib.service + systemctl stop axoflow-otel-collector.service + systemctl disable axoflow-otel-collector.service fi diff --git a/distributions/otelcol-contrib/Dockerfile b/distributions/otelcol-contrib/Dockerfile deleted file mode 100644 index aeb909754..000000000 --- a/distributions/otelcol-contrib/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM alpine:3.16 as certs -RUN apk --update add ca-certificates - -FROM scratch - -ARG USER_UID=10001 -USER ${USER_UID} - -COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -COPY --chmod=755 otelcol-contrib /otelcol-contrib -COPY configs/otelcol-contrib.yaml /etc/otelcol-contrib/config.yaml -ENTRYPOINT ["/otelcol-contrib"] -CMD ["--config", "/etc/otelcol-contrib/config.yaml"] -EXPOSE 4317 55678 55679 diff --git a/distributions/otelcol-contrib/otelcol-contrib.conf b/distributions/otelcol-contrib/otelcol-contrib.conf deleted file mode 100644 index 29c245b2b..000000000 --- a/distributions/otelcol-contrib/otelcol-contrib.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Systemd environment file for the otelcol-contrib service - -# Command-line options for the otelcol-contrib service. -# Run `/usr/bin/otelcol-contrib --help` to see all available options. -OTELCOL_OPTIONS="--config=/etc/otelcol-contrib/config.yaml" diff --git a/distributions/otelcol-contrib/otelcol-contrib.service b/distributions/otelcol-contrib/otelcol-contrib.service deleted file mode 100644 index 453a57139..000000000 --- a/distributions/otelcol-contrib/otelcol-contrib.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=OpenTelemetry Collector Contrib -After=network.target - -[Service] -EnvironmentFile=/etc/otelcol-contrib/otelcol-contrib.conf -ExecStart=/usr/bin/otelcol-contrib $OTELCOL_OPTIONS -KillMode=mixed -Restart=on-failure -Type=simple -User=otelcol-contrib -Group=otelcol-contrib - -[Install] -WantedBy=multi-user.target