Available in Morpheus 2.11.3+
Archives provides a way to store your files and make them available for download by your Scripts and Users. Archives are organized by buckets. Each bucket has a unique name that is used to identify it in URLs and Scripts.
Archive buckets are assigned a Storage Provider (Object Store). This is where the bucket will write its files. A Storage Provider can be configured to use the local appliance file system (Local), an Amazon S3 bucket, etc.
Every archive bucket generates and uses a random File Path to store its files under. This ensures two different archive buckets will not contend for the same backend storage location.
Visibility determines whether your files are secure or not.
- Private - This secures your files. Only authorized users of the Owner and Tenants account may view the bucket and download its files. This is the default.
- Public - This makes your files available to the public. Anyone, including anonymous users/scripts can download these files without any authentication.
WARNING: Be careful not to store sensitive files in a Public archive.
Users of the Owner account may fully manage the files in a bucket. Users of the Tenant account(s) will have read-only access. The may browse and download files in the bucket.
Both Owner and Tenants must have the Services: Archives permission to access a Private bucket. Read level access allows browsing and downloading files in the bucket. Full access allows full management of the bucket and its files. This includes modifying files and links, bucket settings and deleting it.
You can create a Link to download a Private file without any authentication. Links may be configured to expire after a period of time.
Morpheus automatically generates syntax for creating a link to a file in your Scripts. When the Script is generated, it will create a temporary link to download the file and return the URL of that link. This link is made available to the public. It is accessible to any user or script that can reach the appliance. Downloading the file only requires knowing the URL, which includes a secret token parameter. You can specify the number of seconds before the link expires. The default value is 1200 (20 minutes).
file_url="<%= archives.link('Morpheus Installers', 'morpheus-appliance-2.11.2-2.el7.x86_64.rpm', 1200) %>" wget $file_url -O "./morpheus-appliance-2.11.2-2.el7.x86_64.rpm"
$file_url = "<%= archives.link('Morpheus Installers', 'morpheus-appliance-2.11.2-2.el7.x86_64.rpm', 1200) %>" $output = "morpheus-appliance-2.11.2-2.el7.x86_64.rpm" $start_time = Get-Date Invoke-WebRequest -Uri $file_url -OutFile $output Write-Output "Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s)"