S3 Compatible Object Storage in Open Source Cloud
With the open source project MinIO we can provide an S3 compatible object storage in Open Source Cloud. In this blog post we will go through how you can setup a MinIO object storage instance in Open Source Cloud. Service is available in the Free plan and if you don’t have any other active services or instances running you can try it out for free. One instance can store 50 GB of data.
We will start by creating one object storage instance and you can do this either in the web user interface or with the OSC command line tool.
With the command line tool create an object storage instance by running the following command in your terminal.
% osc create minio-minio blog -o RootUser=demo -o RootPassword=demopasswordIt is recommended that instead of providing the username and password in clear text you create a service secret and refer to these instead. For example:
% osc create minio-minio blog \
-o RootUser="{{secrets.user}}" \
-o RootPassword="{{secrets.password}}"To create an “S3 bucket” in this object storage instance we will first download and install the MinIO client for example using Homebrew.
% brew install minio/stable/mcCreate an alias for the object storage instance you just created.
% mc alias set demo \
https://demo-blog.minio-minio.auto.prod.osaas.io demo demopassword
Added `demo` successfully.Now we can create a bucket that we call blog.
% mc mb demo/blogTo list the contents on this bucket we can use the AWS command line tool as the object storage instance provides an S3 compatible interface.
% AWS_ACCESS_KEY_ID=demo \
AWS_SECRET_ACCESS_KEY=demopassword \
aws --endpoint-url https://demo-blog.minio-minio.auto.prod.osaas.io \
s3 ls blog/And as we have not uploaded anything yet we can expect this to be empty. Let us now upload an image we have on local disk.
% AWS_ACCESS_KEY_ID=demo \
AWS_SECRET_ACCESS_KEY=demopassword \
aws --endpoint-url https://demo-blog.minio-minio.auto.prod.osaas.io \
s3 cp images.jpeg s3://blog/
upload: ./images.jpeg to s3://blog/images.jpegAnd now when we list the content on this bucket we should find the file we just uploaded.
% AWS_ACCESS_KEY_ID=demo \
AWS_SECRET_ACCESS_KEY=demopassword \
aws --endpoint-url https://demo-blog.minio-minio.auto.prod.osaas.io \
s3 ls blog/
2024-07-03 21:36:40 12533 images.jpegWe can also use a third-party S3 client such as Cyberduck to access the storage.
You need to use the S3 (Deprecated path style requests) as connection profile. Connect and you will then see the following.
On Startup and Business plan you can create more than one object storage instances.
Be aware that removing an object storage instance means that the data will be lost.
What is Open Source Cloud
A software as a service based on open source with a unique transparent model where revenue is shared with the open source authors. Open Source Cloud offers media industry companies a quick way to incorporate open source in their solutions and the option to run the same software in-house as the source code is publicly available.
- API and CLI documentation: https://api.osaas.io
- Javascript Client Library reference documentation: https://js.docs.osaas.io/
