Merge pull request #225 from cerc-io/dboreham/update-readme
Update README to reflect user experience and to use --stack
Former-commit-id: 8fb93758ee
This commit is contained in:
commit
538bccd19a
45
README.md
45
README.md
@ -8,11 +8,10 @@ Stack Orchestrator allows building and deployment of a Laconic Stack on a single
|
||||
|
||||
Ensure that the following are already installed:
|
||||
|
||||
- [Python3](https://wiki.python.org/moin/BeginnersGuide/Download): `python3 --version` >= `3.10.8`
|
||||
- [Python3](https://wiki.python.org/moin/BeginnersGuide/Download): `python3 --version` >= `3.8.10` (the Python3 shipped in Ubuntu 20+ is good to go)
|
||||
- [Docker](https://docs.docker.com/get-docker/): `docker --version` >= `20.10.21`
|
||||
- [Docker Compose](https://docs.docker.com/compose/install/): `docker-compose --version` >= `2.13.0`
|
||||
|
||||
Note: if installing docker-compose via package manager (as opposed to Docker Desktop), you must [install the plugin](https://docs.docker.com/compose/install/linux/#install-the-plugin-manually), e.g., on Linux:
|
||||
Note: if installing docker-compose via package manager on Linux (as opposed to Docker Desktop), you must [install the plugin](https://docs.docker.com/compose/install/linux/#install-the-plugin-manually), e.g. :
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.docker/cli-plugins
|
||||
@ -20,39 +19,27 @@ curl -SL https://github.com/docker/compose/releases/download/v2.11.2/docker-comp
|
||||
chmod +x ~/.docker/cli-plugins/docker-compose
|
||||
```
|
||||
|
||||
Next, download the latest release from [this page](https://github.com/cerc-io/stack-orchestrator/tags), into a suitable directory (e.g. `~/bin`):
|
||||
Next decide on a directory where you would like to put the stack-orchestrator program. Typically this would be
|
||||
a "user" binary directory such as `~/bin` or perhaps `/usr/local/laconic` or possibly just the current working directory.
|
||||
|
||||
Now, having selected that directory, download the latest release from [this page](https://github.com/cerc-io/stack-orchestrator/tags) into it (we're using `~/bin` below for concreteness but edit to suit if you selected a different directory). Also be sure that the destination directory exists and is writable:
|
||||
|
||||
```bash
|
||||
curl -L -o ~/bin/laconic-so https://github.com/cerc-io/stack-orchestrator/releases/latest/download/laconic-so
|
||||
```
|
||||
|
||||
Give it permissions:
|
||||
Give it execute permissions:
|
||||
```bash
|
||||
chmod +x ~/bin/laconic-so
|
||||
```
|
||||
|
||||
Ensure `laconic-so` is on the [`PATH`](https://unix.stackexchange.com/a/26059)
|
||||
|
||||
Verify operation:
|
||||
Verify operation (your version will probably be different, just check here that you see some version outut and not an error):
|
||||
|
||||
```
|
||||
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...
|
||||
laconic-so version
|
||||
Version: v1.0.27-7831078
|
||||
```
|
||||
|
||||
## Usage
|
||||
@ -64,25 +51,25 @@ Three sub-commands: `setup-repositories`, `build-containers` and `deploy-system`
|
||||
Clone the set of git repositories necessary to build a system:
|
||||
|
||||
```bash
|
||||
laconic-so --verbose setup-repositories --include cerc-io/go-ethereum,cerc-io/ipld-eth-db,cerc-io/ipld-eth-server,cerc-io/watcher-ts
|
||||
laconic-so --stack erc20 setup-repositories
|
||||
```
|
||||
|
||||
This will default to `~/cerc` or - if set - the environment variable `CERC_REPO_BASE_DIR`
|
||||
This will default to cloning git reposiories into: `~/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.
|
||||
|
||||
```bash
|
||||
laconic-so --verbose build-containers --include cerc/go-ethereum,cerc/go-ethereum-foundry,cerc/ipld-eth-db,cerc/ipld-eth-server,cerc/watcher-erc20
|
||||
laconic-so --stack erc20 build-containers
|
||||
```
|
||||
|
||||
### Deploy System
|
||||
|
||||
Uses `docker-compose` to deploy a system (with most recently built container images).
|
||||
Uses `docker compose` to deploy a system (with most recently built container images).
|
||||
|
||||
```bash
|
||||
laconic-so --verbose deploy-system --include ipld-eth-db,go-ethereum-foundry,ipld-eth-server,watcher-erc20 up
|
||||
laconic-so --stack erc20 deploy-system up
|
||||
```
|
||||
|
||||
Check out he GraphQL playground here: [http://localhost:3002/graphql](http://localhost:3002/graphql)
|
||||
@ -92,7 +79,7 @@ See the [erc20 watcher demo](/app/data/stacks/erc20) to continue further.
|
||||
### Cleanup
|
||||
|
||||
```bash
|
||||
laconic-so --verbose deploy-system --include ipld-eth-db,go-ethereum-foundry,ipld-eth-server,watcher-erc20 down
|
||||
laconic-so --stack erc20 deploy-system down
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
Loading…
Reference in New Issue
Block a user