Utilities for setting up and running experiments remotely.
This is kind of a "living repo". I will add to it utilities as I find them useful (or people submit PRs).
It is heavily inspired by spur.py but it also contains a bunch of utility routines that I have found useful.
spur.py
.```rust use spurs::{cmd, ssh::SshShell};
let host = "1.2.3.4:22"; let shell = SshShell::withdefaultkey(username, host)?;
const FOO: &str = "foo";
shell.run(cmd!("ps -e | grep {}", FOO).usebash())?; shell.run(cmd!("ls -a | grep user").cwd("/home/user/").usebash())?; shell.run(spurs::centos::yum_install(&["qemu-kvm"]))?; ```
Add the crate spurs
to your Cargo.toml
dependencies.
This crate uses Rust 2018, so it's unstable until December 2018, but at that time, I believe it should become usable on stable rust.