#aws #distributed #benchmark #ec2 #spot-instances

tsunami

Toolkit for running short-lived jobs on EC2 spot instances

19 releases

0.7.2 Dec 4, 2018
0.7.1 Sep 10, 2018
0.7.0 Aug 19, 2018
0.6.0 Jul 13, 2018
0.5.1 Feb 24, 2018

#17 in Profiling

Download history 4/week @ 2019-01-21 2/week @ 2019-01-28 3/week @ 2019-02-04 2/week @ 2019-02-11 4/week @ 2019-02-18 3/week @ 2019-02-25 39/week @ 2019-03-04 1/week @ 2019-03-11 2/week @ 2019-03-18 111/week @ 2019-03-25 20/week @ 2019-04-01 5/week @ 2019-04-08 7/week @ 2019-04-15 21/week @ 2019-04-22 2/week @ 2019-04-29

279 downloads per month

MIT/Apache

41KB
598 lines

tsunami

Crates.io Documentation Build Status

tsunami provides an interface for running short-lived jobs and experiments on EC2 spot block instances. Most interaction with this library happens through TsunamiBuilder.

Examples

let mut b = TsunamiBuilder::default();
b.use_term_logger();
b.add_set(
    "server",
    1,
    MachineSetup::new("m5.large", "ami-e18aa89b", |ssh| {
        ssh.cmd("yum install nginx").map(|out| {
            println!("{}", out);
        })
    }),
);
b.add_set(
    "client",
    3,
    MachineSetup::new("m5.large", "ami-e18aa89b", |ssh| {
        ssh.cmd("yum install wget").map(|out| {
            println!("{}", out);
        })
    }),
);

b.run(|vms: HashMap<String, Vec<Machine>>| {
    println!("==> {}", vms["server"][0].private_ip);
    for c in &vms["client"] {
        println!(" -> {}", c.private_ip);
    }
    // ...
    Ok(())
}).unwrap();

Live-coding

The crate is under development as part of a live-coding stream series intended for users who are already somewhat familiar with Rust, and who want to see something larger and more involved be built. You can find the recordings of past sessions on YouTube.

Dependencies

~18MB
~347K SLoC