Skip to content

Commit

Permalink
Set raft self IP
Browse files Browse the repository at this point in the history
  • Loading branch information
suizman authored and iknite committed Feb 19, 2019
1 parent a63b904 commit 2ec809a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions deploy/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module "leader" {
addr:
http: ":8800"
mgmt: ":8700"
raft: ":8500"
raft: "MYIP:8500"
gossip: ":8400"
CONFIG

Expand All @@ -64,7 +64,7 @@ module "follower-1" {
addr:
http: ":8800"
mgmt: ":8700"
raft: ":8500"
raft: "MYIP:8500"
gossip: ":8400"
raft_join:
- "${module.leader.private_ip}:8700"
Expand Down Expand Up @@ -94,7 +94,7 @@ module "follower-2" {
addr:
http: ":8800"
mgmt: ":8700"
raft: ":8500"
raft: "MYIP:8500"
gossip: ":8400"
raft_join:
- "${module.leader.private_ip}:8700"
Expand Down
3 changes: 3 additions & 0 deletions deploy/aws/modules/qed/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ resource "aws_instance" "qed-server" {
chmod +x ${var.path}/node_exporter
${var.path}/node_exporter &
# TONIGHT WE DINE IN HELL
sed -i "s/MYIP/$(ifconfig | awk '/inet addr/{print substr($2,6)}' | head -1)/g" ${var.path}/config.yml
${var.path}/qed ${var.command}
DATA
Expand Down

0 comments on commit 2ec809a

Please sign in to comment.