Skip to content

Commit

Permalink
more network fix attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
manveru committed Jan 18, 2021
1 parent bca128f commit 0833549
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions jobs/catalyst-dryrun.nix
Expand Up @@ -35,11 +35,12 @@ let
};

networks = [{
# mode = "bridge";
mode = "host";
ports = {
prometheus.to = 6000;
rest.to = localRestPort;
rpc.to = localRpcPort;
rest.to = 7000;
rpc.to = 8000;
promtail.to = 9000;
};
}];

Expand All @@ -65,6 +66,7 @@ let
});

services."${namespace}-${name}-jormungandr" = {
addressMode = "host";
portLabel = "rpc";
task = "jormungandr";
tags = [ name role ] ++ (lib.optional public "ingress");
Expand All @@ -82,19 +84,22 @@ let
};

services."${namespace}-jormungandr" = {
addressMode = "host";
portLabel = "rpc";
task = "jormungandr";
tags = [ name "peer" role ];
};

services."${namespace}-jormungandr-internal" =
lib.mkIf (role != "backup") {
addressMode = "host";
portLabel = "rpc";
task = "jormungandr";
tags = [ name "peer" role ];
};

services."${namespace}-${name}-jormungandr-rest" = {
addressMode = "host";
portLabel = "rest";
task = "jormungandr";
tags = [ name role ];
Expand Down
4 changes: 2 additions & 2 deletions jobs/tasks/monitor.nix
Expand Up @@ -16,8 +16,8 @@
templates = [{
data = ''
SLEEP_TIME="10"
PORT="{{ env "NOMAD_PORT_prometheus" }}"
JORMUNGANDR_API="http://{{ env "NOMAD_ADDR_rest" }}/api"
PORT="{{ env "NOMAD_HOST_PORT_prometheus" }}"
JORMUNGANDR_API="http://{{ env "NOMAD_HOST_ADDR_rest" }}/api"
'';
env = true;
destination = "local/env.txt";
Expand Down
2 changes: 1 addition & 1 deletion jobs/tasks/promtail.nix
Expand Up @@ -10,7 +10,7 @@
templates = [{
data = ''
server:
http_listen_port: 9080
http_listen_port: {{ env "NOMAD_PORT_promtail" }}
grpc_listen_port: 0
positions:
Expand Down

0 comments on commit 0833549

Please sign in to comment.