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

Document how to use codegen maven archetype with Apple M1 architecture #78

Open
kikiya opened this issue May 26, 2021 · 2 comments
Open
Assignees
Labels
java-sdk-protobuf kalix-runtime Runtime and SDKs sub-team

Comments

@kikiya
Copy link
Contributor

kikiya commented May 26, 2021

Small changes required in pom.xml also user will need to install protoc locally in order to use the maven archetype.

This needs to be documented properly.

@kikiya kikiya self-assigned this May 26, 2021
@octonato octonato transferred this issue from another repository Jul 1, 2021
@octonato octonato added kalix-runtime Runtime and SDKs sub-team codegen labels Jul 1, 2021
@ennru ennru removed the codegen label Oct 15, 2021
@johanandren
Copy link
Contributor

johanandren commented Nov 13, 2021

Upstream fixes in akka-grpc in progress in akka/akka-grpc#1477

For the record the easiest path right now is probably using rosetta and an x86 JDK, that will pick up the x86 protoc artifacts from maven central.

Next problem is docker though, by default it will now build an arm64 image on mac which can't be run on Akka Serverless.

You can use an experimental flag in docker-desktop saying "Use the new virtualization framework" to enable buildx which allows building for a different target arch than you are on.

I'm not sure about maven yet but with sbt you can then only build up to the staged docker image with docker:stage

Then manually build and push the docker image from the generated target/docker/stage directory like so:

sbt docker:stage
docker buildx build --platform=linux/amd64 --push -t me/image-name:tag target/docker/stage

@johanandren johanandren self-assigned this Nov 13, 2021
@johanandren
Copy link
Contributor

johanandren commented Nov 14, 2021

Upstream issue for the maven docker plugin to support cross building: fabric8io/docker-maven-plugin#1502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
java-sdk-protobuf kalix-runtime Runtime and SDKs sub-team
Projects
None yet
Development

No branches or pull requests

5 participants