Skip to content

Dockerfiles enhanced to support ARM64 #7937

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

Closed
wants to merge 2 commits into from

Conversation

ZCube
Copy link

@ZCube ZCube commented Feb 1, 2022

Description

Dockerfiles enhanced to support ARM64. GitPod can be built on ARM64.

Related Issue(s)

Fixes #7700

How to test

Build GitPod on arm64 using docker image ghcr.io/zcube/workspace-images/gitpod-dev:arm64

To build the frontend, you need the arm64 binary of grpc-tool. It can be found at https://github.com/ZCube/grpc-precompiled-binaries.

replaces package.json
from

"grpc-tools": "^1.11.2"

to

"grpc-tools": "https://zcube.github.io/grpc-precompiled-binaries/grpc-tools.tar.gz"

The build was tested using github jobs at https://github.com/zcube/gitpod/tree/arm64-2

After modifying the rendered yaml in the installer, it mostly works like this.

image

node0 : ARM64
nodex86 : x86

MySQL cannot run on ARM64.

Release Notes

NONE

P.S

  • I developed this with RedstoneWizard08 to solve ARM64 Support #7700. But suddenly RedstoneWizard08 and the issue disappeared together.

@roboquat roboquat added release-note-none team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team size/M labels Feb 1, 2022
@csweichel
Copy link
Contributor

csweichel commented Feb 1, 2022

/werft run

👍 started the job as gitpod-build-zb-arm64-build-fork.0

@codecov
Copy link

codecov bot commented Feb 1, 2022

Codecov Report

Merging #7937 (60c20d3) into main (bbf7036) will decrease coverage by 1.80%.
The diff coverage is n/a.

❗ Current head 60c20d3 differs from pull request most recent head 9fd97d0. Consider uploading reports for the commit 9fd97d0 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7937      +/-   ##
==========================================
- Coverage   12.01%   10.20%   -1.81%     
==========================================
  Files          20       18       -2     
  Lines        1190     1009     -181     
==========================================
- Hits          143      103      -40     
+ Misses       1043      905     -138     
+ Partials        4        1       -3     
Flag Coverage Δ
components-gitpod-cli-app 10.20% <ø> (-0.66%) ⬇️
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?
components-local-app-app-windows-amd64 ?
components-local-app-app-windows-arm64 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/gitpod-cli/cmd/credential-helper.go 1.20% <0.00%> (-4.39%) ⬇️
components/local-app/pkg/auth/pkce.go
components/local-app/pkg/auth/auth.go

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbf7036...9fd97d0. Read the comment docs.

@csweichel
Copy link
Contributor

csweichel commented Feb 2, 2022

/werft run

👍 started the job as gitpod-build-zb-arm64-build-fork.1

@RedstoneWizard08
Copy link

Hi! I'm back!
Here's the long version of what happened: #7700 (comment)
TL;DR: My account got suspended, I didn't do anything wrong, and everything's okay now. I may work on this issue a little more (the issue has re-appeared) but I think @ZCube has done mostly everything! Thanks so much for your help!

Original issue: #7700

@geropl
Copy link
Member

geropl commented Feb 3, 2022

/lgtm

I tested the amd64 build by starting workspaces and it worked as expected. I also checked the pods/deployments, also as expected. 🎉

I see this as first step to eventually support ARM platforms. IMO it would make sense to also offer arm64 images, because it has already started taking shares of cloud space (AWS) and will continue to do so.

Some thoughts around building additional arm64 images:

  • we should build them as often as possible (on every build, ideally), without slowing down the build 🐔 🥚
  • to make that work we could:
    • only build arm64 on main builds
    • run arm64 builds in a parallel job

@roboquat
Copy link
Contributor

roboquat commented Feb 3, 2022

LGTM label has been added.

Git tree hash: de3bb443246bb5c0bbbec610609a151fcd6d13fc

@ZCube
Copy link
Author

ZCube commented Feb 3, 2022

Hi! I'm back! Here's the long version of what happened: #7700 (comment) TL;DR: My account got suspended, I didn't do anything wrong, and everything's okay now. I may work on this issue a little more (the issue has re-appeared) but I think @ZCube has done mostly everything! Thanks so much for your help!

