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

Implement support for MinIO #103

Open
6 tasks
carlspring opened this issue Nov 8, 2020 · 2 comments
Open
6 tasks

Implement support for MinIO #103

carlspring opened this issue Nov 8, 2020 · 2 comments
Labels
help wanted Extra attention is needed on hold

Comments

@carlspring
Copy link
Owner

carlspring commented Nov 8, 2020

Task Description

We need to investigate what would be required in order to add support for MinIO.

Tasks

The following tasks will need to be carried out:

  • Investigate what will need to be done.
  • Implement the necessary changes.
  • Create a MinIOITTestSuite based on the AmazonS3ITSuite one. (check Use tags instead of suites to separate tests #183)
    • Implement a JUnit extension that starts the MinIO docker image using testcontainers before all tests in the suite (and then stops it at the end). (check Set up testcontainers #60)
  • Add test cases.
  • Illustrate how to use this in the documentation.

Task Relationships

This task:

Useful Links

Help

@carlspring carlspring added the help wanted Extra attention is needed label Nov 8, 2020
@BjoernAkAManf
Copy link
Contributor

Hi,

i investigated today and it seems there is no need for any significant changes in the codebase.
I was able to configure MinIO without any problems as a drop in replacement.

I used the following Test to verify the behavior:

        final String accessKey = "AKIAIOSFODNN7EXAMPLE";
        final String secretKey = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY";
        final URI server = URI.create("s3://localhost:9000");
        final Map<String, String> env = new HashMap<>();
        env.put(S3Factory.ACCESS_KEY, accessKey);
        env.put(S3Factory.SECRET_KEY, secretKey);
        env.put(S3Factory.PROTOCOL, "http");
        try (final FileSystem fs = FileSystems.newFileSystem(server, env, Thread.currentThread().getContextClassLoader())) {
            final Path path = fs.getPath("/meow/XYZ.txt");
            System.out.println(path);
            Files.write(path, "Hello World\nLine 1\n\nline 2\n".getBytes(StandardCharsets.UTF_8));
            System.out.println(Files.readAllLines(path));
        }

While running the MinIO Container with the following docker command (taken from here https://docs.min.io/docs/minio-docker-quickstart-guide )

docker run -p 9000:9000 \
  -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" \
  -e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
  minio/minio server /data

I'll go work on the Test Container issue now and add some tests for this Issue as well.

@carlspring
Copy link
Owner Author

Awesome! Thanks for these great findings! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed on hold
Projects
None yet
Development

No branches or pull requests

3 participants