1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-12 11:12:16 +00:00
ton/docker/ton-node-port.yaml

127 lines
2.8 KiB
YAML
Raw Normal View History

Improved Docker image (#1051) * add github action for macOS 14 (arm64, M1) * add github action (portable) for macOS 14 (arm64, M1) * rename macOS arm64 output artifact * Update libsodium on windows * Compile libsodium * Update build-windows.bat * use upgraded libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled; * revert libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled; * use upgraded libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled; * fix libsodium version 1.0.19; use compiled static libsodium for Windows instead of precompiled; * try 1.0.20 libsodium precompiled on github * try 1.0.18 libsodium precompiled on github * try windows build on win server 2019 * and use PlatformToolset=v142 * use cmake -G "Visual Studio 16 2019" * fix path to msvc 2019 on github * separate github windows build on win server 2019 and build on win server 2022 * Update assembly/native/build-windows-2019.bat add retry mechanism Co-authored-by: Dr. Awesome Doge <doge@ton.org> * rework docker image; provide installation, configuration and troubleshooting guidelines; add nc, ifconfig, netstat and iptraf-ng utilities for troubleshooting; * put back control.template * add tcpdump and curl to the docker image; update default validator ports; add kubernetes deployment guidelines with network=host; test metalLB load balancer * tested metalLB load balancer * tested aws deployment * tested gcp deployment * todo ali cloud and storage mount points, currently only the networking was tested * add storage/pv/pvc; repair broken links, adjust docu * change to dynamic storage provisioning without node affinity (statefulSet+headless service) WIP * modify gcp deployment WIP * modify aws deployment WIP * add resource requests/limits * some docu changes * some docu changes; aws tested * support $DUMP_URL parameter as well as $ZFS_POOL_NAME; add pv and plzip to docker image for dump extraction; use mainnet dump by default in k8s deployments; * support $DUMP_URL parameter as well as $ZFS_POOL_NAME; add pv and plzip to docker image for dump extraction; use mainnet dump by default in k8s deployments; add AliCloud support * minor remarks, final tests * remove ZFS_POOL_NAME parameter * improve docker github action - run test and add release tag, compile against arm64 * set docker test timeout * test if validator-engine inside the docker image is valid * test if validator-engine inside the docker image is valid * test if validator-engine inside the docker image is valid * adjust recommended node values for ali cloud deployment --------- Co-authored-by: neodiX <neodix42@ton.org> Co-authored-by: Dr. Awesome Doge <doge@ton.org>
2024-07-10 11:59:08 +00:00
apiVersion: v1
kind: Pod
metadata:
name: validator-engine-pod
labels:
name: validator-engine-pod
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node_type
operator: In
values:
- ton-validator
hostNetwork: true
volumes:
- name: validator-engine-pv
persistentVolumeClaim:
claimName: validator-engine-pvc
containers:
- name: validator-engine-container
image: ghcr.io/ton-blockchain/ton:latest
Improved Docker image (#1051) * add github action for macOS 14 (arm64, M1) * add github action (portable) for macOS 14 (arm64, M1) * rename macOS arm64 output artifact * Update libsodium on windows * Compile libsodium * Update build-windows.bat * use upgraded libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled; * revert libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled; * use upgraded libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled; * fix libsodium version 1.0.19; use compiled static libsodium for Windows instead of precompiled; * try 1.0.20 libsodium precompiled on github * try 1.0.18 libsodium precompiled on github * try windows build on win server 2019 * and use PlatformToolset=v142 * use cmake -G "Visual Studio 16 2019" * fix path to msvc 2019 on github * separate github windows build on win server 2019 and build on win server 2022 * Update assembly/native/build-windows-2019.bat add retry mechanism Co-authored-by: Dr. Awesome Doge <doge@ton.org> * rework docker image; provide installation, configuration and troubleshooting guidelines; add nc, ifconfig, netstat and iptraf-ng utilities for troubleshooting; * put back control.template * add tcpdump and curl to the docker image; update default validator ports; add kubernetes deployment guidelines with network=host; test metalLB load balancer * tested metalLB load balancer * tested aws deployment * tested gcp deployment * todo ali cloud and storage mount points, currently only the networking was tested * add storage/pv/pvc; repair broken links, adjust docu * change to dynamic storage provisioning without node affinity (statefulSet+headless service) WIP * modify gcp deployment WIP * modify aws deployment WIP * add resource requests/limits * some docu changes * some docu changes; aws tested * support $DUMP_URL parameter as well as $ZFS_POOL_NAME; add pv and plzip to docker image for dump extraction; use mainnet dump by default in k8s deployments; * support $DUMP_URL parameter as well as $ZFS_POOL_NAME; add pv and plzip to docker image for dump extraction; use mainnet dump by default in k8s deployments; add AliCloud support * minor remarks, final tests * remove ZFS_POOL_NAME parameter * improve docker github action - run test and add release tag, compile against arm64 * set docker test timeout * test if validator-engine inside the docker image is valid * test if validator-engine inside the docker image is valid * test if validator-engine inside the docker image is valid * adjust recommended node values for ali cloud deployment --------- Co-authored-by: neodiX <neodix42@ton.org> Co-authored-by: Dr. Awesome Doge <doge@ton.org>
2024-07-10 11:59:08 +00:00
env:
- name: PUBLIC_IP
value: "<PUBLIC_IP>"
- name: GLOBAL_CONFIG_URL
value: "https://api.tontech.io/ton/wallet-mainnet.autoconf.json"
- name: DUMP_URL
value: "https://dump.ton.org/dumps/latest.tar.lz"
- name: LITESERVER
value: "true"
- name: VALIDATOR_PORT
value: "30001"
- name: CONSOLE_PORT
value: "30002"
- name: LITE_PORT
value: "30003"
- name: STATE_TTL
value: "86400"
- name: ARCHIVE_TTL
value: "86400"
- name: THREADS
value: "8"
- name: VERBOSITY
value: "3"
volumeMounts:
- mountPath: "/var/ton-work/db"
name: validator-engine-pv
resources:
requests:
memory: "64Gi"
cpu: "16"
limits:
memory: "128Gi"
cpu: "32"
---
kind: Service
apiVersion: v1
metadata:
name: validator-engine-srv
spec:
type: NodePort
ports:
- name: validator-engine-public-udp-port
nodePort: 30001
port: 30001
targetPort: 30001
protocol: UDP
- name: validator-console-tcp-port
nodePort: 30002
port: 30002
targetPort: 30002
protocol: TCP
- name: lite-server-tcp-port
nodePort: 30003
port: 30003
targetPort: 30003
protocol: TCP
selector:
name: validator-engine-pod
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: validator-engine-pv
labels:
type: local
spec:
storageClassName: local-storage
capacity:
storage: 800Gi
accessModes:
- ReadWriteOnce
- ReadOnlyMany
persistentVolumeReclaimPolicy: Retain
local:
path: <LOCAL_STORAGE_PATH>
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: node_type
operator: In
values:
- ton-validator
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: validator-engine-pvc
spec:
storageClassName: local-storage
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 800Gi