Skip to content
You are reading GoQuorum development version documentation and some displayed features may not be available in the stable release. You can switch to stable version using the version box at screen bottom.

Getting started with Qubernetes

Qubernetes is a project for generating GoQuorum network resources, Kubernetes GoQuorum resources, and managing and interacting with a GoQuorum Kubernetes deployment.

qctl is a Golang command line tool for creating and manipulating the minimal configuration, and interacting with a running Kubernetes network.

Installing binaries

Obtain the binaries from the repository.

Go get

Requires golang version > 1.13.

GO111MODULE=on go get github.com/ConsenSys/qubernetes/qctl

Test that qctl is installed properly.

qctl --help

Dependencies

  • Docker

    Important

    Ensure you allow Docker up to 5G of memory. Refer to the Resources section in Docker for Mac and Docker Desktop for details.

  • Kubernetes runtime. For example, minikube.

    See minikube full install instructions for your OS here

     brew install minikube
    
     curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
     sudo install minikube-linux-amd64 /usr/local/bin/minikube
    

    Start minikube

    minikube start --memory 6144
    

Starting a network

Two paths must be set, either as environment variable or flags to the commands:

  • QUBE_CONFIG or --config. Path to the minimal configuration.
  • QUBE_K8S_DIR or --k8sdir. Path to a directory to contain the GoQuorum and Kubernetes resources.

Environment variables

export QUBE_CONFIG=$(pwd)/myconfig.yaml
export QUBE_K8S_DIR=$(pwd)/out
qctl init network --num 3  --consensus ibft --cakeshop --monitor
qctl generate network --create
qctl deploy network --wait
qctl geth exec quorum-node1 'eth.blockNumber'

Command line flags

qctl init --config $(pwd)/myconfig.yaml network --num 3  --consensus ibft --cakeshop --monitor
qctl generate network --create --config $(pwd)/myconfig.yaml --k8sdir $(pwd)/out
qctl deploy network --wait --config $(pwd)/myconfig.yaml --k8sdir $(pwd)/out
qctl geth exec quorum-node1 'eth.blockNumber'
qctl geth attach quorum-node1

Interacting With A Running K8s GoQuorum Network

Listing GoQuorum nodes

 qctl ls nodes
 qctl ls nodes --all
 qctl ls nodes --enode --bare

Adding and deleting nodes

 qctl add node quorum-node5
 qctl delete node quorum-node4

Test (simple) contract

 qctl test contract quorum-node1
 qctl test contract quorum-node1 --private

Executing a geth command

 qctl geth exec quorum-node1 'eth.blockNumber'

Attach to a specific node

qctl geth attach quorum-node1

connecting to geth /etc/quorum/qdata
Welcome to the Geth JavaScript console!

instance: Geth/v1.9.7-stable-6005360c(quorum-v2.7.0)/linux-amd64/go1.13.13
coinbase: 0x5dc833a384369714e05d1311e40a8b244be772af
at block: 19 (Tue, 06 Oct 2020 00:24:05 UTC)
 datadir: /etc/quorum/qdata/dd
 modules: admin:1.0 debug:1.0 eth:1.0 istanbul:1.0 miner:1.0 net:1.0 personal:1.0 quorumExtension:1.0 rpc:1.0 txpool:1.0 web3:1.0
ConsenSys has acquired Quorum from J.P. Morgan. Please read the FAQ.
Questions or feedback? You can discuss issues and obtain free support on GoQuorum Slack channel.
For paid professional support by ConsenSys, contact us at quorum@consensys.net