Skip to content

Commit

Permalink
SQUASH
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaste committed Nov 28, 2023
1 parent 11d26de commit f269aea
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 47 deletions.
2 changes: 1 addition & 1 deletion bench/cardano-topology/data/ci-test-nomadcwqa.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"producers": [
"node-0"
],
"region": "us-east-1",
"region": "us-east-2",
"stakePool": true
}
],
Expand Down
6 changes: 3 additions & 3 deletions bench/cardano-topology/data/default-nomadcwqa.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"node-3",
"node-5"
],
"region": "us-east-1",
"region": "us-east-2",
"stakePool": true
},
{
Expand All @@ -62,7 +62,7 @@
"node-5",
"node-1"
],
"region": "us-east-1",
"region": "us-east-2",
"stakePool": true
},
{
Expand All @@ -75,7 +75,7 @@
"node-1",
"node-3"
],
"region": "us-east-1",
"region": "us-east-2",
"stakePool": true
}
],
Expand Down
4 changes: 2 additions & 2 deletions bench/cardano-topology/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ topology = Tasty.testGroup
2
[
(Types.AWS Types.EU_CENTRAL_1)
, (Types.AWS Types.US_EAST_1)
, (Types.AWS Types.US_EAST_2)
]
(\_ -> Just 1)
)
Expand Down Expand Up @@ -132,7 +132,7 @@ topology = Tasty.testGroup
6
[
(Types.AWS Types.EU_CENTRAL_1)
, (Types.AWS Types.US_EAST_1)
, (Types.AWS Types.US_EAST_2)
]
(\_ -> Just 1)
)
Expand Down
6 changes: 4 additions & 2 deletions nix/workbench/backend/nomad-job.nix
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,10 @@ let

# A list of datacenters in the region which are eligible for task
# placement. This must be provided, and does not have a default.
# SRE: Only 3 Nomad datacenters exist actually.
datacenters = [ "eu-central-1" "us-east-2" "ap-southeast-2" ];
# What we currently have available:
# - Cardano World cluster: "eu-central-1", "us-east-2"
# - Dedicated P&T cluster: "eu-central-1", "us-east-1", and "ap-southeast-2"
datacenters = [ "ap-southeast-2" "eu-central-1" "us-east-1" "us-east-2" ];

# Specifies user-defined constraints on the task. This can be provided
# multiple times to define additional constraints.
Expand Down
38 changes: 0 additions & 38 deletions nix/workbench/backend/nomad/cloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -412,44 +412,6 @@ allocate-run-nomadcloud() {
then
fatal "Envar \"WB_SHELL_PROFILE\" is empty!"
else
########################################################################
# Fix for region mismatches ############################################
########################################################################
# If value profile, "value-nomadperf", topology was imported from
# cardano-ops / nixops that was already using "us-east-1", but not
# "default-nomadperf", "ci-test-nomadperf" and "ci-bench" that is generated
# by `cardano-topology` (Haskell project in bench/).
# - Cardano World cluster: "eu-central-1", "us-east-2"
# - Workbench (Nix level): "eu-central-1", "us-east-2", and "ap-southeast-2"
# - Dedicated P&T cluster: "eu-central-1", "us-east-1", and "ap-southeast-2"
if echo "${WB_SHELL_PROFILE}" | grep --quiet "\-nomadperf"
then
jq \
" \
.[\"job\"][\"${nomad_job_name}\"][\"datacenters\"] \
|= \
[\"eu-central-1\", \"us-east-1\", \"ap-southeast-2\"] \
" \
"${dir}"/nomad/nomad-job.json \
| \
sponge "${dir}"/nomad/nomad-job.json
# Nix creates a Nomad Job file with affinities taken from node-specs.json
jq \
" \
.[\"job\"][\"${nomad_job_name}\"][\"group\"] \
|= with_entries( \
if (.value.affinity.value == \"us-east-2\") \
then \
(.value.affinity.value |= \"us-east-1\") \
else \
(.) \
end \
) \
" \
"${dir}"/nomad/nomad-job.json \
| \
sponge "${dir}"/nomad/nomad-job.json
fi
############################################################################
# Unique placement: ########################################################
############################################################################
Expand Down
2 changes: 1 addition & 1 deletion nix/workbench/profile/prof1-variants.jq
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def all_profile_variants:
|
# "qa" class Nodes of Cardano World Nomad cluster
{ composition:
{ locations: ["eu-central-1", "us-east-1"]
{ locations: ["eu-central-1", "us-east-2"]
, topology: "torus"
, with_explorer: true
}
Expand Down

0 comments on commit f269aea

Please sign in to comment.