From ed2db1f39829dd5c01fc7b3395bb48b432f854af Mon Sep 17 00:00:00 2001 From: iknite Date: Mon, 4 Feb 2019 14:32:09 +0100 Subject: [PATCH] Refactor agents endpoints 9300->8300, 9200->8200, 9100->8100 --- config.example.yml | 4 ++-- deploy/aws/main.tf | 6 +++--- docs/advanced_usage.md | 8 ++++---- tests/e2e/setup.go | 6 +++--- tests/gossip/run_gossip.sh | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/config.example.yml b/config.example.yml index 2635cc116..0ffbd3d8a 100644 --- a/config.example.yml +++ b/config.example.yml @@ -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" diff --git a/deploy/aws/main.tf b/deploy/aws/main.tf index 55b61e6fe..9aef5f1c4 100644 --- a/deploy/aws/main.tf +++ b/deploy/aws/main.tf @@ -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" @@ -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" @@ -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" diff --git a/docs/advanced_usage.md b/docs/advanced_usage.md index 313dbcd50..583c0d608 100644 --- a/docs/advanced_usage.md +++ b/docs/advanced_usage.md @@ -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" @@ -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 \ @@ -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 \ @@ -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 \ diff --git a/tests/e2e/setup.go b/tests/e2e/setup.go index 81d4e94f1..be5cc4028 100644 --- a/tests/e2e/setup.go +++ b/tests/e2e/setup.go @@ -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} diff --git a/tests/gossip/run_gossip.sh b/tests/gossip/run_gossip.sh index e6de0792d..9fee18a83 100755 --- a/tests/gossip/run_gossip.sh +++ b/tests/gossip/run_gossip.sh @@ -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