stack-orchestrator/stack_orchestrator/data/stacks/osmosis
2023-12-08 10:24:25 +05:30
..
README.md Update osmosis frontend stack to serve app 2023-12-08 10:24:25 +05:30
stack.yml Update osmosis frontend stack to serve app 2023-12-08 10:24:25 +05:30

self-hosted osmosis

Instructions to build and deploy:

  • self-hosted gitea
  • an ipfs node
  • the osmosis front end
  • a laconicd chain

Setup

Clone required repositories:

laconic-so --stack osmosis setup-repositories

# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories and re-run the command

Build the container images:

# support image for the gitea package registry
laconic-so --stack build-support build-containers

laconic-so --stack osmosis build-containers 

Create a deployment

First, create a spec file for the deployment, which will map the stack's ports and volumes to the host:

laconic-so --stack osmosis deploy init --output osmosis-spec.yml

Ports

Edit network in spec file to map container ports to same ports in host

...
ports:
  osmosis-front-end:
   - '3000:3000'
  ipfs:
   - 0.0.0.0:8080:8080
   - 0.0.0.0:4001:4001
   - 0.0.0.0:5001:5001

Data volumes

Container data volumes are bind-mounted to specified paths in the host filesystem. The default setup (generated by laconic-so deploy init) places the volumes in the ./data subdirectory of the deployment directory. The default mappings can be customized by editing the "spec" file generated by laconic-so deploy init.


Once you've made any needed changes to the spec file, create a deployment from it:

laconic-so --stack osmosis deploy create --spec-file osmosis-spec.yml --deployment-dir osmosis-deployment

Start the stack

Start the deployment:

laconic-so deployment --dir osmosis-deployment start
  • List and check the health status of all the containers using docker ps and wait for them to be healthy

Laconic registry

Setup a test chain:

export CERC_NPM_REGISTRY_URL=https://git.vdb.to/api/packages/cerc-io/npm/

laconic-so --stack fixturenet-laconic-loaded setup-repositories --include git.vdb.to/cerc-io/laconicd,git.vdb.to/cerc-io/laconic-sdk,git.vdb.to/cerc-io/laconic-registry-cli,git.vdb.to/cerc-io/laconic-console

laconic-so --stack fixturenet-laconic-loaded build-containers

export LACONIC_HOSTED_ENDPOINT=http://<your-IP>

laconic-so --stack fixturenet-laconic-loaded deploy up

then docker exec into the laconicd container and either export the private key or create a new one and send funds to it. Use that private key for LACONIC_HOTWALLET_KEY.

Clean up

To stop all osmosis services running in the background, while preserving chain data:

laconic-so deployment --dir osmosis-deployment stop

To stop all osmosis services and also delete data:

laconic-so deployment --dir osmosis-deployment stop --delete-volumes

To stop stack running Laconic registry

laconic-so --stack fixturenet-laconic-loaded deploy down

# Delete volumes
laconic-so --stack fixturenet-laconic-loaded deploy down --delete-volumes