add wireguard connectivity between nodes

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2019-10-04 09:46:03 -04:00
parent 2e34c8746e
commit c0515d4802
No known key found for this signature in database
GPG key ID: A519480096146526
11 changed files with 640 additions and 180 deletions

View file

@ -89,11 +89,17 @@ func main() {
Value: "10.254.0.0/16",
EnvVar: "HEIMDALL_PEER_NETWORK",
},
cli.StringFlag{
Name: "gateway-ip",
Usage: "IP used for peer communication",
Value: heimdall.GetIP(),
EnvVar: "HEIMDALL_GATEWAY_IP",
},
cli.IntFlag{
Name: "wireguard-port",
Usage: "wireguard port for peers",
Name: "gateway-port",
Usage: "port for peer communication",
Value: 10100,
EnvVar: "HEIMDALL_WIREGUARD_PORT",
EnvVar: "HEIMDALL_GATEWAY_PORT",
},
}
app.Before = func(c *cli.Context) error {

View file

@ -46,7 +46,8 @@ func runServer(cx *cli.Context) error {
GRPCPeerAddress: cx.String("peer"),
ClusterKey: cx.String("cluster-key"),
PeerNetwork: cx.String("peer-network"),
WireguardPort: cx.Int("wireguard-port"),
GatewayIP: cx.String("gateway-ip"),
GatewayPort: cx.Int("gateway-port"),
RedisURL: cx.String("redis-url"),
AdvertiseRedisURL: cx.String("advertise-redis-url"),
}