Skip to content

Commit

Permalink
Merge pull request #2877 from lpegoraro/eng-1536-orb-agent-reset-or-l…
Browse files Browse the repository at this point in the history
…ose-connection-with-otel-pktvisor

fix(otel): upgrade to newer version.
  • Loading branch information
lpegoraro authored Dec 19, 2023
2 parents 9431eb1 + d14933e commit 6bb1914
Show file tree
Hide file tree
Showing 18 changed files with 292 additions and 208 deletions.
2 changes: 1 addition & 1 deletion .github/actions/go-lint/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.15.1-buster
FROM golang:1.21-buster

LABEL author="Everton Haise Taques<[email protected]>"
LABEL maintainer="netboxlabs"
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/go-report/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20-alpine
FROM golang:1.21-alpine

LABEL author="Everton Haise Taques<[email protected]>"
LABEL maintainer="netboxlabs"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Get branch name
shell: bash
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/go-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.agent == 'true' || github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' || github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' || github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' || github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -272,7 +272,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' || github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -311,7 +311,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' || github.event_name != 'pull_request' }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/go-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
run: SERVICE=agent make test_service
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' }}
Expand All @@ -92,7 +92,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' }}
Expand All @@ -106,7 +106,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' }}
Expand All @@ -120,7 +120,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' }}
Expand All @@ -134,7 +134,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/go-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.agent == 'true' }}
Expand All @@ -84,7 +84,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
run: |
Expand All @@ -100,7 +100,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' }}
Expand All @@ -114,7 +114,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' }}
Expand All @@ -128,7 +128,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
if: ${{ needs.prebuild.outputs.orb == 'true' }}
Expand All @@ -142,7 +142,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.21.x

- name: Go unit tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ GOOS ?= $(shell dpkg-architecture -q DEB_TARGET_ARCH_OS)
DIODE_TAG ?= develop
ORB_VERSION = $(shell cat VERSION)
COMMIT_HASH = $(shell git rev-parse --short HEAD)
OTEL_COLLECTOR_CONTRIB_VERSION ?= 0.87.0
OTEL_COLLECTOR_CONTRIB_VERSION ?= 0.91.0
OTEL_CONTRIB_URL ?= "https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v$(OTEL_COLLECTOR_CONTRIB_VERSION)/otelcol-contrib_$(OTEL_COLLECTOR_CONTRIB_VERSION)_$(GOOS)_$(GOARCH).tar.gz"

define compile_service
Expand Down
1 change: 1 addition & 0 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/fatih/structs"
"github.com/google/uuid"
"github.com/jmoiron/sqlx"
_ "github.com/mattn/go-sqlite3"
"github.com/orb-community/orb/agent/backend"
"github.com/orb-community/orb/agent/cloud_config"
"github.com/orb-community/orb/agent/config"
Expand Down
2 changes: 1 addition & 1 deletion agent/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG PKTVISOR_TAG=latest-develop
FROM golang:1.19-alpine AS builder
FROM golang:1.21-alpine AS builder

WORKDIR /go/src/github.com/orbcommunity/orb
COPY go.mod .
Expand Down
2 changes: 1 addition & 1 deletion agent/docker/Dockerfile.full
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG ORB_TAG=develop
ARG PKTVISOR_TAG=develop
ARG DIODE_TAG=develop
ARG OTEL_TAG=0.87.0
ARG OTEL_TAG=0.91.0

FROM orbcommunity/orb-agent:${ORB_TAG} AS orb

Expand Down
6 changes: 1 addition & 5 deletions agent/docker/orb-agent-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ if [ -f "asn.mmdb.gz" ]; then
gzip -d asn.mmdb.gz
gzip -d city.mmdb.gz
fi
#

# orb agent binary location. by default, matches orb-agent container (see Dockerfile)
orb_agent_bin="${ORB_AGENT_BIN:-/usr/local/bin/orb-agent}"

## Cloud API Configuration ##
# support generating API and MQTT addresses with one host name in ORB_CLOUD_ADDRESS
Expand Down Expand Up @@ -171,7 +167,7 @@ do
nohup /run-agent.sh "$@" &
else
# if none config file is set, use the built-in pktvisor configuration file and agent_default.yaml
echo "Running with default config file and pktvisor built-in configuration"
echo "Running with default config file and pktvisor built-in configuration"
# checking if debug mode is enabled
DEBUG=''
if [[ "$2" == '-d' ]]; then
Expand Down
3 changes: 2 additions & 1 deletion agent/docker/run-agent.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
# orb agent binary location. by default, matches orb-agent container (see Dockerfile)
orb_agent_bin="${ORB_AGENT_BIN:-/usr/local/bin/orb-agent}"
#
echo "Starting orb-agent : $orb_agent_bin with args $#"

if [ $# -eq 0 ]; then
"$orb_agent_bin" run &
echo $! > /var/run/orb-agent.pid
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine AS builder
FROM golang:1.21-alpine AS builder
ARG SVC
ARG GOARCH
ARG GOARM
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine AS builder
FROM golang:1.21-alpine AS builder
ARG SVC
ARG GOARCH
ARG GOARM
Expand Down
2 changes: 1 addition & 1 deletion fleet/backend/otel/types.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package otel

const CurrentSchemaVersion = "v0.87.0"
const CurrentSchemaVersion = "v0.91.0"
Loading

0 comments on commit 6bb1914

Please sign in to comment.