serai/orchestration
Luke Parker f0ff3a18d2
Use debug builds in our Dockerfiles to reduce CI times (#462)
* Use debug builds in our Dockerfiles to reduce CI times

Also enables only spawning the mdns service when debug in the coordinator.

* Correct underflow in processor

Prior undetected due to relase builds not having bounds checks enabled.

* Restore Serai release due to CI/RPC failures caused by compiling it in debug mode

This is *probably* worth an issue filed upstream, if it can be tracked down.

* Correct failing debug asserts in Monero

These debug asserts assumed there was a change address to take the remainder.
If there's no change address, the remainder is shunted to the fee, causing the
fee to be distinct from the estimate.

We presumably need to modify monero-serai such that change: None isn't valid,
and users must use Change::Fingerprintable(None).
2023-11-29 00:24:37 -05:00
..
coins Dockerfile Parts (#428) 2023-11-12 23:55:15 -05:00
coordinator Use debug builds in our Dockerfiles to reduce CI times (#462) 2023-11-29 00:24:37 -05:00
Dockerfile.parts Install wasm toolchain before ADDing files to docker images 2023-11-22 18:07:58 -05:00
kubernetes Rename deploy to orchestration 2023-07-27 03:19:35 -04:00
message-queue Use debug builds in our Dockerfiles to reduce CI times (#462) 2023-11-29 00:24:37 -05:00
processor Use debug builds in our Dockerfiles to reduce CI times (#462) 2023-11-29 00:24:37 -05:00
runtime Rust 1.74 2023-11-19 17:47:46 -05:00
serai Install wasm toolchain before ADDing files to docker images 2023-11-22 18:07:58 -05:00
docker-compose.yml Dockerfile Parts (#428) 2023-11-12 23:55:15 -05:00
dockerfiles.sh Dockerfile Parts (#428) 2023-11-12 23:55:15 -05:00
README.md Dockerfile Parts (#428) 2023-11-12 23:55:15 -05:00

Deploy

Run with Docker Compose

Running the Serai infrastructure is easy with Docker.

We utilize compose profiles to easily orchestrate various pieces of the infrastructure.

Example: docker compose --profile cluster-coins-sm up

All commands are assumed to be ran from /deploy, not the root folder.

Profiles:

  • bitcoin - Bitcoin node

  • monero - Monero node

  • ethereum - Ethereum node

  • coins - Nodes for all external networks (BTC, ETH, XMR)

  • message-queue - The message queue service.

  • processor - Serai processor for one external network.

  • coordinator - Serai coordinator for the entire Serai stack.

  • serai - Serai node

  • cluster-sm - "Alice", "Bob", "Charlie", and "Dave" Serai nodes, all as validators (enough to achieve BFT with one faulty node)

  • cluster-lg - cluster-sm with non-validators "Eve" and "Ferdie"

You can supply one or more profiles to the docker compose command to orchestrate the desired components.

Example: docker compose --profile coins --profile serai up

Orchestration Approach

Builds

The Serai infrastructure is locally compiled. This may take several minutes.

Images for external networks download binaries, before verifying their checksums and signatures.

Stage 1 -- Builder

  • Configure environment.
  • Get the binary.
  • Verify binary using GPG.
  • Decompress binary to prepare image.

Stage 2 -- Image

  • Copy needed files from builder.
  • Move executables to bin folder.
  • Copy scripts folder.
  • Expose necessary ports.
  • Map necessary volumes.

Entrypoint

The Serai node and external networks' nodes are each started from an entrypoint script inside the /scripts folder.

To update the scripts on the image you must rebuild the updated images using the --build flag after up in docker compose.

Example: docker compose --profile bitcoin up --build