Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3256c86
feat: run sessions in AWS Lambda microVMs (host, agent and protocol)
fctl-sh[bot] Dec 1, 2026
09dd04b
feat(control): keep runners' microVM settings and their hosts' reports
fctl-sh[bot] Dec 1, 2026
0a9d016
feat(cli): show and set runners' microVMs; a Lambda stand-in for carg…
fctl-sh[bot] Dec 1, 2026
5ccc10d
fix(host): say microVMs' news within seconds; the stand-in suspends a…
fctl-sh[bot] Dec 1, 2026
a222b9e
feat(web): show runners' microVMs on the Runners tab, and sessions wh…
fctl-sh[bot] Dec 1, 2026
67fda5e
fix: say what a session whose microVM went carries on with
fctl-sh[bot] Dec 1, 2026
e34519f
feat(web): a wide sheet for a runner's microVMs, and facts that wrap …
fctl-sh[bot] Dec 1, 2026
2ae3765
docs: sessions in AWS Lambda microVMs
fctl-sh[bot] Dec 1, 2026
f723c9b
test(control): keep the microVM API's tests to wasm, as the others
fctl-sh[bot] Dec 1, 2026
8f83106
fix(agent): Firecracker VMs power off when their host asks again
fctl-sh[bot] Dec 1, 2026
51f38b4
fix(host): let microVMs go only as their sessions do, until AWS says …
fctl-sh[bot] Dec 1, 2026
9885423
fix(control): a runner's host keeps its microVM settings when D1 does…
fctl-sh[bot] Dec 1, 2026
6827159
fix(web): type egress connectors a line each
fctl-sh[bot] Dec 1, 2026
5b43595
fix(host): keep only runs Lambda may have carried out, and count them
fctl-sh[bot] Dec 1, 2026
0df5dd3
fix(host): a run counts as done where any try may have done it
fctl-sh[bot] Dec 1, 2026
e7f5524
Run the checks again
fctl-sh[bot] Dec 1, 2026
1013df0
fix(host): a throttled replay asks again rather than forget
fctl-sh[bot] Dec 1, 2026
4fb5595
docs(host): give kind its doc comment back
fctl-sh[bot] Dec 1, 2026
18eaca9
Run the checks again
fctl-sh[bot] Dec 1, 2026
349ab31
fix(host): make room only with a session that lets its microVM go, ea…
fctl-sh[bot] Dec 1, 2026
7bc2f18
fix(web): a runner's microVM settings compare by what they say
fctl-sh[bot] Dec 1, 2026
f74068c
fix(host): an ask to make room holds for one suspension of a running …
fctl-sh[bot] Dec 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/fctl-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ flate2.workspace = true
hex.workspace = true
libc.workspace = true
nix = { workspace = true, features = ["hostname", "mount", "net", "reboot", "resource", "socket", "time"] }
sha1.workspace = true
sha2.workspace = true
tar.workspace = true
tokio-tun = "0.15.2"
Expand Down
40 changes: 40 additions & 0 deletions crates/fctl-agent/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
//! - `fctl-agent attach` connects stdin/stdout to it (the host's channel).
//! - As PID 1 it is a Firecracker microVM's init, and `vm-serve` runs what
//! the host asks there (src/vm).
//! - `fctl-agent microvm-serve` is an AWS Lambda microVM's program, from its
//! image: it answers Lambda's lifecycle hooks and runs what the host asks
//! over WebSockets through the microVM's endpoint (src/microvm).
//! - `fctl-agent run-as` runs a program as another user, for `vm-serve` and
//! for a supervisor that runs as root.
//! - `fctl-agent share`, on a Firecracker host, serves a project's package
Expand Down Expand Up @@ -32,6 +35,8 @@ mod local;
#[cfg(target_os = "linux")]
mod metadata;
#[cfg(target_os = "linux")]
mod microvm;
#[cfg(target_os = "linux")]
mod net_filter;
#[cfg(target_os = "linux")]
mod netlink;
Expand Down Expand Up @@ -106,6 +111,20 @@ enum Command {
#[cfg(target_os = "linux")]
#[command(hide = true)]
VmServe,
/// Answer an AWS Lambda microVM's lifecycle hooks and run what the host
/// asks there, from the image's CMD.
#[cfg(target_os = "linux")]
MicrovmServe {
/// Where the host's WebSockets come, through the microVM's endpoint.
#[arg(long, default_value = "0.0.0.0:8080")]
listen: std::net::SocketAddr,
/// Where Lambda calls the lifecycle hooks.
#[arg(long, default_value = "0.0.0.0:9000")]
hooks: std::net::SocketAddr,
/// The user the image's sessions run as.
#[arg(long, env = "FCTL_SANDBOX_USER", default_value = "agent")]
user: String,
},
/// Serve a directory to a Firecracker VM over 9P, on the unix socket
/// where Firecracker connects the VM's vsock port (on the host).
#[cfg(target_os = "linux")]
Expand Down Expand Up @@ -229,6 +248,27 @@ fn main() -> anyhow::Result<()> {
runtime()?.block_on(vm::serve())
}
#[cfg(target_os = "linux")]
Command::MicrovmServe {
listen,
hooks,
user,
} => {
// To the microVM's output, which Lambda keeps in CloudWatch Logs.
tracing_subscriber::fmt()
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_env("FCTL_LOG")
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
)
.with_ansi(false)
.with_writer(std::io::stderr)
.init();
runtime()?.block_on(microvm::serve(microvm::Options {
listen,
hooks,
user,
}))
}
#[cfg(target_os = "linux")]
Command::Share { dir, socket } => {
init_logging(None)?;
share::serve(&dir, &socket)
Expand Down
Loading
Loading