Deploying a Database
Video Transcript
Hey everyone, thanks for joining. Today, we’re going to talk about shared file systems on Cycle. I have a single server deployed to this demo cluster, and if you’ve been with us for a while, you might notice a new tab called “Configure.” When you click into “Configure,” you’ll see options for a shared file system, which includes shared directories and shared mounts.
A shared directory is simply an identifier that represents a directory on the host. In contrast, a shared mount allows a user to mount an external file system to the host. Both options enable you to expose underlying directories on the host to a container. For shared directories, all you need to do is provide a name, like “demo.” During the container configuration, you can mount this directory to a specific place in the container and give it read or write access as needed.
For shared mounts, I’ve prepared a basic EFS file system that we’ll mount to this server. We’ll grab the EFS file system, which I created as a basic setup. After clicking “Attach,” we’ll look for the file system type and name it “EFS.” We have options such as specifying the file system type (e.g., NFS version 4) and the default options provided by EFS. We’ll copy these options and move the address option into the configuration, indicating the address for this remote file system.
Once all the options are set, we can reconfigure the file servers. Now, let’s move to our demo environment and deploy a container. We’ll use a basic “getting started” image and go into the configuration. The setup part we need is under “Integrations.” From the dashboard, navigate to “Config” -> “Integrations” -> “Shared File System.”
For the shared directory, which we named “demo,” we’ll grant writable access, allowing the container to write to that directory. We can mount this directory to any location in the container. The actual path on the underlying host isn’t something you’ll interact with directly. Instead, you can specify where these files will appear on the container. For the demo, let’s mount it to a random location like “/tmp.”
Now that the EFS is set up as a mount point, you can interact with it just like any other directory. We’ll grant writable access to this as well. To illustrate, we’ll deploy one more container, set it to read-only, and ensure it has what we need. We’ll go back to “Config,” then “Integrations,” and configure it without writable access.