serai/deploy
vrx00 f9310a9968
Cluster Orchestration with Kubernetes (#121)
* add file

* builds + caching fixed

* bitcoin orchestration

* remove default entrypoint

* eth image and cleanup

* working monero

* remove signature file

* cleanup on aisle eth

* cleanup on aisle btc

* eth working

* remove docker ignore

* remove bitcoin image readme

* fix serai builds

* serai clusters

* added readme for docker

* formatting

* share the image

* newlines at EOF

* add multi profile example

* coin order

* coin order

* profile order

* fix grammar

* fix whitespace

* reduce trusted signature set, require at least 3 signatures.

* remove echo

* update comment to ref trusted keys

* comment fix

* use 16 keys, check for laanwj, name compose

* don't use bash

* monero fingerprints & eth fixes

* eth fixes

* remove extra eth keys

* kubernetes deployment implemented with helm charts

* deleted helmignores & added new lines at the end of the file

* deleted duplications & delete unnecessary comments & deactivated service accounts

* deleted generators files

* added a new line to monero/values.yaml

* deleted support for old kubernetes version - ingress.yaml

* added new like to serai/values.yaml

* serai's port name changed

* serai's port name changed

* release name limit was changed to 253

* README.md updated

* fixed Makefile

* deleted platform dependant instructions

* deleted appVersion from .yamls

* added -i parameter for deleting process

* added \ for Makefile

Co-authored-by: TheArchitect108 <75815740+TheArchitect108@users.noreply.github.com>
Co-authored-by: TheArchitect <TheArchitect108@protonmail.com>
2022-10-11 05:27:03 -05:00
..
coins Cluster Orchestration with Kubernetes (#121) 2022-10-11 05:27:03 -05:00
kubernetes Cluster Orchestration with Kubernetes (#121) 2022-10-11 05:27:03 -05:00
serai Cluster Orchestration with Docker Compose (#114) 2022-09-12 15:01:14 -05:00
docker-compose.yml Cluster Orchestration with Kubernetes (#121) 2022-10-11 05:27:03 -05:00
README.md Cluster Orchestration with Docker Compose (#114) 2022-09-12 15:01:14 -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 the deploy folder, not the serai root folder.

Profiles:

  • base - single node, named base
  • coins - node clients for coins only (BTC, ETH, XMR)
  • cluster-sm - Alice (Validator), Bob, Charlie
  • cluster-coins-sm - cluster-sm with coins
  • cluter-lg - Alice (Validator), Bob, Charlie, Dave, Eve, Ferdie
  • cluster-coins-lg - cluster-lg with coins
  • monero - full node monero only
  • bitcoin - full node bitcoin only
  • ethereum - full node ethereum only

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

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

Orchestration Approach

Builds

The Serai node is the only piece of our infrastructure that we compile locally and for the first build, it can take 10 minutes or more to complete the image. Images for external coins download binaries, then verify the signatures and checksums of the build. Overall the standard image build process looks like:

Stage 1 -- Builder

  • Configure environment.
  • Get the binary.
  • Verify binary using GPG.
  • Uncompress 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.

The best way is to build using docker compose, but if you prefer to build using docker directly, each image can be built directly.

Example: docker build ./coins/bitcoin

Entrypoint

The Serai full node and external full nodes each are 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