Skip to main content

A utility to generate k8s configs for a Tezos blockchain

Project description

mkchain

Helper program to generate values for the Tezos chain Helm chart

This assumes you have docker, minikube, helm, and python3 installed.

Start minikube and configure your shell environment to use minikube’s Docker daemon:

minikube start

eval $(minikube docker-env)

Install mkchain

mkdir mkchain && cd mkchain
python3 -m venv .venv
. .venv/bin/activate
pip install wheel && pip install mkchain

Set unbuffered IO for python:

export PYTHONUNBUFFERED=x

Generate Helm Values

Set as an environment variable the name you would like to give to your chain:

export CHAIN_NAME=my-chain

Your chain is uniquely defined by a set of values such as bootstrap account keys, chain id, timestamp...

To generate these values run:

mkchain $CHAIN_NAME

This command will create two yaml files in your current working directory. <$CHAIN_NAME>_values.yaml and <$CHAIN_NAME>_invite_values.yaml.

mkchain parameters

You can explicitly specify some values by:

  • passing CLI parameters to mkchain
  • directly modifying the values yaml file generated by mkchain
  • passing arguments to helm install or helm upgrade commands using the --set flag, which will selectively override the current yaml values
YAML Key mkchain argument Description Default
bootstrap_peer --bootstrap-peer Peer ip to connect to
images.tezos --docker-image Version of the Tezos docker image tezos/tezos:v8-release
number_of_nodes --number-of-nodes Number of non-baking nodes in the cluster 1
number_of_bakers --number-of-bakers Number of baking nodes in the cluster 1
rpc_auth --rpc-auth Whether or not an RPC auth backend will be spun up False
zerotier_config.zerotier_network --zerotier-network Zerotier network id for external chain access
zerotier_config.zerotier_token --zerotier-token Zerotier token for external chain access

Create Tezos Chain

Make sure you have the Tezos Helm chart repo:

helm repo add tqtezos https://tqtezos.github.io/tezos-helm-charts

Then install the Tezos Helm chart:

helm install $CHAIN_NAME tqtezos/tezos-chain \
--values ./${CHAIN_NAME}_values.yaml \
--namespace tqtezos --create-namespace

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

mkchain-2.0.1-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page