Setup test environment as shown below.
Test Setup With single event producer and consumer and with 100*4 telemetry producers and 1 telemetry consumer (100 nodes of telemetry sending messages to single local router)
Test Setup showing client for events only
Running test client
qpid-ansible
(some issue couldn't run by tag)
#fresh install (not )
# ansible-playbook -i hosts main.yaml
READ FIRST
This script by default expects to run the qdrouterd threads on their own cores. By default qdrouterd uses 5 threads total. The formula is the number of configured workerThreads (default 4) plus one (for the core thread).
In order to configure this, you need to.
un comment affinity_enabled: True in group_vars/all
- affinity_enabled: True
- Run ansible playbook with --tags=setup-grub (sets grub.conf isolcpus: 3,4,5,6,7 and reboots) systemd file is created with /usr/bin/taskset -a 0x00F8 (ps: roles/common/templates/qpid-router-service.j2 )
If you do not run setup-grub then
1. comment affinity_enabled: true
#affinity_enabled: True
---
# Install router and client in STANDALONE (SINGLE SERVER) mode(router , reciever and sender all on same machine)
## Edit hosts file and add single server address
## Run playbook
1. --ansible-playbook -i hosts main.yaml --tags config-standalone,proton-client,router,start,status --limit standalone
## start proton client receiver
1. cd ~/proton-example/latency
2. ./proton-receiver -a localhost:5672 -i 1 -l -c 200
3.(which will display the current statistics every 10 seconds (-i 10), measure latency (-l), and stop after 200 messages (-c 200):)
## start proton sender
1. cd ~/proton-example/latency
2. ./proton-sender -a localhost:5672 -c 200 -l -m 100 -M 300
*. (start a proton-sender on another terminal. This will send 200 messages (-c 200) with latency data contained in the message (-l). Messages will be transmitted in a somewhat random frequency between 100 and 300 milliseconds (-m 100 -M 300))
---
# Running playbook to setup test environment as shown in picture above, with 2 central router and local routers on client nodes
~~~## Run only setup(if required only , sets up ssh and other stuff)~~~
~~~ansible-playbook -i hosts main.yaml --tags=setup~~~
## Install client and router on all nodes, two main centralized router will be installed on router nodes and local nodes on all client nodes (config tag will open firewall)
ansible-playbook -i hosts main.yaml --tags=proton-client,router,config
## Install only router as central router and local router and configure
ansible-playbook -i hosts main.yaml --tags=router,config
## Run routers
ansible-playbook -i hosts main.yaml --tags=start
### Check status if qpid routers are running
ansible-playbook -i hosts main.yaml --tags=status
(Check hosts file for details)
```
Central router ip :10.19.110.9 and 10.19.110.11
Event Sender: 10.19.110.15
Event Recevier: 10.19.110.17
Trafffic :10.19.110.1
10.19.110.3
10.19.110.21
10.19.110.23
# ~~cd 13nodes/source~~
#cd proton-examples/latency
# make -f proton,mk
####################### check 13nodes/utils folder for more stuff
#EVENT RECEVIER
./proton-receiver -t unicast/event -l -c -1 -a 10.19.110.17:5672
#EVENT SENDER
./proton-sender -t unicast/event -l -c -1 -S 1000 -m 10 -M 1000 -a 10.19.110.15:5672
#TRAFFIC RECEVEIR
./proton-receiver -t unicast/traffic -l -c -1 -a 10.19.110.25:5672
#For one instance
#TRAFFIC_SENDER One msg per sec
./proton-sender -t unicast/traffic -l -c -1 -s 1500 -S 1000 -m 1000 -M 1000 -a 10.19.110.15:5672
#For 100 instances
IP_ADDR=$(ip addr show | grep "inet " | grep 10.19.110.* | grep -v "127.0.0.1" | awk '{print $2}' | cut -d '/' -f 1)
for i in {1..100};do
./proton-sender -t unicast/traffic -l -c -1 -S 1000 -m 100 -M 100 -a $IP_ADDR:5672 &
done
#100 instances of traffic - use tmux for multiple windows
#$tmux
#$sh tmux_traffic_send_all.sh
#$
IP_ADDR=$(ip addr show | grep "inet " | grep 10.19.110.* | grep -v "127.0.0.1" | awk '{print $2}' | cut -d '/' -f 1)
for i in {1..100};do
./proton-sender -t unicast/traffic -l -c -1 -S 1000 -m 100 -M 100 -a $IP_ADDR:5672 &
done
```