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

Publish and test arm docker images for every PR #4733

Closed
friedrich-at-adobe opened this issue May 9, 2022 · 9 comments · Fixed by #5041
Closed

Publish and test arm docker images for every PR #4733

friedrich-at-adobe opened this issue May 9, 2022 · 9 comments · Fixed by #5041
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! keepalive Skipped by stale bot
Milestone

Comments

@friedrich-at-adobe
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Many users are already trying to use cortex with ARM.

Describe the solution you'd like
For every PR we should run tests in ARM and Intel.

Describe alternatives you've considered
I don't think there is an alternative, we have to support natively what users are doing.

There is already some support in:

cortex/Makefile

Lines 52 to 59 in cd78607

push-multiarch-build-image:
@echo
# Build image for each platform separately... it tends to generate fewer errors.
$(SUDO) docker buildx build --platform linux/amd64 --build-arg=revision=$(GIT_REVISION) --build-arg=goproxyValue=$(GOPROXY_VALUE) build-image/
$(SUDO) docker buildx build --platform linux/arm64 --build-arg=revision=$(GIT_REVISION) --build-arg=goproxyValue=$(GOPROXY_VALUE) build-image/
# This command will run the same build as above, but it will reuse existing platform-specific images,
# put them together and push to registry.
$(SUDO) docker buildx build -o type=registry --platform linux/amd64,linux/arm64 --build-arg=revision=$(GIT_REVISION) --build-arg=goproxyValue=$(GOPROXY_VALUE) -t $(IMAGE_PREFIX)build-image:$(IMAGE_TAG) build-image/

@stale
Copy link

stale bot commented Aug 12, 2022

This issue has been automatically marked as stale because it has not had any activity in the past 60 days. It will be closed in 15 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 12, 2022
@otterley
Copy link

Several of my customers at AWS have asked about this. Is there anything I can do to help move this along? I can provide arm64 build resources if needed.

@stale stale bot removed the stale label Aug 16, 2022
@alvinlin123 alvinlin123 added keepalive Skipped by stale bot good first issue These are great first issues. If you are looking for a place to start, start here! labels Aug 18, 2022
@alvinlin123 alvinlin123 changed the title Publish arm docker images Test arm docker images for every PR Aug 18, 2022
@alvinlin123 alvinlin123 changed the title Test arm docker images for every PR Publish and test arm docker images for every PR Aug 18, 2022
@alvinlin123
Copy link
Member

Currently we only publish ARM for build images. We still need to build the actual Cortex image for ARM.

@otterley
Copy link

@alvinlin123 I'd like to help produce the multi-arch image and publish it. I can provide ARM build resources for you as needed.

@alvinlin123
Copy link
Member

@otterley do you mean you have someone who can work on updating the build workflow?

I have not dive deep into what needs to be done, but at high level I think it involves making some modifications to the GitHub Action workflow. If you work on modifying and testing the workflow, I can provide some guidance on what I know :)

@otterley
Copy link

@alvinlin123 Let's take this offline - can you email me at fiscmi at amazon ?

@SuperMatt
Copy link

Hi, is there any movement on this? My company is looking to move some infra to AWS Graviton instances, and would love a native arm64 image for this. With 1.14 coming out soon, it would be a good time to start.

@jeromeinsf jeromeinsf added this to the Release 1.15 milestone Dec 7, 2022
@alanprot alanprot mentioned this issue Dec 14, 2022
1 task
@alanprot
Copy link
Member

alanprot commented Dec 14, 2022

Hi @SuperMatt

I just created an multi arch Image on dockerhub based on master branch and i could run both on graviton and on amd64, you wanna give it a try?

PR in progress: #5041

amd64 ourput:

docker run cortexproject/cortex:HEAD-939e890

level=info ts=2022-12-14T07:44:54.0103856Z caller=main.go:194 msg="Starting Cortex" version="(version=1.14.0, branch=HEAD, revision=939e890)"
level=info ts=2022-12-14T07:44:54.0118135Z caller=server.go:306 http=[::]:80 grpc=[::]:9095 msg="server listening on addresses"
level=error ts=2022-12-14T07:44:54.0156121Z caller=log.go:117 msg="error running cortex" err="failed to initialize querier: failed to create bucket client: no s3 endpoint in config file\nerror initialising module: store-queryable\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).initModule\n\t/__w/cortex/cortex/pkg/util/modules/modules.go:108\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).InitModuleServices\n\t/__w/cortex/cortex/pkg/util/modules/modules.go:78\ngithub.com/cortexproject/cortex/pkg/cortex.(*Cortex).Run\n\t/__w/cortex/cortex/pkg/cortex/cortex.go:398\nmain.main\n\t/__w/cortex/cortex/cmd/cortex/main.go:196\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1594"

