This project created for giving a unified way to access different cloud object stores. Based on the configuration one can toggle between different cloud object stores.
This also contain configuration which can be used for MINIO. MinIO can be configured locally and can be used for development purpose to reduce cost. MINIO provides APIs similar to S3 and S3 Client code can be used to interact MINIO. This also can be used in production with adequate configuration.Please refer to the licencing part for production use. Please also read through the documentation for a production type of setup.
MINIO setup document can be followed for setting it up in various environment. But when I am taking here about development purpose, I use the docker way of running it in my local. Please specify the appropriate file path for MINIO to store the objects.
docker run -p 9001:9000 --name minio minio/minio server /data
docker restart minio -t 180
You may use the default credentials 'minioadmin:minioadmin, to access the object store both from application and web console.
To run the setup to use s3, please user the following properties in application. properties file.
cloud.storage.type=AMAZON_S3
aws.s3.access.key.id=*******
aws.s3.secret.access.key=*******
aws.s3.region=US_WEST_2
To run the setup to use MINIO, use the following properties.
cloud.storage.type = MINIO
aws.s3.access.key.id=minioadmin
aws.s3.secret.access.key=minioadmin
aws.s3.region=US_WEST_2
For the time being in this repository, I have not included any other implementations related to other cloud object provider. The essence of this repository is to show how s3 client can be used for MINIO server.
Following APIs have been created for demonstration of the concept only.
curl --location --request POST 'http://localhost:8080/buckets/4ba00bd9-84dc-477b-bab8-9a8e8005c333/'
curl --location --request DELETE 'http://localhost:8080/buckets/4ba00bd9-84dc-477b-bab8-9a8e8005c333/'
curl --location --request GET 'http://localhost:8080/buckets/'
curl --location --request POST 'http://localhost:8080/buckets/4ba00bd9-84dc-477b-bab8-9a8e8005c333/test.json' \
--header 'Content-Type: application/json' \
--data-raw '{"test":"test"}'
curl --location --request DELETE 'http://localhost:8080/buckets/4ba00bd9-84dc-477b-bab8-9a8e8005c333/test.json'
curl --location --request GET 'http://localhost:8080/buckets/4ba00bd9-84dc-477b-bab8-9a8e8005c333/'
curl --location --request GET 'http://localhost:8080/buckets/4ba00bd9-84dc-477b-bab8-9a8e8005c333/test.json'