Shared Filesystems

Video Transcript

Hey everyone, thanks for joining. Today we are going to talk about shared file systems on Cycle. I have a single server deployed to this demo cluster, and you might notice a new tab called ‘Configure.’ When you click into ‘Configure,’ you’ll see options for a shared file system, including shared directories and shared mounts. A shared directory is an identifier that represents a directory on the underlying host, while a shared mount allows you to mount an external file system to the host. Both options let you expose underlying directories on the host to a container.

For shared directories, you simply need to create a directory, for example, named ‘demo.’ When you configure the container, you can mount this directory to a specific location on the container and give it read or write access as needed. For shared mounts, I have prepared a basic EFS file system that we will mount to this server. After creating the EFS file system, we’ll grab the ‘attach’ option and configure the file system type. We’ll name this EFS and configure it using options like Net File System 4, copying necessary settings to make the connection.

Once we have our options set, we can reconfigure the file servers. Now, moving on to the demo environment, we will deploy a container using a basic ‘getting started’ image. For the setup, navigate from the dashboard to ‘Config’ and then to ‘Integrations,’ where you’ll find the shared file system options. We’ll set the identifier for the shared directory as ‘demo’ and grant writable access, meaning this container can write to that directory. You can mount this directory to any location within the container without needing to interact with the underlying host’s actual path. For this demo, we’ll use a temporary location.

Our other example is the EFS mount point, which you interact with just like any other directory. We’ll grant writable access and save the configuration. Let’s deploy another container, but this time, we’ll set it to ‘read-only.’ We’ll make sure to mount these directories to the same places but without write access. Once configured, we can use the console to interact with the file systems.

In the first container, since it has writable access, we can create files in the shared directories. However, in the second container with read-only access, while the directories and files are visible, attempts to write to them will result in errors. This setup shows how you can use the mounted file system from EFS and the shared directory on the host, both managed by Cycle.

This feature provides a new level of flexibility when sharing files between containers without the cumbersome process of configuring shared files manually. If you have any questions, please leave them in the comments. This should help you get started using shared file systems on Cycle. We hope you enjoy this new feature. Thanks.