Compute Starter Kits reorganization

Fastly maintains a large number of starter kits for the Fastly Compute platform, which give customers quick access to building services that provide a variety of features. At last count the number of starter kits had grown to over 40, all in separate repositories on GitHub.

The maintenance cost of having this many repositories became a significant concern, as updating and improving them was difficult to automate. Some visible results included complaints (and support tickets) from customers because a particular starter kit was still referencing an old version of the Compute SDK it used (in some cases a version more than two years old), or a particular starter kit would no longer compile using the most recent versions of the toolchain (this occurred quite often with Rust-based starter kits).

To address these concerns and provide the Developer Experience team with a more sustainable approach to publishing and supporting starter kits, we’ve migrated all of them into a new ‘monorepo’ called compute-starter-kits, and we’ll be archiving all of the previous starter kit repositories. We’ve also built automation workflows to help us keep the starter kits up to date, and since they are in a single repository it will be much easier to accept contributions of new starter kits too!

Along the way we made another significant change: the Fastly CLI (specifically the fastly compute init command) previously had a compiled-in list which was a subset of the entire list of starter kits, and when a customer selected one of those options to start a new Compute service project the CLI would obtain the starter kit contents directly from GitHub. Occasionally this would result in failures because GitHub was unavailable or experiencing some type of outage, and this frustrated customers who just wanted to launch a new Compute service project. As of Fastly CLI version 16.0.0, the list of available starter kits and their contents are now served by a Fastly-operated service running in the Fastly Compute platform, available at every edge of the Fastly network.

To see what this looks like, running fastly compute init and selecting Rust results in this list of starter kits:

Starter kit:
[1] Default starter for Rust
    Starter kit that demonstrates routing, simple synthetic responses and overriding caching rules.
    https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/rust/default
[2] Advanced Caching in Rust
    Rust Starter Kit for Fastly Compute with advanced caching features
    https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/rust/advanced-caching
[3] OAuth 2.0 in Rust
    Connect to an identity provider such as Google using OAuth 2.0 and validate authentication status at the Edge, to
    authorize access to your edge or origin hosted applications.
    https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/rust/auth
[4] Beacon termination in Rust
    Capture beacon data from the browser, divert beacon request payloads to a log endpoint, and avoid putting load on
    your own infrastructure.
    https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/rust/beacon-termination
[5] Connect to Google Bigquery in Rust
    Fastly Compute starter kit for Google Bigquery Connector.
    https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/rust/connect-google-bigquery
[6] Empty starter for Rust
    Starter kit that provides an empty service.
    https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/rust/empty
[7] Realtime starter for Rust
    Implements realtime handlers for SSE, WebSockets, etc., powered by Fanout
    https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/rust/fanout
[8] Fanout forwarding in Rust
    Enables Fanout on a service, forwarding to a backend.
    https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/rust/fanout-forward
[9] KV Store in Rust
    A Rust starter kit that uses Fastly's KV Store.
    https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/rust/kv-store
[10] Static content in Rust
    Apply performance, security and usability upgrades to static bucket services such as Google Cloud Storage or AWS S3.
    https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/rust/static-content
[11] WebSockets passthrough in Rust
    Implements WebSocket passthrough.
    https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/rust/websockets

1 Like