-
Notifications
You must be signed in to change notification settings - Fork 0
Commands
This page contains information about all commands in plcli.
Usage: plcli [global_flags] command [command_flags] arguments..
-
--slice SLICE_NAME: name of slice to use when connecting to PlanetLab -
--workers WORKER_COUNT: number of workers (goroutines) to use -
--sudo: if set, all commands will be run as sudo on nodes
Global flags are used as follows: plcli --slice customSlice --workers 3 --sudo execute "ls /" all
init creates a file ~/.plcli that contains four entries that are used by plcli:
Usage: plcli init
- Your PlanetLab username
- Your PlanetLab password
- Your default slice to use when connecting (can always be overridden with global flag
--slice) - What SSH key to use
How a ~/.plcli file might look:
[auth]
pl_username = axelni@student.chalmers.se
pl_password = correcthorsebatterystaple
pl_slice = chalmersple_2018_10_29
ssh_key_abs_path = ~/.ssh/id_rsaconnect is used to establish a SSH connection to a node attached to your slice.
Usage: plcli connect NODE
plcli connect cse-yellow.cse.chalmers.se
execute helps you execute commands on one, several or all nodes attached to your default slice. If you wish to execute on multiple hosts, then make sure to supply the hostnames as a comma-separated string. Make sure to enclose the command you wish to execute with quotes.
Usage: plcli execute COMMAND all|HOSTNAME|HOSTNAME1,HOSTNAME2...
plcli execute "ls /" cse-yellow.cse.chalmers.se
plcli execute "ls /" cse-yellow.cse.chalmers.se,cse-white.cse.chalmers.se
plcli execute "ls /" all
transfer helps you transfer files/folders to a given node.
Usage: plcli transfer NODE LOCAL_PATH_TO_FILE_FOLDER TARGET_PATH
plcli transfer cse-yellow.cse.chalmers.se ./foo \~/bar
slice-details list a bunch of information of your slice.
Usage: plcli slice-details
plcli slice-details
$ plcli slice-details
2019/10/16 13:44:05 Slice details
Creator: 1952
Instantiation: plc-instantiated
SliceAttributeIDS: []
Name: chalmersple_2018_10_29
SliceID: 1578
Created: 1540838211
URL: https://chalmers.se
MaxNodes: 100
PersonIDs: [67982 65557 68247]
Expires: 1573497411
SiteID: 115
PeerSliceID: 0
NodeIDs: [7 22 36 76 91 166 220 288 2603 2607 2644 2667 14784 16111]
PeerID: 0
Description: This slice is currently being used for testing the implementation of a BFT SMR protocol based on Failure Detectors, as part of a M.Sc. thesis during 2019.
list-nodes lists nodes attached to your default slice (surprise!)
Usage: plcli list-nodes
plcli list-nodes
$ plcli list-nodes
2019/10/16 13:45:48 IDs of nodes attached to slice chalmersple_2018_10_29: [7 22 36 76 91 166 220 288 2603 2607 2644 2667 14784 16111]
health-check performs a health check on all nodes attached to your slice through the bundled health check script. It essentially checks for internet access and opens a port and makes sure that it is possible to connect to the node on that port.
Usage: plcli health-check [--remove-faulty]
-
--remove-faulty: if set, all unhealthy nodes are removed from slice
$ plcli health-check
...
2019/10/16 13:47:26 Found 14 healthy and 0 faulty nodes!
### Healthy nodes ###
planetlab-1.ida.liu.se [91]
cse-yellow.cse.chalmers.se [2667]
pl1.prakinf.tu-ilmenau.de [7]
kulcha.mimuw.edu.pl [2644]
planetlab1.informatik.uni-goettingen.de [220]
planetlab-2.ing.unimo.it [22]
icnalplabs1.epfl.ch [16111]
planetlab2.xeno.cl.cam.ac.uk [166]
ple43.planet-lab.eu [2607]
ple41.planet-lab.eu [2603]
planetlab1.u-strasbg.fr [76]
planetlab1.upm.ro [36]
planetlab2.upm.ro [288]
mars.planetlab.haw-hamburg.de [14784]
### Faulty nodes ###
No nodes to print!
discover-healthy attaches all nodes on PlanetLab to your slice, waits for 20 minutes to make sure that all nodes know that they are attached to your slice and then performs a health check on all these nodes The results are written to a file nodes.txt in the same directory.
Usage: plcli discover-healthy [--attach-to-slice]
-
--attach-to-slice: if set, all healthy nodes are attached to slice
plcli discover-healthy --attach-to-slice
deploy is used to deploy an application residing in a public git repository to a given amount of nodes.
Usage: plcli deploy [flags] GIT_URL
-
--node-count NODE_COUNT: the amount of nodes to deploy application to -
--skip-healthcheck: if set, no health check is carried out on nodes before deployment -
--scale COUNT: number of app instances to launch on each node -
--git-branch BRANCH: what git branch to deploy -
--app-path PATH: where the app should be stored on a node during deployment -
--prometheus-sd-path PATH: if set, plcli will generate sd.json for prometheus and write to supplied path -
--node-exporter: if set, node-exporter will be installed and launched on port 2100 on each node -
--shuffle-nodes: if set, nodes will be shuffled prior to deployment -
--skip-write-hosts-file: if set, no file called hosts_deployment.txt will be written to current directory -
--blacklist HOSTS: comma-separated string of hostnames (HOSTNAME1,HOSTNAME2...) to blacklist (not use) in the deployment -
--env ENV_VARS: string of env vars (VAR1=VAL1,VAR2=VAL2,...) to use in deployment
plcli deploy --node-count 6 https://github.com/axelniklasson/self-stabilizing-uniform-reliable-broadcast.git
plcli deploy --node-count 6 --skip-healthcheck --scale 1 --git-branch master --app-path /app --prometheus-sd-path ./prom/sd.json --node-exporter --shuffle-nodes --skip-write-hosts-file --blacklist cse-yellow.cse.chalmers.se,cse-white.cse.chalmers.se --env APP_ENV=planetlab https://github.com/axelniklasson/self-stabilizing-uniform-reliable-broadcast.git
provision is used to provision nodes, which essentially means to transfer a script and run it on all nodes. This script should ideally contain code for installing software needed to run your applications etc.
Usage: plcli provision PATH_TO_SCRIPT all|HOSTNAME|HOSTNAME1,HOSTNAME2...
plcli provision ./provision.sh cse-yellow.cse.chalmers.se
plcli provision ./provision.sh cse-yellow.cse.chalmers.se,cse-white.cse.chalmers.se
plcli provision ./provision.sh all
cleanup is used to kill all processes started by your user and wipe your home directory on the given nodes, so use it with care.
Usage: plcli cleanup all|HOSTNAME|HOSTNAME1,HOSTNAME2...
plcli cleanup cse-yellow.cse.chalmers.se
plcli cleanup cse-yellow.cse.chalmers.se,cse-white.cse.chalmers.se
plcli execute cleanup all