Create an ALU Image with a Persistent Disk

Keep a user’s files between sessions by giving an ALU image a persistent disk. By default, a container session is disposable: everything the user creates disappears when the container stops.

An ALU container runs an application or a desktop directly in a Docker container on Linux, with no virtual machine. The other image types (IRON, STEEL, TITAN) add a KVM virtualization layer. A persistent disk needs three things, set up in this order on this page: a volume declared in the image template, a Kubernetes container provider, and the Persistent disk option enabled.


Access: verified_user Admin Area > view_in_ar Containers & Workstations > stacks Images.


How the Disk Works

Reemo creates one disk for each container, mounted in the container at the path you choose. The disk is created with the container and kept when the container stops, so the user finds their files again at the next session. Only the files stored under the mounted path are kept.

Important

Only a Kubernetes provider can persist a volume. On a Swarm provider, the volume of an ALU image is ignored and the session stays disposable.

Prerequisites

  • A container provider of type KUBERNETES (see Create a Direct Container Provider).

  • The name of a storage class available on this Kubernetes cluster: it is the storage class that provisions the disk. Ask the administrator of the cluster if you do not know it.

  • The reference of the image in a registry.

Create the Image

  1. Open stacks Images, then click New Image.

  2. Fill in the form fields.

  3. Click Create. You can enable the image when the confirmation window offers it, or later (see Assign the Image to a Provider).

Form Fields

  • Name: name of the image.

  • Type: ALU. This field is displayed only when workstations are enabled on your instance, otherwise the image is an ALU image.

  • Reference (registry image): address of the image in the registry (e.g. registry.reemo.io/reemosblightdesktop).

  • Persistent disk: whether the image uses a persistent disk (see below). This field is in the Storage settings section.

  • Icon (SVG): SVG code of the image icon. This field is required; the Preview button shows the result.

  • The image uses Push notifications: check it if the image sends Push notifications (e.g. Android notifications).

  • Comments: free note about the image.

  • Can be assigned to a container provider: checked by default; uncheck it to prevent the image from being assigned to a provider.

  • Official: flags the image as an official image.

The Persistent disk field has three values:

  • – Will be defined on Container Profile –: each container profile decides whether its containers get a disk.

  • Yes: every container created from the image gets a disk, and profiles cannot change it.

  • No: no container gets a disk, and profiles cannot change it.

Important

A new ALU image is created with Persistent disk set to No. Select – Will be defined on Container Profile – or Yes, otherwise container profiles cannot enable the disk.

Add the Volume to the Image Template

The volume is what tells Reemo where and how to create the disk. Without it, enabling Persistent disk has no effect: a warning under the field reminds you that a volume must be defined in the image template.

  1. Open the image, go to its Template tab, then click New Variable.

  2. Set Type to Volume and fill in the fields below.

  3. Save the variable.

Volume Fields

  • Value mode: keep Fixed in the container profile. With Requested at container launch, the volume is ignored.

  • Name: label of the field in the container profile (e.g. Persistent Disk).

  • Variable: technical identifier of the variable (e.g. REEMO_PERSISTENT_HOME).

  • Volume Name: name of the volume (e.g. home). The Kubernetes disk is named after the container and this name: <container name>-<volume name>.

  • Target: path where the disk is mounted in the container (e.g. /home/reemo/).

  • Storage Class Name: Kubernetes storage class that provisions the disk (e.g. csi-rbd).

  • Access Mode: Read Write Once.

  • Volume Mode: Filesystem.

  • Requested Size (GB): size of the disk, from 1 to 1000 (e.g. 10).

  • Requested Size Overhead: percentage added to the requested size. It is 0 by default on an ALU image (e.g. 8 makes a 10 GB disk 10.8 GB).

  • Editable (Interface section): lets organization administrators change the size in the Options step of a container profile. Requested Size (GB) is then the default size.

  • UI Priority, Hint, Placeholder, Default value and the condition fields: described in Configuration Variables.

Important

Storage Class Name, Access Mode and Requested Size (GB) must all be filled in, with a size above 0. If one is missing, Reemo does not create a disk: it looks for an existing volume with the Volume Name and the container cannot start if there is none.

Note

The size is applied when the disk is created. Changing it afterwards does not resize the disk of existing containers.

Assign the Image to a Provider

  1. Open the image, then its Providers tab, and assign it to your KUBERNETES provider (see Image Details).

  2. Click Enable to make the image available: an image is disabled by default.

Enable the Disk in a Container Profile

Unless the image forces Persistent disk to Yes or No, each container profile chooses.

  1. Create or edit a container profile based on this image and on a Kubernetes provider (see container profile).

  2. In the Settings step, go to Storage settings and check Persistent disk.

  3. Save the profile.

The Storage settings section is displayed only when the provider is a Kubernetes provider and the image has a volume. Otherwise, a tag explains that the image has no volume configured and that the disk cannot be persisted. When the image already forces the value, the checkbox is disabled and a tag tells you so.

Check the Result

  1. Open a session on a container from the profile, create a file in the mounted path, then close the session.

  2. Open a new session on the same container: the file is still there.

The disk also appears in the volumes of the Kubernetes provider, under the name <container name>-<volume name>.

See also

Configuration Variables — All the variable types and options of an image template.