Skip to content

Commit

Permalink
Refactor port for raft-addr 9000->8500
Browse files Browse the repository at this point in the history
  • Loading branch information
iknite committed Feb 19, 2019
1 parent fd08649 commit 10aafcf
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func newStartCommand(ctx *cmdContext) *cobra.Command {
f.StringVar(&conf.SSLCertificateKey, "certificate-key", fmt.Sprintf("%s/%s", ctx.path, "server.key"), "Server key file")

f.StringVar(&conf.HTTPAddr, "http-addr", ":8800", "Endpoint for REST requests on (host:port)")
f.StringVar(&conf.RaftAddr, "raft-addr", ":9000", "Raft bind address (host:port)")
f.StringVar(&conf.RaftAddr, "raft-addr", ":8500", "Raft bind address (host:port)")
f.StringVar(&conf.MgmtAddr, "mgmt-addr", ":8700", "Management endpoint bind address (host:port)")
f.StringVar(&conf.MgmtAddr, "metrics-addr", ":8600", "Metrics export bind address (host:port)")
f.StringSliceVar(&conf.RaftJoinAddr, "join-addr", []string{}, "Raft: Comma-delimited list of nodes ([host]:port), through which a cluster can be joined")
Expand Down
2 changes: 1 addition & 1 deletion config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ server:
http: ":8800" # Endpoint for REST requests on (host:port).
mgmt: ":8700" # Management endpoint bind address (host:port).
metrics: ":8600" # Metrics endpoint (host:port). where raft node can join the current cluster
raft: ":9000" # Raft bind address (host:port). internal message passing
raft: ":8500" # Raft bind address (host:port). internal message passing
raft_join: # Raft: list of nodes ([host]:port), where the node can join the cluster using the mgmt endpoint
- "127.0.0.1:8700"
gossip: ":9100" # Gossip: management endpoint bind address (host:port).
Expand Down
6 changes: 3 additions & 3 deletions deploy/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module "leader" {
addr:
http: ":8800"
mgmt: ":8700"
raft: ":9000"
raft: ":8500"
gossip: ":9100"
CONFIG

Expand All @@ -62,7 +62,7 @@ module "follower-1" {
addr:
http: ":8800"
mgmt: ":8700"
raft: ":9000"
raft: ":8500"
gossip: ":9100"
raft_join:
- "${module.leader.private_ip}:8700"
Expand Down Expand Up @@ -91,7 +91,7 @@ module "follower-2" {
addr:
http: ":8800"
mgmt: ":8700"
raft: ":9000"
raft: ":8500"
gossip: ":9100"
raft_join:
- "${module.leader.private_ip}:8700"
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ go run main.go start \
--raftpath $(mktemp -d /var/tmp/demo.XXX) \
-y ~/.ssh/id_ed25519-qed \
--http-addr :8800 \
--raft-addr :9000 \
--raft-addr :8500 \
--mgmt-addr :8700 \
-l error
```
Expand Down
2 changes: 1 addition & 1 deletion server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func DefaultConfig() *Config {
APIKey: "",
NodeID: hostname,
HTTPAddr: "127.0.0.1:8800",
RaftAddr: "127.0.0.1:9000",
RaftAddr: "127.0.0.1:8500",
MgmtAddr: "127.0.0.1:8700",
MetricsAddr: "127.0.0.1:8600",
RaftJoinAddr: []string{},
Expand Down
2 changes: 1 addition & 1 deletion tests/cloud/aws/templates/start_master
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ echo Create id_ed25519 key
yes | ssh-keygen -t ed25519 -N '' -f /var/tmp/id_ed25519

echo Starting server...
nohup /tmp/to_upload/qed start -k pepe -p $(mktemp -d /var/tmp/demo.XXX) --raftpath $(mktemp -d /var/tmp/demo.XXX) -y /var/tmp/id_ed25519 -l error --http-addr ${master_address}:8800 --raft-addr ${master_address}:9000 --mgmt-addr ${master_address}:8700 &
nohup /tmp/to_upload/qed start -k pepe -p $(mktemp -d /var/tmp/demo.XXX) --raftpath $(mktemp -d /var/tmp/demo.XXX) -y /var/tmp/id_ed25519 -l error --http-addr ${master_address}:8800 --raft-addr ${master_address}:8500 --mgmt-addr ${master_address}:8700 &
echo done.

sleep 10
2 changes: 1 addition & 1 deletion tests/demo/start-leader
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ echo Create id_ed25519 key
ssh-keygen -t ed25519 -N '' -f /var/tmp/id_ed25519

echo 'Starting leader...'
go run ../../main.go start -k pepe -p $(mktemp -d /var/tmp/demo.XXX) --raftpath $(mktemp -d /var/tmp/demo.XXX) -y /var/tmp/id_ed25519 -l debug --http-addr :8800 --raft-addr :9000 --mgmt-addr :8700
go run ../../main.go start -k pepe -p $(mktemp -d /var/tmp/demo.XXX) --raftpath $(mktemp -d /var/tmp/demo.XXX) -y /var/tmp/id_ed25519 -l debug --http-addr :8800 --raft-addr :8500 --mgmt-addr :8700
echo done.

echo Cleanup...
Expand Down
2 changes: 1 addition & 1 deletion tests/gossip/run_gossip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ ! -f "$keyFile" ]; then
echo -e 'y\n' | ssh-keygen -t ed25519 -N '' -f /var/tmp/id_ed25519
fi

$QED start -k key -l silent --node-id server0 --gossip-addr $qedGossipEndpoint --raft-addr 127.0.0.1:9000 -y $keyFile &
$QED start -k key -l silent --node-id server0 --gossip-addr $qedGossipEndpoint --raft-addr 127.0.0.1:8500 -y $keyFile &
pids[0]=$!
sleep 2s

Expand Down
4 changes: 2 additions & 2 deletions tests/start_server
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ fi
if [ -z "$CLUSTER_SIZE" ]
then
echo Starting single server...
go run ../main.go start -k pepe -p /var/tmp/demo.dbpath --raftpath /var/tmp/demo.raftpath -y /var/tmp/id_ed25519 -l error --http-addr :8800 --raft-addr :9000 --mgmt-addr :8700 $PROFILING &
go run ../main.go start -k pepe -p /var/tmp/demo.dbpath --raftpath /var/tmp/demo.raftpath -y /var/tmp/id_ed25519 -l error --http-addr :8800 --raft-addr :8500 --mgmt-addr :8700 $PROFILING &
sleep 10
echo done.
else
echo Starting cluster mode...
go run ../main.go start -k pepe -p $(mktemp -d /var/tmp/demo.XXX) --raftpath $(mktemp -d /var/tmp/demo.XXX) -y /var/tmp/id_ed25519 -l error --http-addr :8800 --raft-addr :9000 --mgmt-addr :8700 $PROFILING &
go run ../main.go start -k pepe -p $(mktemp -d /var/tmp/demo.XXX) --raftpath $(mktemp -d /var/tmp/demo.XXX) -y /var/tmp/id_ed25519 -l error --http-addr :8800 --raft-addr :8500 --mgmt-addr :8700 $PROFILING &
sleep 10
echo Starting followers
for i in $(seq 1 $CLUSTER_SIZE); do
Expand Down

0 comments on commit 10aafcf

Please sign in to comment.