Content Fabric Setup

The following information is a work in progress. While it covers the main points in setting up a fabric, it is missing many details.

The following tools and clients are used in this document:

  • elv/qfab_cli: Main client for interacting with the Content Fabric
  • qfab: The Content Fabric daemon
  • elvmasterd: The Blockchain daemon used by the Content Fabric
  • elvmastercli: A CLI tool for operating on the blockchain

Setting up a new content fabric netwowrk from scratch

Step 1 - The Blockchain

BLOCKCHAIN

For now, this step will presume an existing Ethereum-style blockchain has been setup.

Info needed:
  • Network id / number
  • Peers to connect to (e.g. static_nodes)
  • Encoded Genesis block

TODO – document joining an elvmasterd node to the network (manually)

Tools:

To view the encoded block

elvmasterd config genesis --enc-block XXX

Step 2 - Content Space

Create CONTENT SPACE contract and the (5) factories

TODO - how to create a Space via qfab_cli/elv

Tools:

qfab_cli space create testv4_space --eth <URL-elvmasterd-json-RPC> --url <URL-of-fabric-node> --secret ${PRIVATE_KEY}

The output of this is a Space id, in the form of ispc.... It is used by nodes and other tools to know which space the parts exist in.

elvmastercli admin factory get --ethurl <URL-elvmasterd-json-RPC> --space ispc...

Create a qfab_cli config file using specific node api and eth URLs.

Step 3 - Default KMS

To setup a default KMS:

  1. Create a Key pair / wallet
  2. Assign the wallet to X numver of elvmasterd systems. Then use qfab_cli/elv to get the KMS id (ikms...)
qfab_cli eth kms <url-of-an-elvmasrted>
  1. Set the address to the Space as the defaul KMS with the assigned KMS nodes
qfab_cli space kms ikms... add <URL-of-elvmasterd-with-key> --pubkey kepk... --set-kms

Example - LIST:

qfab_cli space kms list ikms...

Step 4 - Content Fabric Nodes

Software Setup

qfab config

Node Config:

  • Space: ispc...
  • Name used domain name or explicit qspace reference (e.g. test or main)
  • Blockchain info (number, port to connect to)
  • Intra-domain routing info (e.g. static_routes) if it applies
  • Node key pair - node ID per node
  • Client geo routing info (db + region yaml)
Config NGINX (TLS)

Since multiple services run on a host, and so all traffic is TLS encrypted, it is common to proxy traffic through an application like haproxy or nginx.

TBD

Step 5 - Register Nodes with Content Space

Register node with the space:

qfab_cli space node list
qfab_cli space node add id fab+<url> eth+<url>

Step 6 - Usage Metering

Usage library already setup when node added first time.

Step 7 - Create Tenants

TBD

Step 8 - Fabric Browser

TBD