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
Add make targets to allow starting local cloud storage environment. #4069
Add make targets to allow starting local cloud storage environment. #4069
Conversation
Requirements: * docker deamon * docker compose installed Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
BUILDING.md
Outdated
|
||
### Gotchas | ||
|
||
You are expected to know your way around with go & git. | ||
You are expected to know your way around with `Go` & `git`. |
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.
I get that Go is capitalised, but then putting it in a codeblock makes it look like it should be a command. Perhaps italics, but not a codeblock :)
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.
(Also should this and other general doc changes be in a separate pr really....)
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.
RE: code formatting - it was a styling change 😄 💅 I can revert
As for the general doc - I'm not sure, maybe? 🤔
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.
Tbh I don't mind, it can piggy back
Giving it a go before a proper review.
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.
Yeah, it should probably be either "Go" (capitalised) or go
(code block; the command), but not both
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.
Ok, made some updates to BUILDING.md
8e630ae
I also wonder if we should have DEVELOPING.md
file that contains this local environment setup instead of putting the setup guide into the BUILDING.md
tests/docker-compose-storage.yml
Outdated
entrypoint: > | ||
/bin/bash -c " | ||
/usr/bin/mc config host add minio http://minio:9000 $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD} && ( | ||
/usr/bin/mc stat minio/images-local || /usr/bin/mc mb minio/images-local | ||
) && /usr/bin/mc anonymous set public minio/images-local && /usr/bin/mc admin trace --path " |
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.
Would it be worth creating Dockerfiles for these? (we can use build-arg for things we want to have customisable, such as the user and password, but perhaps that's not needed for this purpose. (maybe a MINIO_VERSION=...
build-arg if you want to customise the version of the image that's used
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.
I think the only useful thing to justify the dedicated Dockerfile
would be specifying the min.io
version 🤔 but I'm willing to be persuaded otherwise 😄
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.
I'd like to allow the user to pick a different compose tool, using docker compose
is very tied to docker desktop, which is not good from a licensing perspective.
With my suggested changes I had it running with podman-compose on an selinux system quite happily.
Co-authored-by: James Hewitt <james.hewitt@gmail.com> Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com>
Co-authored-by: James Hewitt <james.hewitt@gmail.com> Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com>
Co-authored-by: James Hewitt <james.hewitt@gmail.com> Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com>
Co-authored-by: James Hewitt <james.hewitt@gmail.com> Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com>
Co-authored-by: James Hewitt <james.hewitt@gmail.com> Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com>
Co-authored-by: James Hewitt <james.hewitt@gmail.com> Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com>
I edited your description just FYI :) |
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
43177b6
to
8e630ae
Compare
* make COMPOSE overrideable * remove minio trace command from minio init Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
Agreed, should be addressed now |
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.
Generally LGTM, and all WFM.
I would consider naming of the make targets. Why cloud-storage
and not minio
? Should run-s3-tests
not refer to minio, because that's the point?
Should start-cloud-storage
be a pre-req for (dependency of) run-s3-tests
(whatever we name them).
Co-authored-by: James Hewitt <james.hewitt@gmail.com> Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com>
The idea was that the underlying tool is irrelevant and we could swap it for something like
I'd like to add
I believe it should, yeah 😬 |
Not using minio makes sense then, thanks. To follow up on this one then:
Should Or even |
Co-authored-by: James Hewitt <james.hewitt@gmail.com> Signed-off-by: Milos Gajdos <milosgajdos83@gmail.com>
Tbh, I dont have a strong preference 🤔
Ultimately I feel this would be the best thing to do. We should get the individual cloud storage drivers tests to pass using |
PTAL @thaJeztah |
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.
LGTM
Awesome to have this included. Once it's merged we should setup a GitHub action so we can automatically run tests against MinIO for PRs. |
As soon as we make the tests pass :) |
Yes, what @Jamstah said. We also might wanna wait when minio/minio#18093 is released |
Do you want me to squash those 12 commits, @Jamstah 😅 |
I reviewed the code not the delivery, I don't mind either way :) |
We risk angering @thaJeztah though 😂 let's get his take |
I thought it was something you also preferred? And @davidspek wanted to start doing conventional commit in #4025 My take is I don't care unless the project cares. We haven't documented a project approach, or if we have, we haven't linked it properly from https://github.com/distribution/distribution/blob/main/CONTRIBUTING.md#contributing-code |
I dont think we have any policy, no. I'm happy to merge, I was just joking with @thaJeztah 😄 I think in past we sometimes asked folks to rebase, other times not (depending on the context i.e. are there any broken commits or not )...might be worth agreeing on something yeah 🤔 |
I would've loved the commits to have been squashed before merging, as there's ... a lot, and most of them touch-ups 😓 |
Yeah, I was thinking of that; we need some piece of doc/guideline in |
It depends a bit; sometimes one-liner changes may still be a "unit of work" and go together with a commit message (which may be outlining why that one-line-change was needed); those can be very useful for "future reference". For other changes, where code evolved during review (so follow-up commits are touching up "brand new code"), I don't think we should keep those, as they don't provide much information after code was merged (and it's better to have all of those in a single commit to see the change "as a whole"). That said; sometimes temporary commits can help during review ("to be squashed") to guide reviewers through changes made since their last review, and for "large units of work", it's worth splitting changes to smaller changes (but usually that is either "preparation" commits, or "refactoring" that needs to happen to assist the larger change). We have some text in the moby repository about this (although it's not perfect - by far); https://github.com/moby/moby/blob/v24.0.6/CONTRIBUTING.md#successful-changes
|
I was planning on getting started on the conventional commit enforcement tomorrow since it's also needed for the release process. It doesn't really help with the number of commits, but enforcing conventional messages does help with highlighting a commit should be squashed a bit. |
This PR adds a couple of new
make
targets that let you spin a local cloud storage environment with min.io.This lets you interact with an S3-compatible storage API. See the updated
BUILDING.md
document on how to get started.Ideally, we integrate this into our CI pipeline soon, but there are still some failing tests in S3 driver that need addressing before we update our GHA workflows. This PR merely adds the environment setup targets.
Requirements:
docker compose
compatible tool