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

tsunami

Toolkit for running short-lived jobs on EC2 spot instances

25 releases (6 breaking)

✓ Uses Rust 2018 edition

0.11.0-beta.3 Mar 16, 2020
0.10.0 Jan 28, 2020
0.9.0 Jul 23, 2019
0.7.2 Dec 4, 2018
0.5.10 Mar 30, 2018

#11 in Profiling

Download history 47/week @ 2019-12-02 694/week @ 2019-12-09 1/week @ 2019-12-16 21/week @ 2019-12-23 1/week @ 2019-12-30 1/week @ 2020-01-06 27/week @ 2020-01-13 45/week @ 2020-01-20 21/week @ 2020-01-27 3/week @ 2020-02-03 41/week @ 2020-02-10 50/week @ 2020-02-17 104/week @ 2020-02-24 29/week @ 2020-03-02 77/week @ 2020-03-09 139/week @ 2020-03-16

146 downloads per month

MIT/Apache

41KB
582 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

~22MB
~459K SLoC