Divooka.Services.DigitalOcean
Divooka.Services.DigitalOcean.DigitalOceanHelper.ListAllDropletsResponse
A response for the "List all Droplets" API call.
Divooka.Services.DigitalOcean.DigitalOceanHelper.ConfigureSpace()
Parameters
| Name | Description | Default |
|---|---|---|
secret |
Divooka.Services.DigitalOcean.DigitalOceanHelper.QuickRunScript()
Quickly run some script in a newly created droplet, then delete that droplet.
Divooka.Services.DigitalOcean.DigitalOceanHelper.QuickRunContainer()
Quickly run some container in a newly created droplet, then delete that droplet.
Divooka.Services.DigitalOcean.DigitalOceanHelper.ExecuteScriptInDroplet()
Executes some script in existing droplet.
Parameters
| Name | Description | Default |
|---|---|---|
hostname |
||
bashScript |
Divooka.Services.DigitalOcean.DigitalOceanHelper.ListAllDroplets()
List all Droplets in your account.
Remarks
It's possible to request filtered results by including certain query parameters.
By default, only non-GPU Droplets are returned. To list only GPU Droplets, set the typeFilter query parameter to `gpus`.
Parameters
| Name | Description | Default |
|---|---|---|
pageItemCount |
Number of items returned per page. | |
pageIndex |
Which 'page' of paginated results to return. | |
tagNameFilter |
Used to filter Droplets by a specific tag. Can not be combined with nameFilter or typeFilter. | |
nameFilter |
Used to filter list response by Droplet name returning only exact matches. It is case-insensitive and can not be combined with tagNameFilter | |
typeFilter |
When type is set to `gpus`, only GPU Droplets will be returned. By default, only non-GPU Droplets are returned. Can not be combined with tagNameFilter. |
Divooka.Services.DigitalOcean.DigitalOceanHelper.CreateDroplet()
Remarks
Notice when ssh key is not given the root password is sent to account email; Otherwise it will require resetting root password in order reset password and access through console. There is no way to supply a default root password.
Parameters
| Name | Description | Default |
|---|---|---|
initialScript |
For cloud config, start first line with `#cloud-config` For bash script, start first line with `#!/bin/bash` See https://github.com/MatthewVance/do-deploy/blob/master/user-data.yaml Also see https://www.digitalocean.com/community/questions/curl-in-user_data Debug use `cat /var/log/cloud-init-output.log | grep userdata` inside the droplet |
Divooka.Services.DigitalOcean.DigitalOceanHelper.UploadFile()
Upload file to DigitalOcean Spaces or AWS S3 Storage.
Remarks
Uploading again to the same key seems to just override things.
Parameters
| Name | Description | Default |
|---|---|---|
filePath |
Local path to file. | |
destination |
The "Key" or final path of the file on the cloud. | |
spaceOptions |
Space configuration, including region and access key, etc. |
Divooka.Services.DigitalOcean.DigitalOceanHelper.UploadFile()
Upload Divooka serializable data to DigitalOcean Spaces or AWS S3 Storage.
Remarks
Uploading again to the same key seems to just override things.
Parameters
| Name | Description | Default |
|---|---|---|
data |
Data object to serialize. | |
destination |
The "Key" or final path of the file on the cloud. | |
spaceOptions |
Space configuration, including region and access key, etc. |
Divooka.Services.DigitalOcean.SpaceAPI
Space and bucket/object API. Notice this is a seperate piece from DigitalOcean API and is said to be S3 compatible.
Divooka.Services.DigitalOcean.SpaceAPI.SpacesOptions
Remarks
Those are all we need and encapsulates/is encapsulated with the origin/CDN url: e.g. https://publication.tor1.digitaloceanspaces.com
Divooka.Services.DigitalOcean.SpaceAPI.SpacesOptions.ForcePathStyle
True if prefer path-style URLs
Divooka.Services.DigitalOcean.SpaceAPI.SpacesClient.GetPresignedUrl()
Remarks
A presigned URL is a short-lived, signed link that lets someone perform one specific S3/Spaces operation (GET, PUT, etc.) without needing your credentials.
A browser or mobile app can:
Upload directly to your Space with a PUT (or a browser-friendly HTML POST policy) – your web-server never sees the file.
Download privately-stored files with a GET link that expires after, say, 10 minutes.
Avoid exposing your secret key in client code and save bandwidth on your servers.
Parameters
| Name | Description | Default |
|---|---|---|
verb |
HttpVerb.GET gives a download link | |
key |
E.g. "uploads/raw/report.pdf" |
Divooka.Services.DigitalOcean.SpaceCLI
Offers a CLI usage for Space API
Divooka.Services.DigitalOcean.SpaceCLI.ExtensionMimeMapping
MIME map
Divooka.Services.DigitalOcean.SpaceCLI.GetOpt()
Option helper
TheMatrix.Core.Plugin.DivookaServiceDigitalOceanPluginDefinition
This is used when the module is loaded as a plugin, as oopposed to serving as a foundational dependency by many other packages.
Remarks
This serves as a temporary use - in the future we may use Divooka.TheMatrix as official package endpoint instead.