rover icon indicating copy to clipboard operation
rover copied to clipboard

linux arm64 dist

Open danilobuerger opened this issue 3 years ago • 13 comments

Description

Currently its not possible to build arm64 alpine docker images with rover as a npm dependency as this will fail with:

[4/4] Building fresh packages...
error /srv/node_modules/@apollo/rover: Command failed.
Exit code: 1
Command: node ./install.js
Arguments: 
Directory: /srv/node_modules/@apollo/rover
Output:
Platform with type "Linux" and architecture "arm64" is not supported by rover.
Your system must be one of the following:

TYPE        ARCHITECTURE  RUST_TARGET               BINARY_NAME
----------  ------------  ------------------------  -----------
Windows_NT  x64           x86_64-pc-windows-msvc    rover.exe  
Linux       x64           x86_64-unknown-linux-gnu  rover      
Darwin      x64           x86_64-apple-darwin       rover      
Darwin      arm64         x86_64-apple-darwin       rover
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

danilobuerger avatar May 27 '21 22:05 danilobuerger

We are not likely to add pre-built binaries for ARM Linux in the near term, though folks who need Rover to run on ARM can build from source on their machine by installing rustup and running cargo install --git https://github.com/apollographql/rover --rev v1.0.5.

Cargo should take care of figuring out the proper toolchain to build Rover with, but there are multiple ARM targets supported by rustc, which you can see by running rustup target list.

EverlastingBugstopper avatar May 28 '21 17:05 EverlastingBugstopper

For anyone looking for a workaround this is what we ended up doing:

  • Switch to non alpine image (node:16)

Dockerfile

FROM node:16 
SHELL ["/bin/bash", "-c"]
COPY  ./install-rover.sh .
RUN bash ./install-rover.sh

... rest of your stuff ...

install-rover.sh

#!/bin/bash

ARCHITECTURE=$(arch)

install_from_source () {
    echo "Installing rover from source"
    curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly -y
    source $HOME/.cargo/env
    cargo install --git https://github.com/apollographql/rover.git rover
}

if [ "$ARCHITECTURE" = "aarch64" ] 
then
    install_from_source
else
  npm install -g @apollo/rover
fi

a7ul avatar Aug 10 '21 22:08 a7ul

If you'd like a slightly more reliable build from source, you should clone the repo, run cargo xtask dist --version v0.1.10 && ./target/release/rover install - this will build and install a specific version of rover using the same build process we use in CI in addition to downloading the schema that was in production at the time of publishing that version. Using this method ensures that any breaking changes made to Apollo's GraphQL API don't break Rover's codegen step. Eventually we hope to make the schema a static part of the build itself but due to limitations in our backend this is the best path for a stable build from source.

EverlastingBugstopper avatar Aug 11 '21 16:08 EverlastingBugstopper

cargo xtask dist --version v0.1.10 didn't work as expected for me.

