When service merchants start up SDK node, they are supposed to configure node in template file.
Yaml Configuration Example
stage: test
dbInit:falsedepositAddress:""vsysNetType:"M"vsysNodeAddress:"https://wallet.v.systems/api"serverPrivateKey:""serverPublicKey:""tokenId:""kubeConfigPath:""vsysTokenExchangeRate:2.0middleware:authenticationEnable:trueproviderAllowEnable:truemongodb:endpoint:"mongodb+srv://testdb:xxxxxxxxxxxxxxxxxx.pgyad.mongodb.net/market-cli-test?retryWrites=true&w=majority"endpointTest:"mongodb://localhost:27017"timeout:10collectionPrefix:"vcloud_test"indexCreation:truecasbin:enable:truedebug:truemodel:"config/model.conf"autoload:trueautoloadInterval:10luaPlugin:httpSharedKeyPrefix:"vsys-market"platformConf:tempDir:"/templates"host:"127.0.0.1"port:"3002"uploadUri:"/api/v1/service/template/add"
yaml configuration overview
The configuration file contains 6 parts: basic configuration for node, middleware, mongodb database, casbin permission, lua script plugin and service template configuration.
Node Basic Configuration
Attribute
Type
Required
Description
stage
string
True
Marks node running status and define database to be connected. Database is market-cli-+stage .
dbInit
string
False
Depreciated
depositAddress
string
False
(TODO)If providers want to request resource from each other, they have to top up wallet configured in node.
vsysNetType
string
True
Network of VSYS chain used in node:Mainnet is "M", testnet is"T".
vsysNodeAddress
string
True
VSYS node address.
serverPrivateKey
string
True
Provider's VSYS wallet private key.
sererPublicKey
string
True
Provider's VSYS wallet public key.
tokenId
string
True
Token used to refund or pay for orders.
kubeConfigPath
string
True
File path of configuration file which control remote K8S cluster.
vsysTokenExchangeRate
float
True
Exchange rate between VSYS coin and token in order refund requested by users.
middleware
object
False
Configuration of middlewares in node.
mongodb
object
True
Mongodb configuration in the node.
casbin
object
True
Casbin RBAC configuration of node.
luaPlugin
object
False
Lua script configuration.
platformConf
object
True
Information of platform node which register service.
middleware Configuration
Attribute
Type
Required
Description
authenticationEnable
bool
True
Enable URL request authentication. Requests should contain VSYS wallet address and signature.