Skip to content

Commit

Permalink
Merge branch 'main' into enterprise_instrumentor
Browse files Browse the repository at this point in the history
  • Loading branch information
RonFed committed Feb 21, 2025
2 parents 3f6eecc + 114551d commit 39b75c5
Show file tree
Hide file tree
Showing 38 changed files with 1,246 additions and 842 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ odiglet/base.Dockerfile
odiglet/debug.Dockerfile
tests # not needed in context for odigos components builds
go.work
go.work.sum
go.work.sum
gha-creds-*.json
27 changes: 14 additions & 13 deletions .github/workflows/cross-cloud-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,24 @@ jobs:
- name: Build and Tag Docker Images
env:
COMMIT_HASH: ${{ github.sha }}
DOCKER_REGISTRY: registry.odigos.io
run: |
# Build images
make build-images TAG=${COMMIT_HASH}
# Tag images for public ECR
docker tag keyval/odigos-collector:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-collector:${COMMIT_HASH}
docker tag keyval/odigos-instrumentor:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-instrumentor:${COMMIT_HASH}
docker tag keyval/odigos-ui:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-ui:${COMMIT_HASH}
docker tag keyval/odigos-scheduler:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-scheduler:${COMMIT_HASH}
docker tag keyval/odigos-autoscaler:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-autoscaler:${COMMIT_HASH}
docker tag keyval/odigos-odiglet:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/keyval/odigos-odiglet:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-collector:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-instrumentor:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-ui:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-scheduler:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-autoscaler:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/keyval/odigos-odiglet:${COMMIT_HASH}
docker tag ${DOCKER_REGISTRY}/odigos-collector:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/odigos-collector:${COMMIT_HASH}
docker tag ${DOCKER_REGISTRY}/odigos-instrumentor:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/odigos-instrumentor:${COMMIT_HASH}
docker tag ${DOCKER_REGISTRY}/odigos-ui:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/odigos-ui:${COMMIT_HASH}
docker tag ${DOCKER_REGISTRY}/odigos-scheduler:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/odigos-scheduler:${COMMIT_HASH}
docker tag ${DOCKER_REGISTRY}/odigos-autoscaler:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/odigos-autoscaler:${COMMIT_HASH}
docker tag ${DOCKER_REGISTRY}/odigos-odiglet:${COMMIT_HASH} public.ecr.aws/y2v0v6s7/odigos-odiglet:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/odigos-collector:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/odigos-instrumentor:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/odigos-ui:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/odigos-scheduler:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/odigos-autoscaler:${COMMIT_HASH}
docker push public.ecr.aws/y2v0v6s7/odigos-odiglet:${COMMIT_HASH}
test:
permissions:
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/release-artifactregistry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ env.TAG }}

- name: Set env
id: vars
Expand Down Expand Up @@ -91,15 +90,6 @@ jobs:
with:
node-version: 18

- uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}

- uses: ko-build/[email protected]

- name: publish cli image to docker registries
Expand Down Expand Up @@ -127,39 +117,3 @@ jobs:
GITHUB_RUN_ID: ${{ github.run_id }}
run: |
curl -X POST -H 'Content-type: application/json' --data '{"link":"https://github.com/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}", "description":"ERROR: failed to publish odigos CLI", "tag":"${{ env.TAG }}"}' ${{ env.SLACK_WEBHOOK_URL }}
release-helm:
needs: [release-cli]
runs-on: ubuntu-latest
steps:
- name: Determine Tag Value
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "TAG=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
elif [ "${{ github.event_name }}" = "repository_dispatch" ]; then
echo "TAG=${{ github.event.client_payload.tag }}" >> $GITHUB_ENV
else
echo "Unknown event type"
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
exit 1
fi
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Odigos Release Bot"
- name: Install Helm
uses: azure/[email protected]
with:
version: v3.15.2

- name: Release Helm charts
env:
GH_TOKEN: ${{ github.token }}
run: bash ./scripts/release-charts.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ cli/odigos
serving-certs/
**/.tools/
**/LICENSES
odigos
gha-creds-*.json

**.tfstate
**.tfstate.backup
Expand Down
35 changes: 34 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ ifdef FIX_LINT
LINT_CMD += --fix
endif
DOCKERFILE=Dockerfile
IMG_SUFFIX=
IMG_PREFIX?=
IMG_SUFFIX?=
BUILD_DIR=.

.PHONY: install-golangci-lint
Expand Down Expand Up @@ -371,3 +372,35 @@ dev-nop-destination:
.PHONY: dev-add-backpressue-destination
dev-backpressue-destination:
kubectl apply -f ./tests/backpressure-exporter.yaml

# Use these to deploy Odigos into an EKS cluster

.PHONY: ecr-login
ecr-login:
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws

build-tag-push-eks-image/%:
docker build --platform linux/amd64 -t $(ORG)/odigos-$*$(IMG_SUFFIX):$(TAG) $(BUILD_DIR) -f $(DOCKERFILE) \
--build-arg SERVICE_NAME="$*" \
--build-arg ODIGOS_VERSION=$(TAG) \
--build-arg VERSION=$(TAG) \
--build-arg RELEASE=$(TAG) \
--build-arg SUMMARY="$(SUMMARY)" \
--build-arg DESCRIPTION="$(DESCRIPTION)"
docker tag registry.odigos.io/odigos-$*$(IMG_SUFFIX):$(TAG) $(IMG_PREFIX)/odigos-$*$(IMG_SUFFIX):$(TAG)
docker push $(IMG_PREFIX)/odigos-$*$(IMG_SUFFIX):$(TAG)

.PHONY: deploy-to-eks
deploy-to-eks:
if [ -z "$(IMG_PREFIX)" ]; then \
echo "❌ IMG_PREFIX is not set"; \
exit 1; \
fi
make ecr-login
make -j 3 build-tag-push-eks-image/odiglet DOCKERFILE=odiglet/$(DOCKERFILE) SUMMARY="Odiglet for Odigos" DESCRIPTION="Odiglet is the core component of Odigos managing auto-instrumentation. This container requires a root user to run and manage eBPF programs." TAG=$(TAG) ORG=$(ORG) IMG_SUFFIX=$(IMG_SUFFIX)
make -j 3 build-tag-push-eks-image/autoscaler SUMMARY="Autoscaler for Odigos" DESCRIPTION="Autoscaler manages the installation of Odigos components." TAG=$(TAG) ORG=$(ORG) IMG_SUFFIX=$(IMG_SUFFIX)
make -j 3 build-tag-push-eks-image/instrumentor SUMMARY="Instrumentor for Odigos" DESCRIPTION="Instrumentor manages auto-instrumentation for workloads with Odigos." TAG=$(TAG) ORG=$(ORG) IMG_SUFFIX=$(IMG_SUFFIX)
make -j 3 build-tag-push-eks-image/scheduler SUMMARY="Scheduler for Odigos" DESCRIPTION="Scheduler manages the installation of OpenTelemetry Collectors with Odigos." TAG=$(TAG) ORG=$(ORG) IMG_SUFFIX=$(IMG_SUFFIX)
make -j 3 build-tag-push-eks-image/collector DOCKERFILE=collector/$(DOCKERFILE) BUILD_DIR=collector SUMMARY="Odigos Collector" DESCRIPTION="The Odigos build of the OpenTelemetry Collector." TAG=$(TAG) ORG=$(ORG) IMG_SUFFIX=$(IMG_SUFFIX)
make -j 3 build-tag-push-eks-image/ui DOCKERFILE=frontend/$(DOCKERFILE) SUMMARY="UI for Odigos" DESCRIPTION="UI provides the frontend webapp for managing an Odigos installation." TAG=$(TAG) ORG=$(ORG) IMG_SUFFIX=$(IMG_SUFFIX)
echo "✅ Deployed Odigos to EKS, now install the CLI"
Loading

0 comments on commit 39b75c5

Please sign in to comment.