Add some stack usage doc

This commit is contained in:
David Boreham 2024-06-20 20:30:34 +00:00
parent 3b8bb330bd
commit 6c7e232bb1

View File

@ -1,3 +1,57 @@
# snowballtools-base-api-stack
Stack definition for the snowball api service.
Stack definition for the snowball api service.
## Running this stack locally
(Assumes stack-orchestrator and docker are already installed)
### Fetch the stack repo
```
$ laconic-so fetch-stack git.vdb.to/cerc-io/snowballtools-base-api-stack
```
### Clone project repositories
```
$ laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend setup-repositories --git-ssh --pull
```
### Build service container
(Might take 10 minutes)
```
$ laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend build-containers
```
### Create a deployment
A deployment is a collection of all the stuff needed to run a single instance of a stack, in this case the snowball api service.
Initialize:
```
$ laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend deploy init --output local-deployment-spec.yml --config SNOWBALL_BACKEND_CONFIG_FILE_PATH=/config/local.toml
```
Then create:
```
$ laconic-so --stack ~/cerc/snowballtools-base-api-stack/stack-orchestrator/stacks/snowballtools-base-backend deploy create --deployment-dir local-deployment --spec-file local-deployment-spec.yml
```
Next create a file at `local-deployment/data/config/local.toml` with this content:
```
<redacted>
```
Finally start the service:
```
$ laconic-so deployment --dir local-deployment start
```
To check logs:
```
$ laconic-so deployment --dir local-deployment logs
```
To stop the service:
```
$ laconic-so deployment --dir local-deployment stop
```