-
Notifications
You must be signed in to change notification settings - Fork 1
Service: MinIO
The open source project MinIO offers an S3 compatible storage service. This tutorial walks you through using MinIO in Open Source Cloud as a service for managing buckets that can be accessed with AWS S3 compatible clients.
- If you have not already done so, sign up for an OSC account.
- AWS CLI or S3 compatible client
You will be using the CLI to create the service instances for this solution.
- If not already installed on your machine, download and install NodeJS
- Install OSC CLI using NodeJS package manager
% npm install -g @osaas/cli- Verify that it is installed
% osc --version
0.11.2Create two service secrets in the MinIO service in the OSC web user interface.
user=guidepassword=guide
The user and password to just serve as an example.
Create a storage service with this command in your terminal. We will refer to the service secrets created in step 2.
% osc create minio-minio guide \
-o RootUser="{{secrets.user}}" \
-o RootPassword="{{secrets.password}}"
We will now create a storage bucket in the storage service we created in step 3. First we will download and install the MinIO client using Homebrew.
% brew install minio/stable/mc
Create an alias for the storage service you created where <tenant> is the id of your tenant.
% mc alias set guide https://<tenant>-guide.minio-minio.auto.prod.osaas.io guide guide
Added `guide` successfully.
Now we can create a bucket that we call tutorial
% mc mb guide/tutorial
To upload an image we have on local disk to the bucket we will the AWS command line tool as the storage service provides an S3 compatible interface.
% export AWS_ACCESS_KEY_ID=guide
% export AWS_SECRET_ACCESS_KEY=guide
% aws --endpoint-url https://<tenant>-guide.minio-minio.auto.prod.osaas.io \
s3 cp images.jpeg s3://tutorial/
upload: ./images.jpeg to s3://tutorial/images.jpeg
And when we list the content on this bucket we should find the file we just uploaded.
Be aware that removing a storage service means that the data will be lost.