Docker images, python mini-lib, helm chart for comfortable TON infrastructure
Run:
./pre-build.sh && docker-compose -f ./composes/ownnet.yaml up
More info about ownnet - ownnet.md
(you need to wait some time while network is starting)
Change local validators count:
deploy:
replicas: 3
If you want to reset your private network - remove all volumes:
docker-compose -f ./composes/ownnet.yaml down -v --rmi all
Feature name | Status |
---|---|
Full node for mainnet / testnet | ✅ |
Lite-client for mainnet / testnet | ✅ |
Helm chart | ✅ |
K8s secrets for keys | ✅ |
Custom ton network | ✅ |
Compose | ✅ |
RPC API / ton-http-api | ✅ |
Jupyter in toncenter with examples | ✅ |
Punisher on validator nodes | ⌛ |
Status page | ⌛ |
K8s resource limits | ⌛ |
It's one of the easiest way to start TON network locally:
./pre-build.sh
pre-build.sh
- build all docker files and send them to registry
ton-compile-source
- main Docker image, compile TON sources. You can
passis_testnet
. If true
- compile and build safer_overlay
branch,
because testnet is working on it.
ton-full-node
- run mainnet / testnet full node, you need to pass version
build argument mainnet-v0
or testnet-v0
- Change registry in build_for_k8s.sh
- Run build_for_k8s.sh and push images to registry
- Change
./chart/values.yaml
to specify your needs:- Change
run
section to chose which images you want to run - Change
persistent
, add your storageClassName / create persistent - Change
imagePullSecrets
to your registry - Notice that ports in nodes used
30001-30006
nodePorts that will open in all your nodes (to get UDP traffic to local TON stuff) - Change
testnetToncenter.CONFIG
/toncenter.CONFIG
params to your domains - Change
ingress
to correct setup of domains
- Change
Then:
kubectl create namespace ton
helm upgrade --install --namespace ton ton ./chart/ --values ./chart/values.yaml
After publish UDP services to k8s you need to specify externalIp
to bind public port.
Read more about externalIp
Feel free to change environs in compose / helm
config = {
"PUBLIC_IP": os.getenv('PRIVATE_CONFIG', ip),
"CONFIG": os.getenv('CONFIG', 'https://test.ton.org/ton-global.config.json'),
"PRIVATE_CONFIG": os.getenv('PRIVATE_CONFIG', 'false') == 'true',
"LITESERVER": os.getenv('LITESERVER', 'true') == 'true', # convert to bool
"CONSOLE_PORT": int(os.getenv("CONSOLE_PORT", 46732)),
"PUBLIC_PORT": int(os.getenv("PUBLIC_PORT", 50001)),
"DHT_PORT": int(os.getenv("DHT_PORT", 6302)),
"LITESERVER_PORT": int(os.getenv("LITESERVER_PORT", 43680)),
"NAMESPACE": os.getenv("NAMESPACE", None),
"THREADS": int(os.getenv("CPU_COUNT", cpu_count)),
"GENESIS": os.getenv("GENESIS", False),
"VERBOSE": os.getenv("VERBOSE", 3)
}
TON: EQCsCSLisPZ6xUtkgi_Tn5c-kipelVHRCxGdPu9x1gaVTfVC