1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-12 19:22:37 +00:00
ton/docker/ton-gcp.yaml
neodix42 2792fc22f1
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 14:59:08 +03:00

134 lines
3 KiB
YAML

apiVersion: "apps/v1"
kind: StatefulSet
metadata:
name: validator-engine-pod
labels:
name: validator-engine-pod
spec:
volumeClaimTemplates:
- metadata:
name: validator-engine-pvc
spec:
storageClassName: standard-rwo
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 800Gi
serviceName: validator-engine-srv-headless
replicas: 1
selector:
matchLabels:
name: validator-engine-pod
template:
metadata:
labels:
name: validator-engine-pod
spec:
containers:
- name: validator-engine-container
image: ghcr.io/neodix42/ton:latest
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"
ports:
- containerPort: 30001
protocol: UDP
- containerPort: 30002
protocol: TCP
- containerPort: 30003
protocol: TCP
volumeMounts:
- mountPath: "/var/ton-work/db"
name: validator-engine-pvc
resources:
requests:
memory: "64Gi"
cpu: "16"
limits:
memory: "128Gi"
cpu: "32"
---
kind: Service
apiVersion: v1
metadata:
name: validator-engine-srv
spec:
type: LoadBalancer
loadBalancerIP: <PUBLIC_IP>
ports:
- port: 30001
targetPort: 30001
protocol: UDP
selector:
name: validator-engine-pod
---
kind: Service
apiVersion: v1
metadata:
name: validator-engine-console-srv
spec:
type: LoadBalancer
loadBalancerIP: <PUBLIC_IP>
ports:
- port: 30002
targetPort: 30002
protocol: TCP
selector:
name: validator-engine-pod
---
kind: Service
apiVersion: v1
metadata:
name: lite-server-srv
spec:
type: LoadBalancer
loadBalancerIP: <PUBLIC_IP>
ports:
- port: 30003
targetPort: 30003
protocol: TCP
selector:
name: validator-engine-pod
---
apiVersion: v1
kind: Service
metadata:
name: validator-engine-srv-headless
spec:
clusterIP: None
ports:
- name: validator-udp
port: 30001
targetPort: 30001
protocol: UDP
- name: console-tcp
port: 30002
targetPort: 30002
protocol: TCP
- name: ls-tcp
port: 30003
targetPort: 30003
protocol: TCP
selector:
name: validator-engine-pod