Skip to content

Run Rover on Alpine images #537

@EverlastingBugstopper

Description

@EverlastingBugstopper

It has become quite clear that there is high demand for running Rover on Alpine in production images due to Alpine's lightweight nature. Unfortunately with the introduction of rover supergraph compose, we stopped building fully static binaries for Linux since, well, rusty_v8 does not have prebuilt binaries for x86_64-unknown-linux-musl.

We want you to be able to use Rover in your Alpine images, but the constraints have forced our hand to a less-than-perfect solution. We've decided on first steps, but discussion is open on future steps!

First steps

Our first step will be to build binaries for x86_64-unknown-linux-musl that do not include rover supergraph compose.

This includes the following work:

  • Create a cargo feature for rover supergraph compose.
    If the feature is not enabled, running rover supergraph compose should error with:
    $ rover supergraph compose --config ./supergraph.yml
    error: You cannot run `rover supergraph compose` with this binary.
            You will need to install Rover on a machine that includes `glibc >= vX.X`
  • Add a step to our release GitHub action to build for x86_64-unknown-linux-musl with that feature disabled
  • Update the curl installer to install the musl build if glibc does not exist
  • Update the npm installer to install the musl build if glibc does not exist

Possible future steps

  • Bundle the JavaScript file that does composition with the musl build, and shell out to node directly to run composition
  • Create a cloud function that executes composition and use that with the musl build
  • Wait for rusty_v8 to build binaries for musl
  • Write a composition function in pure Rust

A PR for first steps will come shortly, but it won't close this issue until we decide on possible future steps. If and when that future is decided, we will create a new issue and close this one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature 🎉new commands, flags, functionality, and improved error messagesneeds decision 🤝

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions