Read and Write to Files on Enclave #725
-
While working with files i noticed if we wanted to access the file on the enclave we need to have a mount for that in the service config and use it in further execution process where it is required . If same files need to accessed across the services in the enclave it will be little difficult as it need to be mounted then it will be ready for use . Instead if we can have some read and write to file which is stored on enclave which can be accessed just by using the file name or path to file name itself it will be easier ,can be accessed from any of the starlark file which will be running inside that enclave. Also when we are rendering some template and storing it to enclave is it possible to access those rendered template in similar way as mentioned above will be really helpful |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @shreyasbhat0 , thanks for the patience while we were at QCon! Re. files storage - files artifacts are the closest approximation we have to this; they're basically E.g. this is an enclave with a files artifact called Re. rendering templates - the output will also be stored as a files artifact, so this can be accessed just like normal! Re. mounting - unfortunately the mounting limitation comes from both Docker and Kubernetes, which both require mounting files to persist them. Now, a meta-point: as I understand, it sounds like using files artifacts is a bit confusing; they are indeed the "generic files storage" of Kurtosis, but I don't think it's necessarily obvious that that's what they are. We're actually working on some product improvements to make this a bit more understandable - I'll ping you with some prototypes, and stay tuned to the Release Notes! |
Beta Was this translation helpful? Give feedback.
Hey @shreyasbhat0 , thanks for the patience while we were at QCon!
Re. files storage - files artifacts are the closest approximation we have to this; they're basically
.tgz
files that get stored on the enclave itself. So if you create a files artifact in any way (e.g. plan.store_service_files, plan.upload_files, or plan.render_templates), those files will persist in the enclave for as long as the enclave exists. This means that those files can exist and be used anywhere from that point onwards.E.g. this is an enclave with a files artifact called
my-files-artifact
that can be used by all Starlark executing against that enclave (even if the Starlark isn't the same Starlark that created the…