Skip to content

Deploy your S3 storage using UI

Objectspace is an object storage exported via the commonly used S3 protocol. Objectspaces allow you to store large amounts of unstructured blobs of data ( images, videos, text files, HTML files..) or any blob of bytes.

An objectspace can be connected to one or more cloudspaces. However, cloudspaces with overlapping networks cannot connect to the same objectspace.

You can manage your buckets (create/delete/edit) in an objectspace using a client compatible with S3 such as MinIO or from the whitesky.cloud BV user interface.

To access your S3 content, you can use the MinIO Client which offers UNIX like commands to manage buckets and objects. Next to MinIO there are tons of other clients and applications that support the S3 protocol.

In this tutorial, we will create an objectspace and make it publicly accessible using Ingress, then we will connect to our objectspace using MinIO client.

Using the DNS feature provided on the whitesky.cloud BV portal, you can simply create a publicly accessible S3 storage in less steps. However, this tutorial can help you understand how you can use reverse proxies and connect to your S3 storage using MinIO client.

To learn more about how you can use DNS on the whitesky.cloud BV portal, check the DNS Documentation.

Step 1 : Create an objectspace

  1. Click Objectspaces on the left side of the whitesky.cloud BV portal. The previously created objectspaces will be listed.
  2. Click CREATE OBJECTSPACE at the top of the page.
  3. Select the location where you want to create your objectspace.

    Keep in mind that objectspaces can only connect to cloudspaces in the same location.

  4. Enter your Objectspace Name, we will use the name MinIO Objectspace for this tutorial. (Optionally: choose the cloudspace to connect to, but it is recommended to choose the cloudspace in this step.)

  5. Click CREATE OBJECTSPACE.

