diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-08-06 11:14:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-06 11:14:02 +0800 |
commit | bb95322f46524ea52b6762c349905dcc910814c8 (patch) | |
tree | cf53a3b40e5eaba66eb8d837215650fab9b6150c /simulation/kubernetes | |
parent | 4b606c3c12db824cb996d9eca43c1b66b2bdb440 (diff) | |
download | dexon-consensus-bb95322f46524ea52b6762c349905dcc910814c8.tar dexon-consensus-bb95322f46524ea52b6762c349905dcc910814c8.tar.gz dexon-consensus-bb95322f46524ea52b6762c349905dcc910814c8.tar.bz2 dexon-consensus-bb95322f46524ea52b6762c349905dcc910814c8.tar.lz dexon-consensus-bb95322f46524ea52b6762c349905dcc910814c8.tar.xz dexon-consensus-bb95322f46524ea52b6762c349905dcc910814c8.tar.zst dexon-consensus-bb95322f46524ea52b6762c349905dcc910814c8.zip |
simulation: free resource after use and misc fix for k8s mode (#31)
Diffstat (limited to 'simulation/kubernetes')
-rw-r--r-- | simulation/kubernetes/config.toml.in | 1 | ||||
-rwxr-xr-x | simulation/kubernetes/run_simulation.sh | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/simulation/kubernetes/config.toml.in b/simulation/kubernetes/config.toml.in index d956055..b46e8d6 100644 --- a/simulation/kubernetes/config.toml.in +++ b/simulation/kubernetes/config.toml.in @@ -4,6 +4,7 @@ title = "DEXON Consensus Simulation Config" num = {{numValidators}} propose_interval_mean = 5e+02 propose_interval_sigma = 3e+01 +max_block = 100 [networking] type = "tcp" diff --git a/simulation/kubernetes/run_simulation.sh b/simulation/kubernetes/run_simulation.sh index 88f9eee..c5298d7 100755 --- a/simulation/kubernetes/run_simulation.sh +++ b/simulation/kubernetes/run_simulation.sh @@ -14,11 +14,20 @@ build_docker_image() { } start_simulation() { - kubectl delete deployment --all --force --grace-period=0 + kubectl delete deployment dexcon-simulation --force --grace-period=0 + kubectl delete deployment dexcon-simulation-peer-server --force --grace-period=0 sleep 10 kubectl apply -f peer-server.yaml - sleep 10 + + while true; do + if kubectl get pods -l app=dexcon-simulation-peer-server | grep Running; + then + break + fi + sleep 1 + done + kubectl apply -f validator.yaml } |