Run laconic-console stack as part of fixturenet deployment #1

Merged
ashwin merged 7 commits from pm-add-cli-and-console into main 2024-06-25 06:43:23 +00:00
4 changed files with 53 additions and 2 deletions
Showing only changes of commit 85395b44b1 - Show all commits

View File

@ -8,7 +8,7 @@ services:
TEST_REGISTRY_EXPIRY: ${TEST_REGISTRY_EXPIRY:-false} TEST_REGISTRY_EXPIRY: ${TEST_REGISTRY_EXPIRY:-false}
volumes: volumes:
- laconicd-data:/root/.laconicd - laconicd-data:/root/.laconicd
- ../config/fixturenet-laconicd/scripts/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh - ../config/fixturenet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
ports: ports:
- "6060" - "6060"
- "26657" - "26657"

View File

@ -1,36 +1,57 @@
# fixturenet-laconicd-stack # fixturenet-laconicd-stack
Instructions for running a laconicd fixturenet along with registry CLI and console
## Setup ## Setup
* Clone the stack repo * Clone the stack repos:
```bash ```bash
laconic-so fetch-stack git.vdb.to/cerc-io/fixturenet-laconicd-stack laconic-so fetch-stack git.vdb.to/cerc-io/fixturenet-laconicd-stack
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack
``` ```
* Clone required repositories: * Clone required repositories:
```bash ```bash
# laconicd
laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd setup-repositories laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd setup-repositories
# laocnic cli and console
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console setup-repositories
``` ```
* Build the container images: * Build the container images:
```bash ```bash
# laconicd
laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd build-containers laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd build-containers
# laocnic cli and console
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console build-containers
``` ```
This should create the following docker images locally:
* `cerc/laconic2d`
* `cerc/laconic2-registry-cli`
* `cerc/webapp-base`
* `cerc/laconic2-console-host`
## Create a deployment ## Create a deployment
* Create a spec file for the deployment: * Create a spec file for the deployment:
```bash ```bash
laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy init --output fixturenet-laconicd-spec.yml laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy init --output fixturenet-laconicd-spec.yml
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy init --output laconic-console-spec.yml
``` ```
* Edit `network` in the spec file to map container ports to host ports as required: * Edit `network` in the spec file to map container ports to host ports as required:
```bash ```bash
# testnet-laconicd-spec.yml
... ...
network: network:
ports: ports:
@ -41,18 +62,31 @@
- '9473:9473' - '9473:9473'
- '9090:9090' - '9090:9090'
- '1317:1317' - '1317:1317'
# laconic-console-spec.yml
...
network:
ports:
console:
- '8080:80'
``` ```
* Create a deployment from the spec file: * Create a deployment from the spec file:
```bash ```bash
laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy create --spec-file fixturenet-laconicd-spec.yml --deployment-dir fixturenet-laconicd-deployment laconic-so --stack ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd deploy create --spec-file fixturenet-laconicd-spec.yml --deployment-dir fixturenet-laconicd-deployment
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy create --spec-file laconic-console-spec.yml --deployment-dir laconic-console-deployment
# Place them both in the same namespace (cluster)
cp fixturenet-laconicd-deployment/deployment.yml laconic-console-deployment/deployment.yml
``` ```
## Start the deployment ## Start the deployment
```bash ```bash
laconic-so deployment --dir fixturenet-laconicd-deployment start laconic-so deployment --dir fixturenet-laconicd-deployment start
laconic-so deployment --dir laconic-console-deployment start
``` ```
## Check status ## Check status
@ -67,6 +101,19 @@ laconic-so deployment --dir fixturenet-laconicd-deployment start
laconic-so deployment --dir fixturenet-laconicd-deployment logs laconicd -f laconic-so deployment --dir fixturenet-laconicd-deployment logs laconicd -f
``` ```
* View the laconic console at <http://localhost:8080>
* Use the cli service for registry CLI operations:
```bash
# Example
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry status"
```
## Demo
* Follow the [records-demo](./records-demo.md) to try loading data into registry
## Clean up ## Clean up
* Stop all services running in the background: * Stop all services running in the background:

View File

@ -0,0 +1,4 @@
# records-demo
<!-- TODO -->