Skip to main content
Skip to main content
🚧 Work in Progress

Create Shared storage service in Zerops

Zerops provides a Shared storage service to share files between all containers of the same service or even among containers of different runtime services. Shared storage is a secure file system storage built on SeaweedFS ↗ that suits both for development and production.

Create Shared storage service using Zerops GUI​

First, set up a project in Zerops GUI and add a runtime service. Then go to the project dashboard page and choose Add new service in the left menu in the Services block. Then add a new Shared storage service:

Set a hostname​

Enter a unique service identifier like "storage","shared" etc. Duplicate services with the same name in the same project are forbidden.

Limitations:​

  • maximum 25 characters
  • must contain only lowercase ASCII letters (a-z) or numbers (0-9)
Note

The hostname is fixed after the service is created. It can't be changed later.

Connect to a service​

Select one or more project's runtime services in the Share with Services block:

image

The new Shared storage will be connected to the selected runtimes.

Note

Runtime services can be connected and disconnected at any time also after the shared storage is created.

Choose Shared storage service mode​

Zerops provides Shared service in two modes: Highly available and Single container.

image

Highly available​

Zerops will create a Shared storage cluster with 3 containers. This mode is suited for production.

Zerops always keep the 3 Shared storage containers on different physical machines. All your data is stored redundantly in 3 identical copies. In case of a failure of a container or the underlying physical machine, Zerops automatically disconnects the failed container from the cluster, creates a new container and syncs all data from the remaining 2 copies. Finally the broken container is automatically deleted.

Single container​

Zerops will create a Shared storage in a single container. Useful for non-essential data or dev environments.

Your data is stored only in a single container. If the container or the underlying physical machine fails, your data since the last backup are lost. Zerops doesn't provide any automatic repairs of single node Shared storage services.

Note

The Shared storage service mode is fixed after the service is created. It can't be changed later.

Set auto scaling configuration​

Zerops scales Shared storage services automatically by raising or lowering the hardware resources of each database container.

Vertical auto scaling has following default configuration:

HW resourceMinimumMaximum
CPU cores15
RAM0.25 GB32 GB
Disk1 GB100 GB

For most cases, the default parameters will work without issues. If you need to limit the cost of the Shared storage service, lower the maximal resources. Zerops will never scale above the selected maximums.

When you are experiencing problems with insufficient Shared storage performance or capacity, increase the minimal resources. Zerops will never scale below the selected minimums.

You can change the auto scaling parameters later.

image

[Learn more] about Shared storage auto scaling.

Create Shared storage service using zCLI​

zCLI is the Zerops command-line tool. To create a new Shared storage service via the command-line, follow these steps:

  1. Install & setup zCLI
  2. Create a project description file
  3. Create a project with a runtime and a Shared storage service

Choose your runtime​

Read about how to create a project description file and create a runtime service with a Shared storage.