-
Notifications
You must be signed in to change notification settings - Fork 22
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
M1 compatibility #581
M1 compatibility #581
Conversation
@@ -41,7 +41,7 @@ services: | |||
- "28017:28017" | |||
|
|||
mysql-8: | |||
image: mysql:8 | |||
image: mysql:8-oracle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For anyone who uses this branch, you'll need to make sure you use Docker's debug feature to purge all the images before you attempt using MySQL. Without doing so, you will have odd behaviour in regards to Whitehall connectivity and replicating data.
Just tested Whitehall with this, ran fine 👍 |
b7110cb
to
b5b94d7
Compare
So, in short (because this is something I've been on a deep dive into
recently):
Router currently uses a feature called OpTime to find out whether it has to
refresh its internal representation of the routing tree. The way Router is
written it requires a replicaset (the optime calls basically open up the
replicaset, dig down into it to find the primary, then use that as the
check). The replicaset can be only 1 service (the primary), but it has to
be there - router doesn't have any fallback. So if you're using router in a
way on your local machine that needs you never to update the routes, it
would work (although it would be chucking out warning messages about not
finding the replica primary). If you wanted to update routes, or you wanted
to run the router test suite, it would fail without the replicaset.
At the moment I'm working on moving router in production to a DocumentDB
database, which will require me to get rid of the replicaset requirement.
But it's not quite done yet (and has just had a week+ delay due to me
getting covid).
…On Tue, 5 Apr 2022 at 13:48, Dilwoar Hussain ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In docker-compose.yml
<#581 (comment)>:
> @@ -39,6 +39,7 @@ services:
ports:
- "27017:27017"
- "28017:28017"
+ command: ["--replSet", "mongo-replica-set"]
Why do we need it to replicate locally?
—
Reply to this email directly, view it on GitHub
<#581 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABAHVSM2LANM32O2YD5NBY3VDQY77ANCNFSM5Q7MU2BA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Unlike mysql:8 the 8-oracle tag has support for AMD64 and Arm64 chipsets so can work with an M1 mac. I've not tested all MySQL functionality (db restore etc) but I assume it'll work since it isn't very different at all.
This replaces all usages of elasticsearch-6 with elasticsearch-7, as per the suggestion Keith made in: #561 (comment) I've not actually tested any of this functionality so can't guarantee it works.
This leaves comments to record the cases where we've made an exceptions in configuration in order to stick to using images that are suitable with ARM64 machines (typically M1 Macs).
b5b94d7
to
24427e1
Compare
Do hope you're feeling better now Keith Hmm I see, so for that aspect of router to work it needs to be running as a replica set. Whereas for all other apps they don't care if replicaset or not? From what I can tell just starting mongo with Do you think we need to wait until(/if) we resolve this before we merge this PR for M1 compatibility? I feel like, aside from this, all the other bits work. |
Short story: I think you should merge this for the moment and we keep a separate branch for working on router until I can update router enough that that's unnecessary. Long story: I would say that this affects:
People in group 1 won't be able to run the test suite locally. But it'll still run on Jenkins, and it can be made to run locally with the small change to their local govuk-docker. So I think they will live with that. People in group 2 won't see routes get updated locally. But - that might not be a thing people care too much about in local dev? I'm also not 100% sure whether this is true, either - is the endpoint on router that triggers an update completely unused now? If some things still use it, maybe that is fine. You have a better idea of how frequent this need comes up, but I guess maybe not a lot? Either way, the impact of merging this as is seems minimal. It might only ever affect me, and I already know how to work around it. So I'm happy for this to get merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
This PR tries to pull together all the fixes we know are needed for using GOV.UK docker on an M1 mac using information from: #561
This is marked as a draft as I'm not sure if we'll merge these things in directly, I expect we'd probably do some more testing and then consider adding some explanatory comments to code.I've done some testing now and other M1 mac users are making use of this branch. I've also confirmed it allows database restores for MySQL, MongoDB and Elasticsearch.