Skip to main content

create_storage

Create an external storage.
VESSL External Storage acts as a bridge to external storage services (e.g., S3, GCS, etc.). Make sure to configure the external storage settings before proceeding.If you do not want to use external storage, you can use the default VESSL storage, vessl-storage.
Args
  • name (str) : The name of the storage to create.
  • storage_type (StorageType) : The type of storage to create. Options: StorageType.S3, StorageType.GCS, StorageType.NFS, StorageType.HOST_PATH
  • path (str) : The path of the storage.
    • For s3 : Path must in {bucket_name}/{path} (e.g. my-bucket)
    • For gcs : Path must in {bucket_name}/{path} (e.g. my-bucket)
    • For nfs : Path must be in {server}:{path} format (e.g. 192.168.1.100:/shared/data)
    • For host-path : Path must be an absolute local path (e.g. /data/host-folder)
  • credential_name (str) : The name of the credential to use. Required if storage_type is S3 or GCS
  • cluster_name (str) : The name of the cluster to use. Required if storage_type is NFS or HOST_PATH
Examples
  • Create an S3 storage:
  • Create a GCS(Google Cloud Storage) storage:
  • Create an NFS storage:
  • Create an HOST PATH storage:

list_storages

List storages in the default organization. If you want to override the default organization, then pass organization_name as **kwargs. Example

delete_storage

Delete storage. Args
  • name (str) : Name of the storage to delete.
Example

create_volume

Create a volume in storage. Args
  • name (str) : Name of the volume.
  • storage_name (str) : Name of the storage.
  • tags (tuple[str, …]) : Tags of the volume.
Example

list_volumes

List volumes in storage. Args
  • storage_name (str) : Name of the storage.
  • keyword (str) : Optional search keyword.
Example

delete_volume

Delete volume in storage. Args
  • name (str) : Name of the volume.
  • storage_name (str) : Name of the storage.
Example

list_volume_files

List all files in a volume. Args
  • storage_name (str) : Name of the storage.
  • volume_name (str) : Name of the volume.
  • path (Optional[str]) : Path of directory to list. Defaults to "".
Example

upload_volume_file

Upload a file to a volume. Args
  • source_path (str) : Path of local directory of file to upload.
  • dest_storage_name (str) : Name of the storage.
  • dest_volume_name (str) : Name of the volume.
  • dest_path (str) : Path of volume directory to upload the file to. Defaults to ”/”.
Example

download_volume_file

Download a file from a volume. Args
  • source_storage_name (str) : Name of the storage.
  • source_volume_name (str) : Name of the volume in the storage.
  • dest_path (str) : Path of local directory to download the file to.
Example

delete_volume_file

Delete a file from a volume. Args
  • storage_name (str) : Name of the storage.
  • volume_name (str) : Name of the volume in the storage.
  • path (str) : Path of directory or file in volume to delete.
  • recursive (Optional[bool]) : If true, delete all files in this directory. Defaults to False.
Example