Volumes

Cycle supports mounting host node storage directly into containers via volumes . Volumes are mounted using ext4 per instance with DirectLVM, meaning volumes are thinly provisioned (taking only the amount of space needed to store the files, up to their max size).

Volumes are accessible from within the container at the specified path. Cycle also provides abstractions to be able to remotely access the contents of volumes without needing to go through the container process directly.

Specifying Volumes for a Container

On Cycle, volumes are only attached to stateful containers.

In order for a stateful container to have a volume attached, the volume must be defined in the Dockerfile used to create the container's base image. There is no way to attach a volume to a container that does not have the volume specified in the Dockerfile. That said, it is possible to create a wrapper with a Dockerfile that adds volumes, which can be used from the container's base image.

FROM node:alpine
VOLUME /myvol

Using the above Dockerfile, Cycle will attach a volume at /myvol to any instances created.

Volume Configuration Options

Volumes have several configuration options available, and are managed at the container level.

  • Max Size: The max size a volume can grow to. Since volumes are thinly provisioned, the actual size is dynamic and the volume will only take up the amount of space necessary to contain its stored files.
  • Read-Only: Volumes can be set to read-only, so they only ever store files that were added to them when the container image was built.

Remote Access

The platform provides the ability to enable remote access on volumes at the container level. Remote access works similar to the two-way instance console, in that it creates a proxy for an SFTP connection without installing SFTP into the container or modifying it in any way.

SFTP access can be secured with a password authentication. Cycle supports plaintext passwords, SHA512 hashed passwords, and MD5 hashed passwords.

Access can also be restricted based on IP address.

Storage Pools

Cycle will automatically create an isolated storage pool that contains any attached storage devices whose size is greater than 2TB. The storage pool consists of a physical volume and a volume group (PV + VG).

For example, 3x 2TB disks will yield 6TB of usable storage, while 2x 2TB disks will yield 2TB with RAID1+0.

Instance volumes can utilize this storage pool rather than the base disk by selecting the 'storage pool' option during container create.

Configure and Access Volumes on Cycle