vmware / script-runtime-service-for-vsphere

The Repository contains Script Runtime Service for vSphere. A service for managing server-side PowerCLI instances to run commands and scripts against VCenter servers.
Other
35 stars 7 forks source link

[Feature Request] Introduce a mechanism to exchange files in both directions #52

Open lucdekens opened 3 years ago

lucdekens commented 3 years ago

The output of a script can not always be easily transferred via streams. It would be handy if the possibility to upload to and download files from the SRS is available.

dmilov commented 3 years ago

To clarify the requirements here:

  1. As a user I want to be able to download a file produced by a script from a runspace? The user should have in mind the runspace is ephemeral and is limited in resources. Probably this won't work for large files (e.g. ova).
  2. What's the purpose of the upload? To upload a file to a runspace and use it as an input for a script?
lucdekens commented 3 years ago

The suggestion is to have the ability to upload and download files.

For the upload, the intention could be to use a generic script, but then with specific settings.

A typical example could be cost charging calculations based on a project or department. This is mostly a long-running script, and thus ideal for SRS.

For the download, I'm mostly thinking of downloading data that is not fit to be transferred via a PS stream. This could be for example XLSX files (possible with the ImportExcel module) or graphics files.

Instead of uploading/downloading the files to the SRS runspace, can't this be implemented via permanent storage volumes mounted to the container? That would/could perhaps also bypass the storage considerations you rightfully raised?

dmilov commented 3 years ago

Makes sense, we already store script outputs on persistent storage but don't mount it on the runspaces. Mounting persistent storage to the runspaces will enable other use-cases as well.