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

Arm virtualisation #1371

Closed
wants to merge 41 commits into from
Closed

Arm virtualisation #1371

wants to merge 41 commits into from

Conversation

H4LL
Copy link
Contributor

@H4LL H4LL commented Sep 24, 2024

I made some updates to dockerfiles/ compose/ devcontainer files to specify amd64 as the platform. This was to ensure docker knew to virtualise hardware as as there is currently no implementation for ARM architecture. It's been working well for me so I thought I would share in case it helps someone else.

I have an issue open for this on #1365.

@WadeBarnes
Copy link
Member

WadeBarnes commented Sep 24, 2024

@H4LL, Here is an example of a simpler pattern to accomplish the same thing.

https://github.com/bcgov/von-network/blob/e32d1732963ee64eb6635614f1ffb37db8b0cf36/manage#L8-L19

It instructs docker to use linux/amd64 on ARM platforms without hard coding the use of linux/amd64 throughout all of the docker and docker compose files. I'm sure something similar can be done with the devcontainer to instruct it to use linux/amd64 as well, but not sure the exact mechanics off the top of my head.

cc @loneil @esune

@WadeBarnes WadeBarnes requested review from loneil and esune September 24, 2024 11:59
@H4LL
Copy link
Contributor Author

H4LL commented Sep 25, 2024

Ah, I see. Got it, I'll make some edits in due course to make it graceful like the von precedent, test and then try again. Thanks for the feedback!

@H4LL
Copy link
Contributor Author

H4LL commented Oct 6, 2024

@WadeBarnes Turns out it was super easy in the end and pretty much the command you passed me verbatim. I searched the von repo for any other reference to DOCKER_DEFAULT_PLATFORM but it turned up nothing so I suppose I just learned a handy environmental variable for docker.

I tested the code by wiping my images and running a fresh build using the convenience script I've added. Everything is working out on my end.
I think it may be getting into manage script territory though. If you'd like something along those lines, I'd be happy to put it together!

@WadeBarnes
Copy link
Member

That looks a lot cleaner. Yes, I'd rather see a simple ./manage script that can be used to build, start, and stop the services more easily.

Pro-Tip:

  • Use pushd and popd to manage the directory context within the script. This way you can change directories as needed throughout the script without inadvertently changing the working directory for the user.

Copy link
Member

@esune esune left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, looks a lot cleaner!

Some of your commits appear to not have DCO, could you please amend them to include it and push again?

@@ -147,6 +147,12 @@ This will leave the volume (data) intact and available on restart.
docker compose down
```

For mac users with ARM architecture, try using the conveniance script
Copy link
Member

Choose a reason for hiding this comment

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

Nit.: convenience

H4LL and others added 12 commits October 10, 2024 12:07
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
This reverts commit f1f998a.

Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
This reverts commit cb7e9a1.

Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
This reverts commit f13fd55.

Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
This reverts commit f1f998a.

Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
This reverts commit a71fe1c.

Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Gavinok and others added 18 commits October 10, 2024 12:07
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Removed unused endorser code and references

Signed-off-by: Lucas ONeil <lucasoneil@gmail.com>
Signed-off-by: Emiliano Suñé <emiliano.sune@gmail.com>
Co-authored-by: Emiliano Suñé <emiliano.sune@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Ivan P <2119240+i5okie@users.noreply.github.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Gavin Jaeger-Freeborn <gavinfreeborn@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Lucas ONeil <lucasoneil@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Lucas ONeil <lucasoneil@gmail.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
Signed-off-by: Adam J Hall <46713492+H4LL@users.noreply.github.com>
@H4LL
Copy link
Contributor Author

H4LL commented Oct 10, 2024

Hey, I managed to make a hash of the amendments so I created a freshie here:
#1388

I hope it's what you were after!

@H4LL H4LL closed this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants