Attach a Volume to Multiple Edge Apps

Introduction

In some situations, you might want multiple edge applications to share data (volume instances) between them. For example, if multiple edge apps need to access the same data, attaching a common volume ensures that they can all read from and write to a single, consistent source of truth. This can be important when you have applications that need to work with shared datasets, such as sensor data, logs, or configuration files.

Prerequisites

Create a content tree volume instance

  1. After logging in to the ZEDEDA GUI, hover over Library from the left navigation.
  2. Select Volume Instances.
  3. Create a Content Tree Type of volume instance on an edge node. 
  4. Use an Image that will have a regular filesystem, such as a container.
  5. Avoid using an image that results in a single file on EVE-OS host (such as qcow2 or raw, which are not supported).

Create a block storage volume instance

  1. After logging in to the ZEDEDA GUI, hover over Library from the left navigation.
  2. Select Volume Instances.
  3. Create a Block Storage Type of volume instance on the same edge node where you created the content tree.
  4. Select one of the following Access Mode permissions:
    • Read: Any application that mounts this volume can read from it, but can't make any changes or write data to it.
    • Read, Write: Any application that mounts this volume can read from and write to the volume.
    • Multi Read, Single Write: Handled the same as Read, Write. Any application that mounts this volume can read from and write to the volume.
  5. Set a Label and take a note of it for later use when creating an edge app. 
  6. Set the Max Storage Size to a value larger than the container. 
  7. Connect the block storage to the Content Tree by selecting the name of the previously created content tree from the dropdown menu. 

Create an edge app

  1. Create an edge app container or virtual machine for your workload.
  2. Add an additional drive.
  3. In the Tag field, enter the label you created for block storage.

    The first volume is the app's main volume. In this scenario, you are creating an implicit volume that comes from the specified image, so no tag is necessary.
    For the second volume, you use the explicit tag created previously, so it needs to be referenced by the tag.

  4. Specify the Mount Path where you want the volume's filesystem to be mounted. 
    • You won't be able to see the volume's rootfs in /persist on EVE-OS unless you attach it to at least one edge app.
  5. Repeat these steps for other edge apps that you want to connect to the volume.

Deploy the edge app instances

  1. Deploy all the edge app instances you created on the node where you created the volume.
  2. After they’re deployed, all apps will mount that volume and can read and write files there, since those are shared via plan 9.
  3. If using a virtual machine, you'll need to mount the volume manually using your preferred method.

Next steps

See Lifecycle Operations on Edge Application Instances.

Was this article helpful?
3 out of 3 found this helpful