Installing the CLI is very easy. On Unix-like systems there is a bash script that will do all the things for you, like downloading the desired version and put it on the right folder (/usr/local/bin).
On Windows system you can download it directly from our servers, and put it where you need in your filesystem.
UPDATE IT!
Keep in mind to use the latest available version: although the CLI is well tested and used, we often do little improvements on it.
To update it use the same procedure used for installing it
Linux
wget https://dora.promfacility.eu/dora.sh
chmod 755 dora.sh
sudo ./dora.sh 0.8.1 linux-x64 cli
MacOS
wget https://dora.promfacility.eu/dora.sh
chmod 755 dora.sh
./dora.sh 0.8.1 macos-x64 cli
Windows
Go and download the CLI exe:
https://dora.promfacility.eu/releases/0.8.1/cli/win-x64/dora.exe
After the installation of the CLI, you need to init it with your token and API server.
You need three things:
dora profile init {{name}} --api-server {{api-server}} --token {{token}}
Assuming the following variable values:
To init the CLI:
dora profile init mydora --api-server https://api.yourdora.com --token SuperSecretBase64Token
Once the CLI is installed and initialized, try it
Almost all the commands follows the same syntax:
dora {operation} {resource} [name] [options]
WINDOWS ONLY
On windows you must use ./dora.exe
Some examples:
Get
dora get wk
returns your workloads in your default workspacedora get c
returns your containers in your default workspacedora get vol
returns your volume in your default workspaceDescribe
dora describe wk myworkload.red
returns you workload object as JSONType dora -h
to see the complete list of commands
dora get gpu
kind zone node product_name minor_number temperature power memory booked allowed
-------------------------------------------------------------------------------------------------------------------------------------
gpu dc-rov-01 endor GeForce GTX 1080 Ti 0 32 C/96 C 8.36 W/250.00 W 102 MiB/11175 MiB false true
gpu dc-rov-01 endor GeForce GTX 1080 Ti 1 33 C/96 C 9.33 W/250.00 W 6 MiB/11178 MiB false true
gpu dc-rov-01 jakku GeForce GTX 1080 Ti 0 60 C/96 C 74.16 W/250.00 W 4471 MiB/11169 MiB true true
gpu dc-rov-01 jakku GeForce GTX 1080 Ti 1 43 C/96 C 10.12 W/250.00 W 2 MiB/11178 MiB false true
Save a file named, for example, workload.yaml, with this content:
---
apiVersion: v1
kind: Workload
metadata:
zone: dc-rov-01
name: blue.red
spec:
replica:
count: 1
driver: Docker
notify:
byEmail: false
selectors:
gpu:
product_name: All
count: 1
image:
image: ubuntu
pullPolicy: IfNotPresent
config:
cmd: /bin/bash
volumes:
- name: home
target: /home
Apply it:
dora apply -f workload.yaml
The system will create your resource
Monitor it
dora get wk
kind zone workspace name desired image gpu replica eta
------------------------------------------------------------------------------------
workload dc-rov-01 amedeo.setti blue.red run ubuntu 1 1/1 1m
Get the related container
dora get c
kind zone workspace name desired image node status eta reason
--------------------------------------------------------------------------------------------
container dc-rov-01 amedeo.setti blue.red.1 run ubuntu endor running 10s null
If you have the original YAML file used to create the resource,
you can delete the objects created with that file simply with the delete
command.
You can also delete it directly specifying the resource kind and the name:
dora delete {kind} {name}
dora delete -f myfile.yaml
dora delete wk blue.red
Sooner or later you will have to transfer file to and from the cluster.
Keep in mind
Dora support these operation only to files presents in named volumes, not directly inside a random location of a container.
You have four command to manage files:
ls
to explore a volume contentsync
to upload and watch changes on local file systemupload
to upload files from your filesystem to a Dora volumedownload
to download files from a Dora volume and your filesystemTUS
Sync and upload functions implements TUS, the resumable protocol to upload big quantity of data without worrying about network issues.
In all these examples, your volume is named home
,
and inside these volume there is a folder named test
dora ls home
dora ls home /test
dora sync /your/localpath home /test
dora upload /your/localpath home /newtest
dora download home /newtest /your/localpath/down
Almost every command accepts the -g option, that will select which workspace to use.
dora get wk -g my.workspace.2