mirror of https://github.com/vacp2p/10ksim.git
Updates for bootstrap-midstrap separation from node service
This commit is contained in:
parent
ce3a3d878b
commit
66c2fd4da2
|
@ -6,14 +6,14 @@ metadata:
|
|||
spec:
|
||||
replicas: 3
|
||||
podManagementPolicy: "Parallel"
|
||||
serviceName: zerotesting-service
|
||||
serviceName: zerotesting-bootstrap
|
||||
selector:
|
||||
matchLabels:
|
||||
app: zerotenkay
|
||||
app: zerotenkay-bootstrap
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: zerotenkay
|
||||
app: zerotenkay-bootstrap
|
||||
spec:
|
||||
tolerations:
|
||||
- key: "zerotesting"
|
||||
|
@ -30,7 +30,7 @@ spec:
|
|||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- zerotenkay
|
||||
- zerotenkay-bootstrap
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
|
@ -43,6 +43,7 @@ spec:
|
|||
dnsConfig:
|
||||
searches:
|
||||
- zerotesting-service.zerotesting.svc.cluster.local
|
||||
- zerotesting-bootstrap.zerotesting.svc.cluster.local
|
||||
containers:
|
||||
- name: waku
|
||||
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
# Number of ENRs to process, default to 3 if not specified
|
||||
num_enrs=${1:-3}
|
||||
|
||||
# Find the IPv4 IPs of "zerotesting-service.zerotesting" using nslookup
|
||||
readarray -t pod_ips < <(nslookup zerotesting-service.zerotesting | awk '/^Address: / { print $2 }' | head -n "$num_enrs")
|
||||
# Find the IPv4 IPs of "zerotesting-bootstrap.zerotesting" using nslookup
|
||||
readarray -t pod_ips < <(nslookup zerotesting-bootstrap.zerotesting | awk '/^Address: / { print $2 }' | head -n "$num_enrs")
|
||||
|
||||
# Shuffle the IPs before processing them to help randomise which nodes we connect to and peer with
|
||||
# Disabled for now
|
||||
|
|
|
@ -6,14 +6,14 @@ metadata:
|
|||
spec:
|
||||
replicas: 30
|
||||
podManagementPolicy: "Parallel"
|
||||
serviceName: zerotesting-service
|
||||
serviceName: zerotesting-bootstrap
|
||||
selector:
|
||||
matchLabels:
|
||||
app: zerotenkay
|
||||
app: zerotenkay-bootstrap
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: zerotenkay
|
||||
app: zerotenkay-bootstrap
|
||||
spec:
|
||||
tolerations:
|
||||
- key: "zerotesting"
|
||||
|
@ -30,7 +30,7 @@ spec:
|
|||
- key: app
|
||||
operator: In
|
||||
values:
|
||||
- zerotenkay
|
||||
- zerotenkay-bootstrap
|
||||
topologyKey: "kubernetes.io/hostname"
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
|
@ -43,6 +43,7 @@ spec:
|
|||
dnsConfig:
|
||||
searches:
|
||||
- zerotesting-service.zerotesting.svc.cluster.local
|
||||
- zerotesting-bootstrap.zerotesting.svc.cluster.local
|
||||
volumes:
|
||||
- name: enr-data
|
||||
emptyDir: {}
|
||||
|
@ -68,9 +69,9 @@ spec:
|
|||
- /bin/sh
|
||||
- -c
|
||||
- >
|
||||
wget -O - --retry-connrefused http://127.0.0.1:8008/metrics |
|
||||
wget -O - --retry-connrefused http://127.0.0.1:8008/metrics |
|
||||
awk '!/^#/ && /^libp2p_gossipsub_healthy_peers_topics /{
|
||||
print "Found gossipsub:", $0;
|
||||
print "Found gossipsub:", $0;
|
||||
if ($2 == 1.0) {
|
||||
exit 0; # success, healthy state
|
||||
} else {
|
||||
|
@ -100,4 +101,4 @@ spec:
|
|||
- |
|
||||
. /etc/enr/enr.env
|
||||
echo $ENR1 $ENR2 $ENR3
|
||||
/usr/bin/wakunode --relay=true --rpc-admin=true --max-connections=1000 --rpc-address=0.0.0.0 --rest=true --rest-admin=true --rest-private=true --rest-address=0.0.0.0 --discv5-discovery=true --discv5-enr-auto-update=True --log-level=INFO --rpc-address=0.0.0.0 --metrics-server=True --metrics-server-address=0.0.0.0 --discv5-bootstrap-node=$ENR1 --discv5-bootstrap-node=$ENR2 --discv5-bootstrap-node=$ENR3 --nat=extip:${IP} --pubsub-topic="/waku/2/kubetopic"
|
||||
/usr/bin/wakunode --relay=true --rpc-admin=true --max-connections=1500 --rpc-address=0.0.0.0 --rest=true --rest-admin=true --rest-private=true --rest-address=0.0.0.0 --discv5-discovery=true --discv5-enr-auto-update=True --log-level=INFO --rpc-address=0.0.0.0 --metrics-server=True --metrics-server-address=0.0.0.0 --discv5-bootstrap-node=$ENR1 --discv5-bootstrap-node=$ENR2 --discv5-bootstrap-node=$ENR3 --nat=extip:${IP} --pubsub-topic="/waku/2/kubetopic"
|
||||
|
|
|
@ -72,9 +72,9 @@ spec:
|
|||
- /bin/sh
|
||||
- -c
|
||||
- >
|
||||
wget -O - --retry-connrefused http://127.0.0.1:8008/metrics |
|
||||
wget -O - --retry-connrefused http://127.0.0.1:8008/metrics |
|
||||
awk '!/^#/ && /^libp2p_gossipsub_healthy_peers_topics /{
|
||||
print "Found gossipsub:", $0;
|
||||
print "Found gossipsub:", $0;
|
||||
if ($2 == 1.0) {
|
||||
exit 0; # success, healthy state
|
||||
} else {
|
||||
|
|
|
@ -24,4 +24,4 @@ spec:
|
|||
command:
|
||||
- sh
|
||||
- -c
|
||||
- python /app/traffic.py --msg-size-kbytes=1 --delay-seconds=5 --debug
|
||||
- python /app/traffic.py --msg-size-kbytes=1 --delay-seconds=20 --debug
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: zerotesting-bootstrap
|
||||
namespace: zerotesting
|
||||
spec:
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: zerotenkay-bootstrap
|
|
@ -0,0 +1,9 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: zerotesting-service
|
||||
namespace: zerotesting
|
||||
spec:
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: zerotenkay
|
Loading…
Reference in New Issue