mirror of
https://github.com/vacp2p/10ksim.git
synced 2026-01-09 22:27:57 -05:00
Update waku regression example (#65)
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: bootstrap
|
||||
namespace: zerotesting
|
||||
spec:
|
||||
replicas: 3
|
||||
podManagementPolicy: "Parallel"
|
||||
serviceName: zerotesting-bootstrap
|
||||
selector:
|
||||
matchLabels:
|
||||
app: zerotenkay-bootstrap
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: zerotenkay-bootstrap
|
||||
spec:
|
||||
dnsConfig:
|
||||
searches:
|
||||
- zerotesting-service.zerotesting.svc.cluster.local
|
||||
- zerotesting-bootstrap.zerotesting.svc.cluster.local
|
||||
containers:
|
||||
- name: waku
|
||||
image: soutullostatus/nwaku-jq-curl:v0.34.0-rc1
|
||||
imagePullPolicy: IfNotPresent
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8008
|
||||
successThreshold: 3
|
||||
initialDelaySeconds: 1
|
||||
periodSeconds: 3
|
||||
failureThreshold: 1
|
||||
timeoutSeconds: 5
|
||||
env:
|
||||
- name: IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "768Mi"
|
||||
cpu: "400m"
|
||||
ports:
|
||||
- containerPort: 8645
|
||||
- containerPort: 8008
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
/usr/bin/wakunode --relay=false --rest=true --rest-address=0.0.0.0 --max-connections=1000 --discv5-discovery=true --discv5-enr-auto-update=True --log-level=INFO --metrics-server=True --metrics-server-address=0.0.0.0 --nat=extip:$IP --cluster-id=2
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
NODES_YAML=("nodes_1k.yaml" "nodes_2k.yaml" "nodes_3k.yaml")
|
||||
PUBLISHER_YAML=("publisher_msg1s.yaml" "publisher_msg5s.yaml" "publisher_msg10s.yaml")
|
||||
|
||||
KUBECONFIG="<kubeconfig>"
|
||||
NAMESPACE="zerotesting"
|
||||
|
||||
# Nested loops to iterate over nodes and publisher files
|
||||
for nodes_file in "${NODES_YAML[@]}"; do
|
||||
for publisher_file in "${PUBLISHER_YAML[@]}"; do
|
||||
# Apply bootstrap
|
||||
kubectl --kubeconfig $KUBECONFIG apply -f bootstrap.yaml
|
||||
kubectl --kubeconfig $KUBECONFIG rollout status --watch --timeout=30000s statefulset/bootstrap -n $NAMESPACE
|
||||
|
||||
# Apply nodes configuration
|
||||
kubectl --kubeconfig $KUBECONFIG apply -f $nodes_file
|
||||
kubectl --kubeconfig $KUBECONFIG rollout status --watch --timeout=30000s statefulset/nodes-0 -n $NAMESPACE
|
||||
|
||||
## Apply publisher configuration
|
||||
kubectl --kubeconfig $KUBECONFIG apply -f $publisher_file
|
||||
sleep 20
|
||||
kubectl --kubeconfig $KUBECONFIG wait --for=condition=ready=False pod/publisher -n $NAMESPACE --timeout=-1s
|
||||
sleep 20
|
||||
|
||||
kubectl --kubeconfig $KUBECONFIG delete --all statefulset -n $NAMESPACE
|
||||
kubectl --kubeconfig $KUBECONFIG delete pod -n $NAMESPACE publisher
|
||||
sleep 600
|
||||
done
|
||||
done
|
||||
@@ -4,7 +4,7 @@ metadata:
|
||||
name: nodes-0
|
||||
namespace: zerotesting
|
||||
spec:
|
||||
replicas: 1000
|
||||
replicas: 100
|
||||
podManagementPolicy: "Parallel"
|
||||
serviceName: zerotesting-service
|
||||
selector:
|
||||
|
||||
@@ -10,9 +10,15 @@ spec:
|
||||
- zerotesting-service.zerotesting.svc.cluster.local
|
||||
containers:
|
||||
- name: publisher-container
|
||||
image: soutullostatus/publisher:v0.4.0
|
||||
image: soutullostatus/publisher:testing
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- python /app/traffic.py --messages=60 --msg-size-kbytes=1 --delay-seconds=10 --pubsub-topic="/waku/2/rs/2/0" --debug
|
||||
- |
|
||||
python /app/traffic.py \
|
||||
--messages=600 \
|
||||
--msg-size-kbytes=1 \
|
||||
--delay-seconds=1 \
|
||||
--pubsub-topic="/waku/2/rs/2/" \
|
||||
--protocols relay
|
||||
|
||||
@@ -10,9 +10,15 @@ spec:
|
||||
- zerotesting-service.zerotesting.svc.cluster.local
|
||||
containers:
|
||||
- name: publisher-container
|
||||
image: soutullostatus/publisher:v0.4.0
|
||||
image: soutullostatus/publisher:testing
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- python /app/traffic.py --messages=600 --msg-size-kbytes=1 --delay-seconds=1 --pubsub-topic="/waku/2/rs/2/0" --debug
|
||||
- |
|
||||
python /app/traffic.py \
|
||||
--messages=600 \
|
||||
--msg-size-kbytes=1 \
|
||||
--delay-seconds=1 \
|
||||
--pubsub-topic="/waku/2/rs/2/" \
|
||||
--protocols relay
|
||||
|
||||
@@ -10,9 +10,15 @@ spec:
|
||||
- zerotesting-service.zerotesting.svc.cluster.local
|
||||
containers:
|
||||
- name: publisher-container
|
||||
image: soutullostatus/publisher:v0.4.0
|
||||
image: soutullostatus/publisher:testing
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- python /app/traffic.py --messages=120 --msg-size-kbytes=1 --delay-seconds=5 --pubsub-topic="/waku/2/rs/2/0" --debug
|
||||
- |
|
||||
python /app/traffic.py \
|
||||
--messages=600 \
|
||||
--msg-size-kbytes=1 \
|
||||
--delay-seconds=1 \
|
||||
--pubsub-topic="/waku/2/rs/2/" \
|
||||
--protocols relay
|
||||
|
||||
Reference in New Issue
Block a user