1
0
Go to file
David Boreham 5a4220ff41 Update version info
Former-commit-id: b0947081debe122007617b4355a134a95099b53c
2023-01-17 22:38:30 -07:00
.github update readme 2023-01-16 07:27:52 -05:00
app Update version info 2023-01-17 22:38:30 -07:00
docs update readme 2023-01-16 07:27:52 -05:00
scripts Fix odd import problem 2023-01-11 21:56:05 -07:00
tests/smoke-test Add version to smoke test 2023-01-10 14:32:12 -07:00
.gitignore trailing newline 2022-09-29 15:21:50 -06:00
cli.py Initial implementation of stack 2023-01-17 16:05:50 -07:00
LICENSE Initial version of pip packaging 2022-08-23 11:32:55 -06:00
MANIFEST.in Initial version of pip packaging 2022-08-23 11:32:55 -06:00
README.md update readme 2023-01-16 07:27:52 -05:00
requirements.txt Initial implementation of stack 2023-01-17 16:05:50 -07:00
setup.py Update version info 2023-01-17 22:38:30 -07:00
tox.ini Moar complex 2022-10-03 19:43:43 -06:00

Stack Orchestrator

Stack Orchestrator allows building and deployment of a Laconic Stack on a single machine with minimial prerequisites. It is a Python3 CLI tool that runs on any OS with Python3 and Docker. The following diagram summarizes the relevant repositories in the Laconic Stack - and the relationship to Stack Orchestrator.

The Stack

Install

Ensure that the following are already installed:

Note: if installing docker-compose via package manager (as opposed to Docker Desktop), you must install the plugin, e.g., on Linux:

mkdir -p ~/.docker/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.11.2/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose

Next, download the latest release from this page, into a suitable directory (e.g. ~/bin):

curl -L -o ~/bin/laconic-so https://github.com/cerc-io/stack-orchestrator/releases/latest/download/laconic-so

Give it permissions:

chmod +x ~/bin/laconic-so

Ensure laconic-so is on the PATH

Verify operation:

laconic-so --help
Usage: python -m laconic-so [OPTIONS] COMMAND [ARGS]...

  Laconic Stack Orchestrator

Options:
  --quiet
  --verbose
  --dry-run
  --local-stack
  -h, --help     Show this message and exit.

Commands:
  build-containers    build the set of containers required for a complete...
  build-npms          build the set of npm packages required for a...  
  deploy-system       deploy a stack
  setup-repositories  git clone the set of repositories required to build...

Usage

Three sub-commands: setup-repositories, build-containers and deploy-system are generally run in order. The following is a slim example for standing up the erc20-watcher. Go further with the erc20 watcher demo and other pieces of the stack, within the stacks directory.

Setup Repositories

Clone the set of git repositories necessary to build a system:

laconic-so --verbose setup-repositories --include cerc-io/go-ethereum,cerc-io/ipld-eth-db,cerc-io/ipld-eth-server,cerc-io/watcher-ts

This will default to ~/cerc or - if set - the environment variable CERC_REPO_BASE_DIR

Build Containers

Build the set of docker container images required to run a system. It takes around 10 minutes to build all the containers from scratch.

laconic-so --verbose build-containers --include cerc/go-ethereum,cerc/go-ethereum-foundry,cerc/ipld-eth-db,cerc/ipld-eth-server,cerc/watcher-erc20

Deploy System

Uses docker-compose to deploy a system (with most recently built container images).

laconic-so --verbose deploy-system --include ipld-eth-db,go-ethereum-foundry,ipld-eth-server,watcher-erc20 up

Check out he GraphQL playground here: http://localhost:3002/graphql

See the erc20 watcher demo to continue further.

Cleanup

laconic-so --verbose deploy-system --include ipld-eth-db,go-ethereum-foundry,ipld-eth-server,watcher-erc20 down

Contributing

See the CONTRIBUTING.md for developer mode install.

Platform Support

Native aarm64 is not currently supported. x64 emulation on ARM64 macos should work (not yet tested).