Step 2 : Connect to cloudspace (Optional: If you didn't connect your Objectspace to a Cloudspace in Step 1)

You need to have a public cloudspace to connect it with our objectspace. If you don't know how to create a public cloudspace, check the Cloudspace documentation and create a cloudspace named MinIO Cloudspace for this tutorial.

  1. Click Objectspaces on the left side of the page. The previously created Objectspaces will be listed.

  2. Click on the objectspace that you want to connect with your cloudspace.

  3. At the top of the page, click CONNECT. A list of available cloudspaces will appear.

  4. Choose the cloudspace from the list, then click Confirm.

A message will appear indicating that the objectspace has been successfully connected to the cloudspace.

Step 3 : Expose objectspace using ingress

  1. Open the details page of your cloudspace that is connected with your objectspace, and click Ingress in the middle of the page.

  2. Click Create Server Pool at the top of the page and enter your Server Pool Name and Description (optional), then click Add.

  3. After being redirected to the server pool details page, click Add Host at the top of the page.

  4. Select an objectspace, then choose your objectspace from the objectspaces list and click Add.

Next we need to add a reverse proxy to our serverpool within our cloudspace

  1. Open the cloudspace details page and click Ingress in the middle of the page, then in the sub-menu click Reverse Proxy.

  2. Click Create Reverse Proxy at the top of the cloudspace details page.

  3. Configure your proxy general information:

    • Proxy Name
    • Description (Optional)
    • Domain that you will use in your Proxy Front-end (e.g mydomain.example.be)
    • Front-End Port (e.g. 443)
    • Front-End Scheme whether HTTP or HTTPs or both.
    • Letsenrypt.
    • Back-End Scheme.
    • Back-End Port (e.g 80)
    • Serverpool

    image

    You must configure the domain that you added to point to the same external IP of the cloudspace to be able to initialize the connection.

  4. Click Add, then the reverse proxy will be added to the reverse proxy list on the cloudspace details page.

Your objectspace is now accessible publicly from inside or outside your cloudspace.

You can use whether CLI or APIs to create your objectspace and connect it with a cloudspace that has a reverse proxy.

Step 4 : Accessing objectspaces from MinIO client

First Scenario : Using VM within our cloudspace

We will access our objectspace from an existing Virtual Machine on our cloudspace. So we will create a VM and use it to configure MinIO Client and access our objectspace.

If you don't know how to create a VM check the Virtual Machine documentation and create a VM with Ubuntu Desktop 20.04 image and configure it as you like.

  1. After successfully creating the VM, you will be redirected to the VM details page.

  2. Click Console at the top of the VM details page.

  3. Your VM will start, enter your Initial Password (you will find it in the VM details page). Then open up the terminal on your VM.

    image

  4. Now we need to install MinIO Client on our VM using this command

    wget https://dl.min.io/client/mc/release/linux-amd64/mc
    
  5. Type chmod +x mc to make the mc file executable.

    image

    You can also use the built-in MinIO client provided on the ISO Image which is attached to every VM by default. First, access the root on the VM terminal using sudo -i then use these two commands:

    • mount/ dev/sr1 /media
    • ls /media/tools/linux/minio-client/mc
  6. Now we can access our objectspace and give it an alias using this command

    ./mc alias set <ALIAS> https://<CLOUDSPACE_IP> <ACCESS_KEY> <SECRET>
    
    • Where ALIAS is the alias you choose for your objectspace and we will use the name s3Local, but you can name it as you like.
    • You can find CLOUDSPACE_IP, ACCESS_KEY and SECRET values in the objectspace details page.
    • CLOUDSPACE_IP is the IP address under the CLOUDSPACE CONNECTIONS tab

    image

  7. We can create a new Bucket using this command.

    ./mc mb <ALIAS>/<NEW_BUCKET_NAME>
    

    image

  8. To test the new bucket and the connection between the VM and the objectspace, we will create a text file using this command.

    touch <FILENAME>
    

    image

  9. Use this command to upload the file from the machine to the objectspace.

    ./mc cp <FILE_NAME> <ALIAS>/<BUCKET_NAME>
    

    image

  10. To list the content of the bucket use this command, and you will find the file that we have uploaded available on the bucket on our objectspace.

    ./mc ls <ALIAS>/<BUCKET_NAME>
    

    image

Second Scenario : Using machine from outside the cloudspace

  • We will access our objectspace from outside our cloudspace. So we will configure MinIO Client on our local machine to access the objectspace within our cloudspace.


    1. Use these commands to install MinIO Client on our machine and make the mc file executable.

      wget https://dl.min.io/client/mc/release/linux-amd64/mc
      
      chmod +x mc
      

      If you are using another operating system then check MinIO Download to download the version that is compatible with your operating system.

      image

    2. Now we can access our objectspace and give it an alias using this command.

      ./mc alias set <ALIAS> https://<DOMAIN_NAME>:<PROXY_FRONT_END_PORT> <ACCESS_KEY> <SECRET>
      
      • Where ALIAS is the alias you choose for your objectspace and we will use the name s3External, but you can name it as you like.

      • You can find ACCESS_KEY and SECRET values in the objectspace details page.

      • DOMAIN_NAME is the domain we have added in our reverse proxy and PROXY_FRONT_END_PORT is the port that we have added to the Proxy Front-end.

      image

    3. We can create a new Bucket using this command.

      ./mc mb <ALIAS>/<NEW_BUCKET_NAME>
      

      image

    4. To test the new bucket and the connection between the VM and the objectspace, we will create a text file using this command.

      touch <FILE_NAME>
      

      image

    5. Use this command to upload the file from the machine to the objectspace.

      ./mc cp <FILE_NAME> <ALIAS>/<BUCKET_NAME>
      

      image

    6. To validate that you uploaded the file successfully, use the list command to display the content of your bucket.

      ./mc ls <ALIAS>/<BUCKET_NAME>
      

      image



    1. First, we need to install MinIO Client on our machine. Open MinIO Download and download the MinIO Client executable file.

      image

    2. Open the Downloads directory (where you downloaded the MinIO Client) in your Windows Command Line, then type run the MinIO Client in the command line.

      mc.exe
      
      image

    3. Now we can access our objectspace and give it an alias using this command.

      mc alias set <ALIAS> https://<DOMAIN_NAME>:<PROXY_FRONT_END_PORT> <ACCESS_KEY> <SECRET>
      
      • Where ALIAS is the alias you choose for your objectspace and we will use the name s3WindowsExternal, but you can name it as you like.

      • You can find ACCESS_KEY and SECRET values in the objectspace details page.

      • DOMAIN_NAME is the domain we have added in our reverse proxy and PROXY_FRONT_END_PORT is the port that we have added to the Proxy Front-end.

      image

    4. We can create a new Bucket using this command.

      mc mb <ALIAS>/<NEW_BUCKET_NAME>
      

      image

    5. To test the new bucket and the connection between the VM and the objectspace, we will create a text file using this command.

      echo hello world > myfile.txt
      

      image

    6. Then use the command to upload the file from the machine to the objectspace.

      mc cp <FILE_NAME> <ALIAS>/<BUCKET_NAME>
      

      image

    7. To validate that you uploaded the file successfully, use the list command to display the content of your bucket.

      mc ls <ALIAS>/<BUCKET_NAME>
      

      image


Sharing Files from External Services

If you want others to share content to your objectspace, you can create an Upload Link for your objectspace to allow external services to upload files to your storage.

Upload File using a VM within your Cloudspace:

  1. To start uploading the file use this command

    ./mc share upload <ALIAS>/<BUCKET_NAME>/<FILE_NAME>
    

    image

  2. Create a temp file named "info-upload.txt" in your home directory, then use this command to upload this file from your local machine to your cloud storage.

    curl -F name=testfile -F file=@<FILE_NAME> <URL>
    

    image

    The URL generated using the share command has several attributes like: Upload Path, Signature, Bucket Name, Upload Policy, Key, Credentials, etc. All are needed to give the authorization for uploading files to your cloud storage.

  3. To validate that you uploaded the file successfully, use the list command to display the content of your bucket.

    ./mc ls <ALIAS>/<BUCKET_NAME>
    

    image

    You will notice that the name of the new uploaded file is uploadfile.txt instead of info-upload.txt, because we used the uploadfile.txt as a key when we created our upload link. So if you want to upload multiple files you will need to create multiple links with different keys.

Upload File using your local Machine:

  • For both Linux and Windows users.


    1. To start uploading the file use this command

      ./mc share upload <ALIAS>/<BUCKET_NAME>/<FILE_NAME>
      

      image

    2. Create a temp file named "info-upload.txt" in your home directory, then use this command to upload this file from your local machine to your cloud storage.

      curl -F name=testfile -F file=@<FILE_NAME> <URL>
      

      image

      The URL generated using the share command has several attributes like: Upload Path, Signature, Bucket Name, Upload Policy, Key, Credentials, etc. All are needed to give the authorization for uploading files to your cloud storage.

    3. To validate that you uploaded the file successfully, use the list command to display the content of your bucket.

      ./mc ls <ALIAS>/<BUCKET_NAME>
      

      image

      You will notice that the name of the new uploaded file is uploadfile.txt instead of info-upload.txt, because we used the uploadfile.txt as a key when we created our upload link. So if you want to upload multiple files you will need to create multiple links with different keys.



    1. To start uploading the file use this command

      mc share upload <ALIAS>/<BUCKET_NAME>/<FILE_NAME>
      

      image

    2. Make sure that you have curl installed on your machine, if you don't please check curl for Windows and download the version that is compatible with your Windows version.

    3. create a temp file named "info-upload.txt" in your Downloads directory, then use this command to upload this file from your local machine to your cloud storage.

      curl -F name=testfile -F file=@<FILE_NAME> <URL>
      

      image

      The URL generated using the share command has several attributes like: Upload Path, Signature, Bucket Name, Upload Policy, Key, Credentials, etc. All are needed to give the authorization for uploading files to your cloud storage.

    4. To validate that you uploaded the file successfully, use the list command to display the content of your bucket.

      mc ls <ALIAS>/<BUCKET_NAME>
      

      image

      You will notice that the name of the new uploaded file is uploadfile.txt instead of info-upload.txt, because we used the uploadfile.txt as a key when we created our upload link. So if you want to upload multiple files you will need to create multiple links with different keys.


Check MinIO Documentation to learn more about pre-signed upload links and how you can integrate them in your applications.

See Also

  1. Deploy your S3 storage using CLI.
  2. Deploy your S3 storage using API.
  3. Create publicly accessible S3 storage using DNS.