Skip to content

Commit

Permalink
wb | support public routing when using perf-ssd Nomad cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaste authored and mgmeier committed May 8, 2024
1 parent 44e2705 commit 6f5eab3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nix/workbench/backend/nomad-job.nix
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,12 @@ let
# address of an AWS EC2 instance set this to
# ${attr.unique.platform.aws.public-ipv4}.
address =
# When using the dedicated P&T Nomad cluster on AWS we use public
# IPs/routing, all the other cloud runs are behind a VPC/firewall.
# Local runs just use 12.0.0.1.
if lib.strings.hasInfix "-nomadperf" profileData.profileName
# When using dedicated Nomad clusters on AWS we want to use public
# IPs/routing, all the other cloud runs will run behind a
# VPC/firewall.
if profileData.value.cluster.aws.use_public_routing
then "\${attr.unique.platform.aws.public-ipv4}"
else ""
else "" # Local runs just use 127.0.0.1.
;
# Specifies the port to advertise for this service. The value of
# port depends on which address_mode is being used:
Expand Down Expand Up @@ -1398,7 +1398,7 @@ let
[
# Address string to
(
if lib.strings.hasInfix "-nomadperf" profileData.profileName
if profileData.value.cluster.aws.use_public_routing
then ''--host-addr {{ env "attr.unique.platform.aws.local-ipv4" }}''
else ''--host-addr 0.0.0.0''
)
Expand Down
2 changes: 2 additions & 0 deletions nix/workbench/profile/prof0-defaults.jq
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def era_defaults($era):
{ producer: "c5.2xlarge"
, explorer: "m5.4xlarge"
}
# "attr.unique.platform.aws.public-ipv4" to bind and service definition.
, use_public_routing: false
}
, minimun_storage:
{ producer: 12582912 # 12×1024×1024
Expand Down
2 changes: 2 additions & 0 deletions nix/workbench/profile/prof1-variants.jq
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def all_profile_variants:
{ producer: "c5.2xlarge"
, explorer: "m5.4xlarge"
}
, use_public_routing: true
}
# We are requiring 10.5GB on the explorer node and 9GB on the others.
, minimun_storage:
Expand Down Expand Up @@ -243,6 +244,7 @@ def all_profile_variants:
{ producer: "r5.4xlarge"
, explorer: null
}
, use_public_routing: true
}
, minimun_storage: null
, keep_running: true
Expand Down

0 comments on commit 6f5eab3

Please sign in to comment.