image
Complete logs here
root@4d24f19e73e5:~/rover#  cargo xtask dist --version v0.1.10
    Updating crates.io index
       Fetch [========>                ]  36.37%, 302.20KiB/s                                                            Fetch [========>            F                                           F       F
    Updating git repository `https://github.com/EverlastingBugstopper/billboard.git`
  Downloaded pkg-config v0.3.19
  Downloaded try-lock v0.2.3
  Downloaded num_cpus v1.13.0
  Downloaded anyhow v1.0.42
  Downloaded getrandom v0.2.3
  Downloaded bitflags v1.2.1
  Downloaded base64 v0.13.0
  Downloaded mio v0.7.13
  Downloaded clap v2.33.3
  Downloaded cc v1.0.69
  Downloaded tracing-core v0.1.18
  Downloaded foreign-types-shared v0.1.1
  Downloaded crossbeam-utils v0.8.5
  Downloaded ipnet v2.3.1
  Downloaded hyper v0.14.10
  Downloaded structopt-derive v0.4.15
  Downloaded rand_chacha v0.3.1
  Downloaded lazy_static v1.4.0
  Downloaded itoa v0.4.7
  Downloaded version_check v0.9.3
  Downloaded pin-project-lite v0.2.7
  Downloaded indexmap v1.7.0
  Downloaded http v0.2.4
  Downloaded once_cell v1.8.0
  Downloaded unicode-bidi v0.3.5
  Downloaded bytes v1.0.1
  Downloaded cfg-if v1.0.0
  Downloaded h2 v0.3.3
  Downloaded futures-util v0.3.15
  Downloaded heck v0.3.3
  Downloaded fnv v1.0.7
  Downloaded same-file v1.0.6
  Downloaded proc-macro-error-attr v1.0.4
  Downloaded proc-macro-error v1.0.4
  Downloaded assert_fs v1.0.3
  Downloaded libc v0.2.98
  Downloaded matches v0.1.8
  Downloaded cargo-platform v0.1.1
  Downloaded hyper-tls v0.5.0
  Downloaded cargo_metadata v0.14.0
  Downloaded http-body v0.4.2
  Downloaded globwalk v0.8.1
  Downloaded socket2 v0.4.0
  Downloaded either v1.6.1
  Downloaded unicode-xid v0.2.2
  Downloaded mime v0.3.16
  Downloaded foreign-types v0.3.2
  Downloaded walkdir v2.3.2
  Downloaded httpdate v1.0.1
  Downloaded futures-task v0.3.15
  Downloaded camino v1.0.4
  Downloaded form_urlencoded v1.0.1
  Downloaded percent-encoding v2.1.0
  Downloaded quote v1.0.9
  Downloaded ppv-lite86 v0.2.10
  Downloaded rand_core v0.6.3
  Downloaded openssl-sys v0.9.65
  Downloaded openssl v0.10.35
  Downloaded unicode-normalization v0.1.19
  Downloaded rand v0.8.4
  Downloaded tempfile v3.2.0
  Downloaded serde_urlencoded v0.7.0
  Downloaded reqwest v0.11.4
  Downloaded ryu v1.0.5
  Downloaded native-tls v0.2.7
  Downloaded predicates-core v1.0.2
  Downloaded futures-sink v0.3.15
  Downloaded which v4.1.0
  Downloaded unicode-segmentation v1.8.0
  Downloaded itertools v0.10.1
  Downloaded serde_derive v1.0.126
  Downloaded structopt v0.3.22
  Downloaded futures-io v0.3.15
  Downloaded predicates-tree v1.0.2
  Downloaded thread_local v1.1.3
  Downloaded semver v1.0.3
  Downloaded predicates v2.0.0
  Downloaded slab v0.4.3
  Downloaded tokio-native-tls v0.3.0
  Downloaded syn v1.0.73
  Downloaded treeline v0.1.0
  Downloaded proc-macro2 v1.0.27
  Downloaded tinyvec v1.2.0
  Downloaded serde v1.0.126
  Downloaded unicode-width v0.1.8
  Downloaded autocfg v1.0.1
  Downloaded want v0.3.0
  Downloaded tinyvec_macros v0.1.0
  Downloaded url v2.2.2
  Downloaded encoding_rs v0.8.28
  Downloaded httparse v1.4.1
  Downloaded remove_dir_all v0.5.3
  Downloaded pin-utils v0.1.0
  Downloaded tower-service v0.3.1
  Downloaded log v0.4.14
  Downloaded openssl-probe v0.1.4
  Downloaded memchr v2.4.0
  Downloaded serde_json v1.0.64
  Downloaded regex v1.5.4
  Downloaded ignore v0.4.18
  Downloaded tokio-util v0.6.7
  Downloaded tokio v1.8.1
  Downloaded regex-syntax v0.6.25
  Downloaded bstr v0.2.16
  Downloaded tracing v0.1.26
  Downloaded idna v0.2.3
  Downloaded textwrap v0.11.0
  Downloaded doc-comment v0.3.3
  Downloaded ansi_term v0.12.1
  Downloaded futures-channel v0.3.15
  Downloaded difflib v0.4.0
  Downloaded hashbrown v0.11.2
  Downloaded globset v0.4.8
  Downloaded futures-core v0.3.15
  Downloaded aho-corasick v0.7.18
  Downloaded 115 crates (7.8 MB) in 1.50s (largest was `encoding_rs` at 1.4 MB)
   Compiling cfg-if v1.0.0
   Compiling autocfg v1.0.1
   Compiling libc v0.2.98
   Compiling memchr v2.4.0
   Compiling proc-macro2 v1.0.27
   Compiling unicode-xid v0.2.2
   Compiling log v0.4.14
   Compiling syn v1.0.73
   Compiling lazy_static v1.4.0
   Compiling bitflags v1.2.1
   Compiling cc v1.0.69
   Compiling fnv v1.0.7
   Compiling pin-project-lite v0.2.7
   Compiling serde_derive v1.0.126
   Compiling pkg-config v0.3.19
   Compiling itoa v0.4.7
   Compiling bytes v1.0.1
   Compiling once_cell v1.8.0
   Compiling serde v1.0.126
   Compiling futures-core v0.3.15
   Compiling version_check v0.9.3
   Compiling futures-task v0.3.15
   Compiling openssl v0.10.35
   Compiling foreign-types-shared v0.1.1
   Compiling ryu v1.0.5
   Compiling matches v0.1.8
   Compiling slab v0.4.3
   Compiling futures-channel v0.3.15
   Compiling native-tls v0.2.7
   Compiling pin-utils v0.1.0
   Compiling httparse v1.4.1
   Compiling hashbrown v0.11.2
   Compiling crossbeam-utils v0.8.5
   Compiling futures-sink v0.3.15
   Compiling futures-io v0.3.15
   Compiling regex-syntax v0.6.25
   Compiling tinyvec_macros v0.1.0
   Compiling percent-encoding v2.1.0
   Compiling try-lock v0.2.3
   Compiling openssl-probe v0.1.4
   Compiling ppv-lite86 v0.2.10
   Compiling same-file v1.0.6
   Compiling either v1.6.1
   Compiling httpdate v1.0.1
   Compiling unicode-width v0.1.8
   Compiling predicates-core v1.0.2
   Compiling tower-service v0.3.1
   Compiling camino v1.0.4
   Compiling unicode-segmentation v1.8.0
   Compiling serde_json v1.0.64
   Compiling doc-comment v0.3.3
   Compiling semver v1.0.3
   Compiling encoding_rs v0.8.28
   Compiling remove_dir_all v0.5.3
   Compiling anyhow v1.0.42
   Compiling treeline v0.1.0
   Compiling difflib v0.4.0
   Compiling ipnet v2.3.1
   Compiling mime v0.3.16
   Compiling base64 v0.13.0
   Compiling ansi_term v0.12.1
   Compiling tokio v1.8.1
   Compiling indexmap v1.7.0
   Compiling futures-util v0.3.15
   Compiling tracing-core v0.1.18
   Compiling http v0.2.4
   Compiling thread_local v1.1.3
   Compiling openssl-sys v0.9.65
   Compiling foreign-types v0.3.2
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling unicode-bidi v0.3.5
   Compiling tinyvec v1.2.0
   Compiling form_urlencoded v1.0.1
   Compiling walkdir v2.3.2
   Compiling itertools v0.10.1
   Compiling textwrap v0.11.0
   Compiling heck v0.3.3
   Compiling predicates-tree v1.0.2
   Compiling tracing v0.1.26
   Compiling http-body v0.4.2
   Compiling unicode-normalization v0.1.19
   Compiling aho-corasick v0.7.18
   Compiling bstr v0.2.16
   Compiling predicates v2.0.0
   Compiling quote v1.0.9
   Compiling num_cpus v1.13.0
   Compiling getrandom v0.2.3
   Compiling socket2 v0.4.0
   Compiling which v4.1.0
   Compiling mio v0.7.13
   Compiling want v0.3.0
   Compiling clap v2.33.3
   Compiling regex v1.5.4
   Compiling idna v0.2.3
   Compiling rand_core v0.6.3
   Compiling globset v0.4.8
   Compiling url v2.2.2
   Compiling rand_chacha v0.3.1
   Compiling ignore v0.4.18
   Compiling tokio-util v0.6.7
   Compiling rand v0.8.4
   Compiling tokio-native-tls v0.3.0
   Compiling globwalk v0.8.1
   Compiling structopt-derive v0.4.15
   Compiling h2 v0.3.3
   Compiling tempfile v3.2.0
   Compiling assert_fs v1.0.3
   Compiling structopt v0.3.22
   Compiling hyper v0.14.10
   Compiling serde_urlencoded v0.7.0
   Compiling cargo-platform v0.1.1
   Compiling hyper-tls v0.5.0
   Compiling reqwest v0.11.4
   Compiling cargo_metadata v0.14.0
   Compiling xtask v0.1.0 (/root/rover/xtask)
    Finished dev [unoptimized + debuginfo] target(s) in 4m 03s
     Running `target/debug/xtask dist --version v0.1.10`
info: running `git clone https://github.com/apollographql/rover` in `/tmp/.tmpNQ14nu`
info: running `git checkout tags/v0.1.10` in `/tmp/.tmpNQ14nu/rover`
info: downloading schema from https://github.com/apollographql/rover/releases/download/v0.1.10/rover-v0.1.10-schema.graphql
info: running `cargo build --target x86_64-unknown-linux-gnu --release` in `/tmp/.tmpNQ14nu/rover`
 Downloading crates ...
  Downloaded alloc-stdlib v0.2.1
  Downloaded crossbeam-deque v0.8.0
  Downloaded fslock v0.1.6
  Downloaded combine v3.8.1
  Downloaded brotli-decompressor v2.3.1
  Downloaded strsim v0.10.0
  Downloaded git-url-parse v0.3.1
  Downloaded synstructure v0.12.4
  Downloaded minimad v0.8.0
  Downloaded futures-macro v0.3.15
  Downloaded void v1.0.2
  Downloaded futures-executor v0.3.15
  Downloaded tracing-attributes v0.1.15
  Downloaded futures v0.3.15
  Downloaded encode_unicode v0.3.6
  Downloaded crossbeam-queue v0.3.2
  Downloaded directories-next v2.0.0
  Downloaded backtrace v0.3.60
  Downloaded csv-core v0.1.10
  Downloaded addr2line v0.15.2
  Downloaded crossterm v0.20.0
  Downloaded object v0.25.3
  Downloaded async-compression v0.3.8
  Downloaded graphql_client v0.9.0
  Downloaded pin-project-internal v1.0.7
  Downloaded tracing-serde v0.1.2
  Downloaded unreachable v1.0.0
  Downloaded git2 v0.13.20
  Downloaded uuid v0.8.2
  Downloaded online v3.0.1
  Downloaded instant v0.1.9
  Downloaded jobserver v0.1.22
  Downloaded matchers v0.0.1
  Downloaded crossbeam v0.8.1
  Downloaded strum v0.21.0
  Downloaded os_info v3.0.6
  Downloaded strum_macros v0.20.1
  Downloaded prettytable-rs v0.8.0
  Downloaded signal-hook v0.3.9
  Downloaded graphql_query_derive v0.9.0
  Downloaded graphql-parser v0.2.3
  Downloaded flate2 v1.0.20
  Downloaded generic-array v0.14.4
  Downloaded lock_api v0.4.4
  Downloaded terminal_size v0.1.17
  Downloaded termcolor v1.1.2
  Downloaded vec_map v0.8.2
  Downloaded toml v0.5.8
  Downloaded yaml-rust v0.4.5
  Downloaded thiserror-impl v1.0.26
  Downloaded linked-hash-map v0.5.4
  Downloaded ci_info v0.14.2
  Downloaded crc32fast v1.2.1
  Downloaded miniz_oxide v0.4.4
  Downloaded proc-macro-hack v0.5.19
  Downloaded os_type v2.3.0
  Downloaded num-traits v0.2.14
  Downloaded serde_yaml v0.8.17
  Downloaded serde_v8 v0.3.0
  Downloaded pin-project v1.0.7
  Downloaded signal-hook-registry v1.4.0
  Downloaded signal-hook-mio v0.2.1
  Downloaded proc-macro-nested v0.1.7
  Downloaded rustc-demangle v0.1.20
  Downloaded sha2 v0.9.5
  Downloaded strum v0.20.0
  Downloaded regex-automata v0.1.10
  Downloaded tracing-log v0.1.2
  Downloaded hyper v0.14.9
  Downloaded tracing-subscriber v0.2.19
  Downloaded harmonizer v0.27.0
  Downloaded smallvec v1.6.1
  Downloaded thiserror v1.0.26
  Downloaded time v0.1.43
  Downloaded typenum v1.13.0
  Downloaded strsim v0.8.0
  Downloaded termimad v0.14.0
  Downloaded parking_lot v0.11.1
  Downloaded scopeguard v1.1.0
  Downloaded sharded-slab v0.1.1
  Downloaded byteorder v1.4.3
  Downloaded opaque-debug v0.3.0
  Downloaded console v0.14.1
  Downloaded libssh2-sys v0.2.21
  Downloaded block-buffer v0.9.0
  Downloaded ansi_term v0.11.0
  Downloaded dirs-sys-next v0.1.2
  Downloaded dirs v1.0.5
  Downloaded cpufeatures v0.1.5
  Downloaded graphql-introspection-query v0.1.0
  Downloaded ascii v0.9.3
  Downloaded crossbeam-channel v0.5.1
  Downloaded crossbeam-epoch v0.9.5
  Downloaded digest v0.9.0
  Downloaded chrono v0.4.19
  Downloaded memoffset v0.6.4
  Downloaded num-integer v0.1.44
  Downloaded parking_lot_core v0.8.3
  Downloaded failure v0.1.8
  Downloaded graphql_client_codegen v0.9.0
  Downloaded humantime v2.1.0
  Downloaded opener v0.5.0
  Downloaded term_size v0.3.2
  Downloaded gimli v0.24.0
  Downloaded term v0.5.2
  Downloaded failure_derive v0.1.8
  Downloaded tokio v1.8.0
  Downloaded strum_macros v0.21.1
  Downloaded dtoa v0.4.8
  Downloaded alloc-no-stdlib v2.0.1
  Downloaded csv v1.1.6
  Downloaded adler v1.0.2
  Downloaded brotli v3.3.0
  Downloaded libz-sys v1.1.3
  Downloaded atty v0.2.14
  Downloaded envmnt v0.9.0
  Downloaded libc v0.2.97
  Downloaded fsio v0.2.0
  Downloaded libgit2-sys v0.12.21+1.1.0
  Downloaded deno_core v0.86.0
  Downloaded openssl-src v111.15.0+1.1.1k
  Downloaded rusty_v8 v0.22.3
   Compiling libc v0.2.97
   Compiling autocfg v1.0.1
   Compiling proc-macro2 v1.0.27
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.73
   Compiling cfg-if v1.0.0
error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-unknown-linux-gnu` target may not be installed
  = help: consider downloading the target with `rustup target add x86_64-unknown-linux-gnu`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

For more information about this error, try rustc --explain E0463. error: could not compile cfg-if due to previous error warning: build failed, waiting for other jobs to finish... error: build failed

Error: Could not build Rover.

Caused by: No such file or directory (os error 2)

After initial compilation, it started cloning the rover repo again in a tmp directory and then it tried to do cargo build --target x86_64-unknown-linux-gnu --release but the target is supposed to be nightly-aarch64-unknown-linux-gnu

So I ended up doing this manually for now

install-rover.sh


#!/bin/bash

set -e

ROVER_VERSION="v0.1.10"
ARCHITECTURE=$(arch)
OS=$(uname -s)

install_from_source () {
  echo "Installing rover from source"
  apt-get install build-essential git -y
  curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly --no-modify-path -y && source $HOME/.cargo/env
  
  git clone https://github.com/apollographql/rover.git --depth=1 --branch $ROVER_VERSION && cd rover
  curl -L "https://github.com/apollographql/rover/releases/download/$ROVER_VERSION/rover-$ROVER_VERSION-schema.graphql" --create-dirs -o ./crates/rover-client/.schema/schema.graphql
  cargo build --release

  cp target/release/rover /usr/local/bin/rover && cd .. && rm -rf rover
  rustup self uninstall -y
  apt-get remove build-essential git -y
}

install_with_curl(){
  curl -sSL https://rover.apollo.dev/nix/$ROVER_VERSION | sh
  cp $HOME/.rover/bin/rover /usr/local/bin/rover
}

if [ "$ARCHITECTURE" = "aarch64" -a "$OS" = "Linux" ]; then
  install_from_source
else
  install_with_curl
fi

a7ul avatar Aug 11 '21 21:08 a7ul

Ooh! I'll be sure to fix that up! thanks for trying this out.

EverlastingBugstopper avatar Aug 11 '21 21:08 EverlastingBugstopper

I needed to be able to cross-compile to arm64 from an x86 machine, and the info here was an invaluable jumping off point. I ultimately put together a dockerized build like this:

Dockerfile

FROM rust:latest

ARG rover_version=0.3.0

RUN apt update && apt-get install -y gcc-aarch64-linux-gnu
RUN rustup target add aarch64-unknown-linux-gnu

RUN git clone https://github.com/apollographql/rover --depth=1 --branch v$rover_version
WORKDIR rover
RUN curl -L "https://github.com/apollographql/rover/releases/download/v$rover_version/rover-v$rover_version-schema.graphql" --create-dirs -o ./crates/rover-client/.schema/schema.graphql

RUN CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc cargo build --release --target aarch64-unknown-linux-gnu

With that, you can build the binary and copy it out of the container:

docker build --tag rover-arm64 --build-arg rover_version=0.3.0 .
docker run --name rover-arm64 rover-arm64
docker cp rover-arm64:/rover/target/aarch64-unknown-linux-gnu/release/rover .

mziwisky avatar Oct 07 '21 05:10 mziwisky

What is the blocker on AARM64 support?

Multi-stage docker build:

FROM rust:1-buster AS rover-cli

ARG ROVER_VERSION=v0.4.1

RUN mkdir -p /tmp/rover \
  && wget -O - https://github.com/apollographql/rover/tarball/${ROVER_VERSION} | tar xz -C /tmp/rover --strip-components=1 \
  && cd /tmp/rover \
  && cargo run --release -- install

FROM node:14-buster-slim AS base

COPY --from=rover-cli /root/.rover/bin/rover /usr/bin/rover
RUN rover --version

RUN yarn install && yarn build

CMD ["node", "build/app.js"]

andrewmclagan avatar Dec 02 '21 01:12 andrewmclagan

With recent plugin based architecture of rover rover supergraph compose now breaks for these self compiled linux arm64 rover cli's since we need to compile rover cli and the supergraph plugin binary too alongside it. Otherwise rover cli will download x86_64 plugin binaries instead in linux.

Hence had to update @mziwisky 's cross compilation docker image like so


FROM rust:latest

ARG rover_version=0.5.1
ARG supergraph_0_version=0.36.1
ARG supergraph_2_version=2.0.1

RUN apt update && apt-get install -y gcc-aarch64-linux-gnu npm
RUN rustup target add aarch64-unknown-linux-gnu
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc

# Build rover cli
WORKDIR /rover
RUN git clone https://github.com/apollographql/rover --depth=1 --branch v$rover_version /rover
RUN cargo build --release --target aarch64-unknown-linux-gnu

# Build supergraph v0.x plugin for rover cli for federation 1 support
WORKDIR /supergraph-0
RUN git clone https://github.com/apollographql/federation-rs --depth=1 --branch supergraph@v$supergraph_0_version  /supergraph-0
WORKDIR /supergraph-0/federation-1
RUN cargo build --release --target aarch64-unknown-linux-gnu

# Build supergraph v2.x plugin for rover cli for federation 2 support
WORKDIR /supergraph-2
RUN git clone https://github.com/apollographql/federation-rs --depth=1 --branch supergraph@v$supergraph_2_version  /supergraph-2
WORKDIR /supergraph-2/federation-2
RUN cargo build --release --target aarch64-unknown-linux-gnu

And along side this I use a shell script to do docker build and copy the binaries back

#!/bin/bash

set -e

ROVER_VERSION=0.5.1
SUPERGRAPH_0_VERSION=0.36.1
SUPERGRAPH_2_VERSION=2.0.1

docker build --tag rover-aarch64 \
    --build-arg rover_version=$ROVER_VERSION \
    --build-arg supergraph_0_version=$SUPERGRAPH_0_VERSION \
    --build-arg supergraph_2_version=$SUPERGRAPH_2_VERSION \
    .
docker create rover-aarch64

docker cp rover-aarch64:/rover/target/aarch64-unknown-linux-gnu/release/rover ./rover
docker cp rover-aarch64:/supergraph-0/federation-1/target/aarch64-unknown-linux-gnu/release/supergraph ./supergraph-v$SUPERGRAPH_0_VERSION
docker cp rover-aarch64:/supergraph-2/federation-2/target/aarch64-unknown-linux-gnu/release/supergraph ./supergraph-v$SUPERGRAPH_2_VERSION

Once you have these make sure to move supergraph-vx.x.x plugin binaries to ~/.rover/bin so rover can pick those up

a7ul avatar Apr 23 '22 20:04 a7ul

I'd also like to see pre-built ARM binaries.

dburles avatar Jul 11 '22 02:07 dburles

It's worth noting that this work is taking place in https://github.com/apollographql/rover/pull/1137, which also outlines its progress and what we're waiting for to get it sorted out.

abernix avatar Jul 12 '22 11:07 abernix

This is the most annoying thread of the year. Hats off.. I've been trying to figure out why rover silently fails and creates empty output, my hunch is it's falling apart in one of the steps above... is there a reliable way to run rover supergraph compose in a docker container with a low level of effort? This pains me to understand and I'd rather be working on my schema than try figure out the pain in the ass of tooling

reduxdj avatar Sep 14 '22 15:09 reduxdj

We have released initial ARM support in v0.9.2-rc.0. Please give it a spin and let us know if you run into any issues using it.

EverlastingBugstopper avatar Sep 30 '22 23:09 EverlastingBugstopper

@EverlastingBugstopper thank you for your awesome work. Could we also get a musl arm64 build? They are provided for x86 so it makes sense (at least to me) to also provide them for arm64. This would allow alpine arm64 workloads to just use rover dists.

danilobuerger avatar Oct 17 '22 16:10 danilobuerger

AMAZING

andrewmclagan avatar Oct 21 '22 01:10 andrewmclagan

hey @danilobuerger - I've opened another issue to track prebuilt musl ARM binaries here: https://github.com/apollographql/rover/issues/1408.

EverlastingBugstopper avatar Nov 10 '22 20:11 EverlastingBugstopper

Thanks!

danilobuerger avatar Nov 10 '22 21:11 danilobuerger