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

Run jaeger-es-index-cleaner and jaeger-es-rollover locally #5714

Merged
merged 18 commits into from
Jul 8, 2024
Merged
46 changes: 0 additions & 46 deletions pkg/version/build_test.go

This file was deleted.

4 changes: 2 additions & 2 deletions plugin/storage/integration/es_index_cleaner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const (
samplingIndexName = "jaeger-sampling-2019-01-01"
spanIndexName = "jaeger-span-2019-01-01"
serviceIndexName = "jaeger-service-2019-01-01"
indexCleanerImage = "jaegertracing/jaeger-es-index-cleaner:latest"
rolloverImage = "jaegertracing/jaeger-es-rollover:1.57.0"
indexCleanerImage = "jaegertracing/jaeger-es-index-cleaner:local-test"
rolloverImage = "jaegertracing/jaeger-es-rollover:local-test"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
indexCleanerImage = "jaegertracing/jaeger-es-index-cleaner:local-test"
rolloverImage = "jaegertracing/jaeger-es-rollover:local-test"
indexCleanerImage = "localhost:5000/jaegertracing/jaeger-es-index-cleaner:local-test"
rolloverImage = "localhost:5000/jaegertracing/jaeger-es-rollover:local-test"

rolloverNowEnvVar = `CONDITIONS='{"max_age":"0s"}'`
)

Expand Down
20 changes: 19 additions & 1 deletion scripts/es-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,32 @@ teardown_storage() {
docker compose -f "${compose_file}" down
}

build_local_img(){
make "build-binaries-linux"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to build ALL binaries, only the 2 specific ones

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want

make build-es-index-cleaner GOOS=linux
make build-es-rollover GOOS=linux

make create-baseimg
Copy link
Member

@yurishkuro yurishkuro Jul 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
make create-baseimg
make create-baseimg PLATFORMS=linux/$(go env GOARCH)

#build es-index-cleaner
docker build \
Copy link
Member

@yurishkuro yurishkuro Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked for me:

Build with a fake GITHUB_SHA/BRANCH=local-test variables

GITHUB_SHA=local-test BRANCH=local-test bash scripts/build-upload-a-docker-image.sh -l -b -c jaeger-es-index-cleaner -d cmd/es-index-cleaner -t release -p linux/$(go env GOARCH)

Run as local-test from local registry localhost:5000

docker run localhost:5000/jaegertracing/jaeger-es-index-cleaner:local-test

--build-arg base_image=localhost:5000/baseimg_alpine:latest \
--file cmd/es-index-cleaner/Dockerfile \
-t jaegertracing/jaeger-es-index-cleaner:local-test \
cmd/es-index-cleaner

#build es-rollover
docker build \
--build-arg base_image=localhost:5000/baseimg_alpine:latest \
--file cmd/es-rollover/Dockerfile \
-t jaegertracing/jaeger-es-rollover:local-test \
cmd/es-rollover
}

main() {
check_arg "$@"
local distro=$1
local es_version=$2
local j_version=$2

bring_up_storage "${distro}" "${es_version}"

build_local_img
if [[ "${j_version}" == "v2" ]]; then
STORAGE=${distro} SPAN_STORAGE_TYPE=${distro} make jaeger-v2-storage-integration-test
else
Expand Down
Loading