Original issue: #7700

Thanks to you, I was able to get started, and your point was very helpful. In particular, I received a lot of help in building a test environment using Github Actions.

image

@ZCube ZCube requested review from a team February 3, 2022 16:36
@roboquat
Copy link
Contributor

roboquat commented Feb 3, 2022

New changes are detected. LGTM label has been removed.

@roboquat roboquat added team: IDE and removed lgtm labels Feb 3, 2022
@ZCube
Copy link
Author

ZCube commented Feb 3, 2022

/lgtm

I tested the amd64 build by starting workspaces and it worked as expected. I also checked the pods/deployments, also as expected. 🎉

I see this as first step to eventually support ARM platforms. IMO it would make sense to also offer arm64 images, because it has already started taking shares of cloud space (AWS) and will continue to do so.

Some thoughts around building additional arm64 images:

  • we should build them as often as possible (on every build, ideally), without slowing down the build 🐔 🥚

  • to make that work we could:

    • only build arm64 on main builds
    • run arm64 builds in a parallel job

I finally managed to run it. Does it work using MariaDB? The only one that requires amd64 is MySQL.

@RedstoneWizard08
Copy link

@ZCube we still need to update the helm chart to support arm64. I've already started doing this. https://github.com/gitpod-io/gitpod/tree/main/chart

@RedstoneWizard08
Copy link

@csweichel
Copy link
Contributor

@ZCube please squash the commits - I'll then re-run the CI and I reckon we're good to go

@roboquat
Copy link
Contributor

roboquat commented Feb 4, 2022

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: geropl
To complete the pull request process, please assign jeanp413, kylos101 after the PR has been reviewed.
You can assign the PR to them by writing /assign @jeanp413 @kylos101 in a comment when ready.

Associated issue: #7700

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ZCube
Copy link
Author

ZCube commented Feb 4, 2022

@csweichel I squash the commit. I probably won't have to fix it any more. Sorry for bothering you with the commit.

@princerachit
Copy link
Contributor

Hi, there seems to be a conflict. Can you please resolve it?

@ZCube
Copy link
Author

ZCube commented Feb 8, 2022

Hi, there seems to be a conflict. Can you please resolve it?

@princerachit In order to resolve this conflict, I have to modify the part related to the gitpod/openvscode-server-linux-build-agent docker image, but I can't do it. I was lost as to where to start.

# Conflicts:
#	components/ide/code/leeway.Dockerfile
@roboquat roboquat added size/L and removed size/M labels Feb 8, 2022
@RedstoneWizard08
Copy link

RedstoneWizard08 commented Feb 8, 2022

@RedstoneWizard08
Copy link

However, we do have this repo:
https://github.com/gitpod-io/vscode-linux-build-agent

@RedstoneWizard08
Copy link

@RedstoneWizard08
Copy link

Hi, there seems to be a conflict. Can you please resolve it?

@princerachit In order to resolve this conflict, I have to modify the part related to the gitpod/openvscode-server-linux-build-agent docker image, but I can't do it. I was lost as to where to start.

@ZCube I created a vscode-linux-build-agent clone and modified it to support arm64.

https://github.com/gitpod-arm/vscode-linux-build-agent/actions/runs/1814282344

@gtsiolis gtsiolis added the do-not-merge/cla-pending CLA has not been signed label Feb 11, 2022
@akosyakov
Copy link
Member

@csweichel how we are going to maintain it? It seems to add some complexity to IDE images

@csweichel
Copy link
Contributor

Hi @ZCube - thank you for the effort you've put into this.
After plenty of internal discussion we've come to the conclusion that at this point we'd rather not merge the PR, because:

  • we as Gitpod, and our customers today, don't have the use-case to run Gitpod on ARM64
  • we would not be able to guarantee that the ARM64 support would not break down the road, making this a very unreliable feature,
  • of the complexity, albeit a surprisingly small number of necessary changes.

I am sorry I don't have better news. Also, the statements above reflect our reasoning at this time, and things might change down the road.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution do-not-merge/cla-pending CLA has not been signed release-note-none size/L team: IDE team: webapp Issue belongs to the WebApp team team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ARM64 Support
8 participants