subsquid / squid-cli

CLI for managing squid deployments to the SQD Cloud
17 stars 16 forks source link

RFC: Multichain deployments #22

Closed dzhelezov closed 6 months ago

dzhelezov commented 1 year ago

Motivation

Proposal

Introduce namespaces and parent-child relations in the deployment manifest. Within each namespace the addons can be referenced by an ID. Only the parent squid can define the api service, and then the status is tracked only for the child squids. Example

## deploy-main.yml
manifestVersion: subsquid.io/v0.1
name: transactions 
version: 1
build:

deploy:
  addons:
     postgres:
         id: db
  api:
    migrations: true                                        # run the db migrations on start
    cmd: [ "npx", "squid-graphql-server" ]  # for the main squid only the `api` is defined.
## deploy-arbitrum.yml
manifestVersion: subsquid.io/v0.1
name: transactions/arbitrum 
version: 1
build:

deploy:
  addons:
     postgres:
         schema: `arbitrum`
         ref: db
  processor:   # only the processor, saves transactions on arbitrum
     migrations: false # do not run the migrations
## deploy-kusama.yml
manifestVersion: subsquid.io/v0.1
name: transactions/kusama 
version: 1
build:

deploy:
  addons:
     postgres:
         schema: `kusama`
         ref: db
  processor:  # only the processor, saves transactions on kusama
      migrations: false # do not run the migrations

Points to discuss