-
Notifications
You must be signed in to change notification settings - Fork 25
feat: ARM64 support #158
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
Merged
Merged
feat: ARM64 support #158
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
5f6fd15
feat: arm64 arch
yanksyoon 6702035
docs: arm64 arch
yanksyoon c20e1fa
chore: remove arm arch support
yanksyoon 1350874
feat: yq arm bin support
yanksyoon 10b84ec
test: add charm state w/ arch unit tests
yanksyoon b751694
Merge branch 'main' into feat/arm64
yanksyoon 8679566
fix: add arch to runner creation
yanksyoon 40ddebb
tests: fix
yanksyoon 313f90a
Merge branch 'main' into feat/arm64
yanksyoon 3d9c8b7
chore: refactor runner args
yanksyoon 617fc1e
Merge branch 'main' of https://github.com/canonical/github-runner-ope…
yanksyoon 8a91191
chore: resolve merge conflicts
yanksyoon aa65bf6
docs: add arm64 docs
yanksyoon 815673e
docs: remove extra newline
yanksyoon e6fd776
chore: update dostring
yanksyoon 99f7ae4
docs: update deployment command
yanksyoon 9286ab0
docs: remove reference to untested infra
yanksyoon dbf4106
docs: grammar fix
yanksyoon 0fda576
docs: use latest arm supported instance
yanksyoon 16fd125
chore: use set
yanksyoon 81ad4b4
chore: test different archs for runner bin download
yanksyoon 7a17cdb
docs: remove reference to lxd problems
yanksyoon 41a5bfa
docs: arm64 nested v explanations
yanksyoon f78315b
chore: update set syntax
yanksyoon db8490c
Merge branch 'main' into feat/arm64
yanksyoon 119ad18
Update test_runner_manager.py
yanksyoon a4105e3
docs: update explanation to arm64 nested v support
yanksyoon ac10133
docs: fix typo
yanksyoon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # ARM64 | ||
|
|
||
| ### Nested virtualiztion support | ||
|
|
||
| GitHub runner uses [LXD](https://github.com/canonical/lxd) to create a virtual machine to run the | ||
| GitHub runner's binary. Some versions of the ARM64 architecture do not support nested | ||
| virtualizations. | ||
|
|
||
| Furthermore LXD by default uses QEMU with KVM acceleration options and such behavior cannot | ||
| overridden. When run on a machine without KVM support, | ||
| the following error will occur: | ||
| ``` | ||
| Error: Failed instance creation: Failed creating instance record: Instance type "virtual-machine" | ||
| is not supported on this server: KVM support is missing (no /dev/kvm) | ||
| ``` | ||
|
|
||
| The kernel for nested virtualizations have not yet landed upstream. | ||
|
|
||
| The current progress of ARM64 nested virtualization support requires a few underlying technologies | ||
| to be further developed. | ||
| - [Hardware: supported](https://developer.arm.com/documentation/102142/0100/Nested-virtualization) | ||
| - Kernel (KVM): upstream not yet ready | ||
| - Userspace programs (e.g. qemu): unsupported. | ||
|
|
||
| Therefore, it is currently necessary that the charm is deployed on a bare metal instance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # How to deploy on ARM64 | ||
|
|
||
| The charm supports deployment on ARM64 machines. However, it should be noted that the ARM64 | ||
| deployment currently only supports ARM64 bare-metal machines due to the limitations of | ||
| [nested virtualization on ARM64](https://developer.arm.com/documentation/102142/0100/Nested-virtualization). | ||
|
|
||
| The following uses AWS's [m7g.metal](https://aws.amazon.com/blogs/aws/now-available-bare-metal-arm-based-ec2-instances/) | ||
| instance to deploy the GitHub Runner on ARM64 architecture. | ||
|
|
||
| ### Prerequisites | ||
| 1. Juju with ARM64 bare metal instance availability. | ||
| - On AWS: `juju bootstrap aws <desired-controller-name>` | ||
| 2. GitHub [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) | ||
| 3. Repository to register the GitHub runners. | ||
|
|
||
| ### Deployment steps | ||
|
|
||
| Run the following command: | ||
| ```shell | ||
| juju deploy github-runner \ | ||
| --constraints="instance-type=a1.metal arch=arm64" \ | ||
| --config token=<PERSONAL-ACCESS-TOKEN> --config path=<OWNER/REPO> | ||
| ``` | ||
|
|
||
| The units may take several minutes to settle. Furthermore, due to charm restart (kernel update), | ||
| the Unit may become lost for a few minutes. This is an expected behavior and the unit should | ||
| automatically re-register itself onto the Juju controller after a successful reboot. | ||
|
|
||
| Goto the repository > Settings (tab) > Actions (left menu dropdown) > Runners and verify that the | ||
| runner has successfully registered and is online. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # ARM64 | ||
|
|
||
| ### AWS bare metal instances | ||
|
|
||
| Use any of the [ARM64 metal instances](https://aws.amazon.com/ec2/instance-types/) to provide juju | ||
| with ARM64 bare metal instances. Some of the examples include: a1.metal, m7g.metal. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.