Injecting file volumes in Virtual Labs - Appsembler

Injecting file volumes in Virtual Labs

File Volumes are used if you want to add a static file into a container, that gets updated infrequently, but enough that you do not want to build it directly into the container. The primary use case for this is to deliver one file to every container that’s started from this image. A great example of their use is injecting a license into all the containers that it is set up with, and renewing the license can be easily done through the admin settings in AVL.

Creating a File Volume

This must be done through the django admin of the AVL instance. Once on the admin page, select Add from the File Volumes setting, under the Wharf heading. Or use the direct link <avlsite>/admin/wharf/filevolume/add/  If you don't have access to this page, please contact your CSM.

This will bring up the Add File Volume dialogue:

The Description is displayed when you are adding the file to an image later, so make sure it is descriptive

The Name and Directory are what the file will be called and where it will be stored in the container, be sure to place it in the location where the software running in the container expects it to be.

The file picker is to upload the file from your computer, the existing name of the file will not be used.

Once you have entered all the data, click Save, and you will be taken to the file list

From here you can click back into a file and replace it with a new upload, or change the description. You cannot change the name or path. Note the file will be updated for new containers launched from the image, not already running ones.

Using a File Volume

File volumes are added to containers within the Image Settings, you may need to scroll down the dialog under Files to inject as File Volumes

Click Add File, and then select your file from the drop-down.

Lastly, click Update settings, and the next time any project is launched using an image with those settings, the file will be injected read-only into the image.