-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: release odigos otelcol as linux packages to gemfury (#1149)
- Loading branch information
Showing
9 changed files
with
259 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
binary: odigos-otelcol | ||
dir: odigosotelcol | ||
ldflags: | ||
- -s | ||
- -w | ||
flags: | ||
- -trimpath | ||
nfpms: | ||
- id: packages # this id is used in the publisher section to specify which artifacts to publish | ||
package_name: odigos-otelcol | ||
contents: | ||
- src: distribution/odigos-otelcol/odigos-otelcol.service | ||
dst: /lib/systemd/system/odigos-otelcol.service | ||
- src: distribution/odigos-otelcol/odigos-otelcol.conf | ||
dst: /etc/odigos-otelcol/odigos-otelcol.conf | ||
type: config|noreplace | ||
- src: distribution/odigos-otelcol/config.yaml | ||
dst: /etc/odigos-otelcol/config.yaml | ||
type: config|noreplace | ||
scripts: | ||
preinstall: distribution/odigos-otelcol/preinstall.sh | ||
preremove: distribution/odigos-otelcol/preremove.sh | ||
vendor: Keyval Inc. | ||
homepage: https://odigos.io | ||
formats: | ||
- deb | ||
- rpm | ||
description: Instant distributed tracing without code changes using eBPF | ||
file_name_template: "{{ .ConventionalFileName }}" | ||
maintainer: Keyval Inc. | ||
publishers: | ||
- name: fury deb publisher | ||
ids: # publish only the artifacts created in the nfpms section. e.g. ignore the tar.gz archive | ||
- packages | ||
cmd: fury push {{ .ArtifactName }} --account {{ .Env.FURY_ACCOUNT }} --api-token {{ .Env.FURY_API_TOKEN }} --public --quiet | ||
dir: dist | ||
# archives: | ||
# builds: | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
# we don't need the otelcol to have releases in github. | ||
# this goreleaser is only about publishing the collector as deb/rpm package to the fury repository | ||
release: | ||
disable: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
extensions: | ||
health_check: | ||
pprof: | ||
endpoint: 0.0.0.0:1777 | ||
zpages: | ||
endpoint: 0.0.0.0:55679 | ||
|
||
receivers: | ||
otlp: | ||
protocols: | ||
grpc: | ||
endpoint: 0.0.0.0:4317 | ||
http: | ||
endpoint: 0.0.0.0:4318 | ||
|
||
processors: | ||
batch: | ||
|
||
exporters: | ||
debug: | ||
verbosity: detailed | ||
|
||
service: | ||
|
||
pipelines: | ||
|
||
traces: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [debug] | ||
|
||
metrics: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [debug] | ||
|
||
logs: | ||
receivers: [otlp] | ||
processors: [batch] | ||
exporters: [debug] | ||
|
||
extensions: [health_check, pprof, zpages] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Systemd environment file for the odiogs-otelcol service | ||
|
||
# Command-line options for the odiogs-otelcol service. | ||
# Run `/usr/bin/odiogs-otelcol --help` to see all available options. | ||
OTELCOL_OPTIONS="--config=/etc/odigos-otelcol/config.yaml" |
15 changes: 15 additions & 0 deletions
15
collector/distribution/odigos-otelcol/odigos-otelcol.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=Odigos Distribution of the OpenTelemetry Collector | ||
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=odigos | ||
Group=odigos | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
getent passwd odigos >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin odigos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
if command -v systemctl >/dev/null 2>&1; then | ||
systemctl stop odigos-otelcol.service | ||
systemctl disable odigos-otelcol.service | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.