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:
|
spec:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
podManagementPolicy: "Parallel"
|
podManagementPolicy: "Parallel"
|
||||||
serviceName: zerotesting-service
|
serviceName: zerotesting-bootstrap
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: zerotenkay
|
app: zerotenkay-bootstrap
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: zerotenkay
|
app: zerotenkay-bootstrap
|
||||||
spec:
|
spec:
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: "zerotesting"
|
- key: "zerotesting"
|
||||||
|
@ -30,7 +30,7 @@ spec:
|
||||||
- key: app
|
- key: app
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- zerotenkay
|
- zerotenkay-bootstrap
|
||||||
topologyKey: "kubernetes.io/hostname"
|
topologyKey: "kubernetes.io/hostname"
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
@ -43,6 +43,7 @@ spec:
|
||||||
dnsConfig:
|
dnsConfig:
|
||||||
searches:
|
searches:
|
||||||
- zerotesting-service.zerotesting.svc.cluster.local
|
- zerotesting-service.zerotesting.svc.cluster.local
|
||||||
|
- zerotesting-bootstrap.zerotesting.svc.cluster.local
|
||||||
containers:
|
containers:
|
||||||
- name: waku
|
- name: waku
|
||||||
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst
|
image: harbor2.riff.cc/localmirror/wakuorg/nwaku:wakunode_dst
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
# Number of ENRs to process, default to 3 if not specified
|
# Number of ENRs to process, default to 3 if not specified
|
||||||
num_enrs=${1:-3}
|
num_enrs=${1:-3}
|
||||||
|
|
||||||
# Find the IPv4 IPs of "zerotesting-service.zerotesting" using nslookup
|
# Find the IPv4 IPs of "zerotesting-bootstrap.zerotesting" using nslookup
|
||||||
readarray -t pod_ips < <(nslookup zerotesting-service.zerotesting | awk '/^Address: / { print $2 }' | head -n "$num_enrs")
|
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
|
# Shuffle the IPs before processing them to help randomise which nodes we connect to and peer with
|
||||||
# Disabled for now
|
# Disabled for now
|
||||||
|
|
|
@ -6,14 +6,14 @@ metadata:
|
||||||
spec:
|
spec:
|
||||||
replicas: 30
|
replicas: 30
|
||||||
podManagementPolicy: "Parallel"
|
podManagementPolicy: "Parallel"
|
||||||
serviceName: zerotesting-service
|
serviceName: zerotesting-bootstrap
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: zerotenkay
|
app: zerotenkay-bootstrap
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: zerotenkay
|
app: zerotenkay-bootstrap
|
||||||
spec:
|
spec:
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: "zerotesting"
|
- key: "zerotesting"
|
||||||
|
@ -30,7 +30,7 @@ spec:
|
||||||
- key: app
|
- key: app
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- zerotenkay
|
- zerotenkay-bootstrap
|
||||||
topologyKey: "kubernetes.io/hostname"
|
topologyKey: "kubernetes.io/hostname"
|
||||||
nodeAffinity:
|
nodeAffinity:
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
@ -43,6 +43,7 @@ spec:
|
||||||
dnsConfig:
|
dnsConfig:
|
||||||
searches:
|
searches:
|
||||||
- zerotesting-service.zerotesting.svc.cluster.local
|
- zerotesting-service.zerotesting.svc.cluster.local
|
||||||
|
- zerotesting-bootstrap.zerotesting.svc.cluster.local
|
||||||
volumes:
|
volumes:
|
||||||
- name: enr-data
|
- name: enr-data
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
@ -68,9 +69,9 @@ spec:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -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 /{
|
awk '!/^#/ && /^libp2p_gossipsub_healthy_peers_topics /{
|
||||||
print "Found gossipsub:", $0;
|
print "Found gossipsub:", $0;
|
||||||
if ($2 == 1.0) {
|
if ($2 == 1.0) {
|
||||||
exit 0; # success, healthy state
|
exit 0; # success, healthy state
|
||||||
} else {
|
} else {
|
||||||
|
@ -100,4 +101,4 @@ spec:
|
||||||
- |
|
- |
|
||||||
. /etc/enr/enr.env
|
. /etc/enr/enr.env
|
||||||
echo $ENR1 $ENR2 $ENR3
|
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
|
- /bin/sh
|
||||||
- -c
|
- -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 /{
|
awk '!/^#/ && /^libp2p_gossipsub_healthy_peers_topics /{
|
||||||
print "Found gossipsub:", $0;
|
print "Found gossipsub:", $0;
|
||||||
if ($2 == 1.0) {
|
if ($2 == 1.0) {
|
||||||
exit 0; # success, healthy state
|
exit 0; # success, healthy state
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -24,4 +24,4 @@ spec:
|
||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -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