How can I create Tezos Testnet in tezos-node or how can I create private node in tezos-node. can you teach me? I need help!
If all you want is a few nodes interacting with each other on your machine you should read https://tezos.gitlab.io/user/sandbox.html.
If you want to create private testnets, you definitely should look at tezos-k8s. It's an easy-to-use tool to quickly deploy testnets based on the Kubernetes infrastructure. Just follow the steps given in the link. Basically, a testnet on your machine could be associated with a namespace that contains pods. Each pod stands for a (baking or not) node, and each of them consists of containers that designate a single process (e.g. the
tezos-node or the
To make it short if you want to make a private testnet, you need to
- Install dependencies for tezos-k8s (python3, docker, kubectl, minikube and helm).
- Start the minikube daemon and enter its environment with
minikube start eval $(minikube docker-env)
Follow these steps to create your private network. You can ignore the Zerotier part if you intend to a create a private net on your own machine only. Then
mkchainscript will allow you to generate a deployment file (Helm values). This file contains most of the information required to parameterize your network (e.g. number of nodes, history mode, baker accounts...). You can manually modify it as you wish your network to be.
b. Finally, you can simply start your network with
helm install ....
Here are a few more useful commands.
a. To pause your network, you can do
minikube stopand resume it whenever you want with
b. To stop and delete your network, you can
kubectl delete ns [NAMESPACE].
c. To see the overall status of your network and list the pods you have, you can
kubectl -n oxheadalpha get pods
d. To watch the logs of the node of a pod, you can
kubectl -n oxheadalpha logs [POD] tezos-node -f.
e. To have a direct access to the node container and execute manual commands, you can also do
kubectl -n oxheadalpha exec -it [POD] -c tezos-node -- /bin/sh.