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

Prerequisites

To run mkchain, you must either have docker or pytezos installed.

Installing Docker

To be consistent with other documentation in this project, we describe how to install docker with minikube. We need to install:

- [docker](https://docs.docker.com/get-docker/),
- [minikube](https://minikube.sigs.k8s.io/docs/),
- [helm](https://helm.sh/),
- and `python3`.

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

minikube start

eval $(minikube docker-env)

Installing pytezos

This is documented at: https://pytezos.org/quick_start.html#requirements

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 a yaml file in your current working directory: <$CHAIN_NAME>_values.yaml

If you configure your chain to run over a Zerotier VPN, mkchain will create an additional file for invitees to join your network: <$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
-h mkchain help message
-v mkchain version
--number-of-bakers Number of baking nodes in the cluster 1
--number-of-nodes Number of non-baking nodes in the cluster 0
bootstrap_peers --bootstrap-peers Peer ips to connect to []
expected_proof_of_work --expected-proof-of-work Node identity generation difficulty 0
images.octez --octez-docker-image Version of the Octez docker image to run tezos/tezos:v14-release
--use-docker (--no...) Use (or don't use) docker to generate keys rather than pytezos autodetect
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 oxheadalpha https://oxheadalpha.github.io/tezos-helm-charts

Then install the Tezos Helm chart:

helm install $CHAIN_NAME oxheadalpha/tezos-chain \
--values ./${CHAIN_NAME}_values.yaml \
--namespace oxheadalpha --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

If you're not sure about the file name format, learn more about wheel file names.

mkchain-6.9.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file mkchain-6.9.0-py3-none-any.whl.

File metadata

  • Download URL: mkchain-6.9.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for mkchain-6.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e84d07314d9c4fd5fae53b4e2b44aba513ec20f5885900cf27b3f1efc68a453c
MD5 82fab381d80ec26fe0c7be78855bb1ec
BLAKE2b-256 22037cb727c670b1e57a7cc7c46e4552245a57ae6688eaa957b8166fa23ce551

See more details on using hashes here.

Supported by

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