PVC Volume Mounting
The XNAT container service now allows you to run containers within an XNAT system that is run inside a Kubernetes cluster where the archive and build directories are mounted inside Persistent Volume Claims. In this page, we will outline the necessary setup you will need to perform in order to run these jobs within your XNAT of this type.
Setting Up Your XNAT to Run Container Jobs With Data PVC Mounting
While most of the functionality regarding running jobs in this setup should be intuitive and adhere to the methodology found in the base Container Service documentation, there are a couple of fields that need to be set in order to ensure that jobs run as anticipated. We will outline those here.
Setting the Kubernetes Mode
First, you must ensure that the compute backend (set within Administer -> Plugin Settings -> Compute Backend Configuration) is set to Kubernetes mode. Then, within that same settings page, you will also need to provide the system with information about how data is stored on your XNAT. In the bottom of that pop-up window, you will see this field:
In order to inform your Container Service of where data is stored for your XNAT, you will need to choose from the options in this dropdown:
No PVC Mount - sets archive and build directories as not in PVC Mounts
Separate Archive and Build - Archive and Build are hosted in two, separate PVC Mounts
Combined Archive and Build - Archive and build are stored in one, combined PVC Mount
Setting the PVC Mount Fields
If you select one of the two options above that notes the usage of PVC mounts, you will be provided with a new set of fields. In the case of option (2) above, you will see:
To ensure the correct running of your container jobs, you will need to enter the names of the PVCs in which you have mounted the archive and build directories in the ‘Archive Directory PVC Name’ and ‘Build Directory PVC Name’ fields respectively.
Additionally, you will need to fill in the Path Translation fields with information about the location of data within the PVCs. This is very similar to performing path translations for XNATs hosted without PVCs and you must simply input the paths within the PVCs where data will be located. So if data within your archive is located at ‘/xnat/data/archive/{data-folder}’
the path translation should be ‘/xnat/data/archive/’
.
These will default to being the Archive and Build Path fields found within Administer -> Site Administration -> File System.
These two sets of fields will also be present in the combined setup as shown below in the case that you selected option (3) in the above dropdown menu:
The Combined PVC Name and Combined PVC Path Translation fields will function in much the same way as the fields above with the only difference being you will need to enter one name and one Path Translation due to the fact that a single Persistent Volume Claim is hosting both subsets of your data.