amr64 output:

[root@ip-172-31-79-0 ec2-user]# docker run cortexproject/cortex:HEAD-939e890

level=info ts=2022-12-14T07:44:50.226950297Z caller=main.go:194 msg="Starting Cortex" version="(version=1.14.0, branch=HEAD, revision=939e890)"
level=info ts=2022-12-14T07:44:50.227581233Z caller=server.go:306 http=[::]:80 grpc=[::]:9095 msg="server listening on addresses"
level=error ts=2022-12-14T07:44:50.229156834Z caller=log.go:117 msg="error running cortex" err="no s3 endpoint in config file\ngithub.com/thanos-io/objstore/providers/s3.validate\n\t/__w/cortex/cortex/vendor/github.com/thanos-io/objstore/providers/s3/s3.go:348\ngithub.com/thanos-io/objstore/providers/s3.NewBucketWithConfig\n\t/__w/cortex/cortex/vendor/github.com/thanos-io/objstore/providers/s3/s3.go:219\ngithub.com/cortexproject/cortex/pkg/storage/bucket/s3.NewBucketClient\n\t/__w/cortex/cortex/pkg/storage/bucket/s3/bucket_client.go:17\ngithub.com/cortexproject/cortex/pkg/storage/bucket.NewClient\n\t/__w/cortex/cortex/pkg/storage/bucket/client.go:102\ngithub.com/cortexproject/cortex/pkg/purger.createBucketClient\n\t/__w/cortex/cortex/pkg/purger/tenant_deletion_api.go:122\ngithub.com/cortexproject/cortex/pkg/purger.NewTenantDeletionAPI\n\t/__w/cortex/cortex/pkg/purger/tenant_deletion_api.go:29\ngithub.com/cortexproject/cortex/pkg/cortex.(*Cortex).initTenantDeletionAPI\n\t/__w/cortex/cortex/pkg/cortex/modules.go:676\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).initModule\n\t/__w/cortex/cortex/pkg/util/modules/modules.go:106\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).InitModuleServices\n\t/__w/cortex/cortex/pkg/util/modules/modules.go:78\ngithub.com/cortexproject/cortex/pkg/cortex.(*Cortex).Run\n\t/__w/cortex/cortex/pkg/cortex/cortex.go:398\nmain.main\n\t/__w/cortex/cortex/cmd/cortex/main.go:196\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_arm64.s:1172\ncreate bucket client\ngithub.com/cortexproject/cortex/pkg/purger.createBucketClient\n\t/__w/cortex/cortex/pkg/purger/tenant_deletion_api.go:124\ngithub.com/cortexproject/cortex/pkg/purger.NewTenantDeletionAPI\n\t/__w/cortex/cortex/pkg/purger/tenant_deletion_api.go:29\ngithub.com/cortexproject/cortex/pkg/cortex.(*Cortex).initTenantDeletionAPI\n\t/__w/cortex/cortex/pkg/cortex/modules.go:676\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).initModule\n\t/__w/cortex/cortex/pkg/util/modules/modules.go:106\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).InitModuleServices\n\t/__w/cortex/cortex/pkg/util/modules/modules.go:78\ngithub.com/cortexproject/cortex/pkg/cortex.(*Cortex).Run\n\t/__w/cortex/cortex/pkg/cortex/cortex.go:398\nmain.main\n\t/__w/cortex/cortex/cmd/cortex/main.go:196\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_arm64.s:1172\nerror initialising module: tenant-deletion\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).initModule\n\t/__w/cortex/cortex/pkg/util/modules/modules.go:108\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).InitModuleServices\n\t/__w/cortex/cortex/pkg/util/modules/modules.go:78\ngithub.com/cortexproject/cortex/pkg/cortex.(*Cortex).Run\n\t/__w/cortex/cortex/pkg/cortex/cortex.go:398\nmain.main\n\t/__w/cortex/cortex/cmd/cortex/main.go:196\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_arm64.s:1172

@SuperMatt
Copy link

@alanprot thanks for the update. I'm away for work now until the new year, so I won't be able to give this a try, but thank you so much for doing this. I look forward to testing it out as soon as I am able.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue These are great first issues. If you are looking for a place to start, start here! keepalive Skipped by stale bot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants