Skip to content

Commit

Permalink
Refactor agents endpoints 9300->8300, 9200->8200, 9100->8100
Browse files Browse the repository at this point in the history
  • Loading branch information
iknite committed Feb 19, 2019
1 parent 27cc343 commit ed2db1f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ client:
# Agent Configuration
###############################################################################
agent:
node: "nodeName" # Unique name for node. If not set, fallback to hostname
bind: ":9200" # Bind address for TCP/UDP gossip on (host:port)
node: "nodeName" # Role for node, it can be only `auditor`, `monitor` or `publisher`
bind: ":8200" # Bind address for TCP/UDP gossip on (host:port)
advertise: "" # Address to advertise to cluster
join: # Comma-delimited list of nodes ([host]:port), through which a cluster can be joined
- "127.0.0.1:8400"
Expand Down
6 changes: 3 additions & 3 deletions deploy/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ module "follower-2" {
# path: "/var/tmp/qed/"
# agent:
# node: "publisher"
# bind: ":9300"
# bind: ":8300"
# advertise: ""
# join:
# - "${module.leader.private_ip}:8400"
Expand Down Expand Up @@ -159,7 +159,7 @@ module "follower-2" {
# path: "/var/tmp/qed/"
# agent:
# node: "monitor"
# bind: ":9200"
# bind: ":8200"
# advertise: ""
# join:
# - "${module.leader.private_ip}:8400"
Expand Down Expand Up @@ -189,7 +189,7 @@ module "follower-2" {
# path: "/var/tmp/qed/"
# agent:
# node: "auditor"
# bind: ":8400"
# bind: ":8100"
# advertise: ""
# join:
# - "${module.leader.private_ip}:8400"
Expand Down
8 changes: 4 additions & 4 deletions docs/advanced_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ To be production-ready, both services must be developed and deployed separatelly

```bash
# this variables will be used in all the publiser, auditor and monitor examples.
export masterEndpoint="127.0.0.1:8400"
export masterEndpoint="127.0.0.1:8100"
export publisherEndpoint="http://127.0.0.1:8888"
export alertsEndpoint="http://127.0.0.1:8888"
export qedEndpoint="http://127.0.0.1:8800"
Expand All @@ -95,7 +95,7 @@ go run main.go agent \
--alertsUrls $alertsEndpoint \
publisher \
-k my-key \
--bind 127.0.0.1:9300 \
--bind 127.0.0.1:8300 \
--join $masterEndpoint \
--endpoints $publisherEndpoint \
--node publisher0 \
Expand All @@ -109,7 +109,7 @@ go run main.go agent \
--alertsUrls $alertsEndpoint \
auditor \
-k my-key \
--bind 127.0.0.1:8400 \
--bind 127.0.0.1:8100 \
--join $masterEndpoint \
--qedUrls $qedEndpoint \
--pubUrls $publisherEndpoint \
Expand All @@ -124,7 +124,7 @@ go run main.go agent \
--alertsUrls $alertsEndpoint \
monitor \
-k my-key \
--bind 127.0.0.1:9200 \
--bind 127.0.0.1:8200 \
--join $masterEndpoint \
--endpoints $qedEndpoint \
--node monitor0 \
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ func newAgent(id int, name string, role member.Type, p gossip.Processor, t *test

switch role {
case member.Auditor:
agentConf.BindAddr = fmt.Sprintf("127.0.0.1:910%d", id)
agentConf.BindAddr = fmt.Sprintf("127.0.0.1:810%d", id)
case member.Monitor:
agentConf.BindAddr = fmt.Sprintf("127.0.0.1:920%d", id)
agentConf.BindAddr = fmt.Sprintf("127.0.0.1:820%d", id)
case member.Publisher:
agentConf.BindAddr = fmt.Sprintf("127.0.0.1:930%d", id)
agentConf.BindAddr = fmt.Sprintf("127.0.0.1:830%d", id)
}

agentConf.StartJoin = []string{QEDGossip}
Expand Down
6 changes: 3 additions & 3 deletions tests/gossip/run_gossip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ sleep 2s

for i in `seq 1 $1`;
do
xterm -hold -e "$QED agent --alertsUrls $alertsStoreEndpoint auditor -k key -l info --bind 127.0.0.1:910$i --join $qedGossipEndpoint --qedUrls $qedHTTPEndpoint --pubUrls $snapshotStoreEndpoint --node auditor$i" &
xterm -hold -e "$QED agent --alertsUrls $alertsStoreEndpoint auditor -k key -l info --bind 127.0.0.1:810$i --join $qedGossipEndpoint --qedUrls $qedHTTPEndpoint --pubUrls $snapshotStoreEndpoint --node auditor$i" &
pids+=($!)
done

for i in `seq 1 $2`;
do
xterm -hold -e "$QED agent --alertsUrls $alertsStoreEndpoint monitor -k key -l info --bind 127.0.0.1:920$i --join $qedGossipEndpoint --qedUrls $qedHTTPEndpoint --pubUrls $snapshotStoreEndpoint --node monitor$i" &
xterm -hold -e "$QED agent --alertsUrls $alertsStoreEndpoint monitor -k key -l info --bind 127.0.0.1:820$i --join $qedGossipEndpoint --qedUrls $qedHTTPEndpoint --pubUrls $snapshotStoreEndpoint --node monitor$i" &
pids+=($!)
done

for i in `seq 1 $3`;
do
xterm -hold -e "$QED agent --alertsUrls $alertsStoreEndpoint publisher -k key -l info --bind 127.0.0.1:930$i --join $qedGossipEndpoint --endpoints $snapshotStoreEndpoint --node publisher$i" &
xterm -hold -e "$QED agent --alertsUrls $alertsStoreEndpoint publisher -k key -l info --bind 127.0.0.1:830$i --join $qedGossipEndpoint --endpoints $snapshotStoreEndpoint --node publisher$i" &
pids+=($!)
done

Expand Down

0 comments on commit ed2db1f

Please sign in to comment.