File tree Expand file tree Collapse file tree 5 files changed +5
-55
lines changed Expand file tree Collapse file tree 5 files changed +5
-55
lines changed Original file line number Diff line number Diff line change 23
23
]
24
24
;
25
25
26
- validateNodeSpecs = { nodeSpecsValue } :
27
- let
28
- # There's a region mismatch between the workbench (specifically Haskell
29
- # code in cardano-topology) and Cardano World's Nomad cluster that both
30
- # use "us-east-2" while our dedicated Nomad cluster is using "us-east-1",
31
- # what SRE deployed.
32
- # - Cardano World cluster: "eu-central-1", "us-east-2"
33
- # - Workbench (Nix level): "eu-central-1", "us-east-2", and "ap-southeast-2"
34
- # - Dedicated P&T cluster: "eu-central-1", "us-east-1", and "ap-southeast-2"
35
- datacenters = [ "eu-central-1" "us-east-1" "us-east-2" "ap-southeast-2" ] ;
36
- regions = lib . attrsets . mapAttrsToList
37
- ( name : value : value . region )
38
- nodeSpecsValue
39
- ;
40
- in if builtins . all ( r : builtins . elem r datacenters ) regions
41
- then true
42
- else builtins . throw (
43
- "The only compatible regions for Nomad cloud are \" ${ toString datacenters } \" but found \" ${ toString regions } \" "
44
- )
45
- ;
46
-
47
26
# Nomad-generic "container-specs.json"
48
27
# Build a Nomad Job specification for this Nomad "sub-backend".
49
28
materialise-profile =
75
54
inherit name ;
76
55
77
56
inherit extraShellPkgs ;
78
- inherit validateNodeSpecs materialise-profile ;
57
+ inherit materialise-profile ;
79
58
inherit overlay service-modules ;
80
59
inherit stateDir basePort ;
81
60
Original file line number Diff line number Diff line change 29
29
]
30
30
;
31
31
32
- validateNodeSpecs = { nodeSpecsValue } :
33
- builtins . all ( r : r == "loopback" )
34
- ( lib . attrsets . mapAttrsToList
35
- ( name : value : value . region )
36
- nodeSpecsValue
37
- )
38
- ;
39
-
40
32
# Nomad-generic "container-specs.json"
41
33
# Build a Nomad Job specification for this Nomad "sub-backend".
42
34
materialise-profile =
68
60
inherit name ;
69
61
70
62
inherit extraShellPkgs ;
71
- inherit validateNodeSpecs materialise-profile ;
63
+ inherit materialise-profile ;
72
64
inherit overlay service-modules ;
73
65
inherit stateDir basePort ;
74
66
Original file line number Diff line number Diff line change 62
62
]
63
63
;
64
64
65
- validateNodeSpecs = { nodeSpecsValue } :
66
- builtins . all ( r : r == "loopback" )
67
- ( lib . attrsets . mapAttrsToList
68
- ( name : value : value . region )
69
- nodeSpecsValue
70
- )
71
- ;
72
-
73
65
# Nomad-generic "container-specs.json"
74
66
# Build a Nomad Job specification for this Nomad "sub-backend".
75
67
materialise-profile =
101
93
inherit name ;
102
94
103
95
inherit extraShellPkgs ;
104
- inherit validateNodeSpecs materialise-profile ;
96
+ inherit materialise-profile ;
105
97
inherit overlay service-modules ;
106
98
inherit stateDir basePort ;
107
99
Original file line number Diff line number Diff line change 26
26
tx-generator
27
27
] ) ;
28
28
29
- validateNodeSpecs = { nodeSpecsValue } :
30
- builtins . all ( r : r == "loopback" )
31
- ( lib . attrsets . mapAttrsToList
32
- ( name : value : value . region )
33
- nodeSpecsValue
34
- )
35
- ;
36
-
37
29
# Backend-specific Nix bits:
38
30
materialise-profile =
39
31
{ profileData } :
75
67
name = "supervisor" ;
76
68
77
69
inherit extraShellPkgs ;
78
- inherit validateNodeSpecs materialise-profile ;
70
+ inherit materialise-profile ;
79
71
inherit overlay service-modules ;
80
72
inherit stateDir basePort ;
81
73
Original file line number Diff line number Diff line change 136
136
;
137
137
nodeSpecsJson = mkNodeSpecsJson
138
138
{ inherit profileName profileJson ; } ;
139
- nodeSpecs =
140
- let nodeSpecsValue = __fromJSON ( __readFile nodeSpecsJson ) ;
141
- in if backend . validateNodeSpecs { inherit nodeSpecsValue ; }
142
- then nodeSpecsValue
143
- else builtins . throw "Incompatible backend for the current profile"
144
- ;
139
+ nodeSpecs = __fromJSON ( __readFile nodeSpecsJson ) ;
145
140
genesisFiles =
146
141
mkGenesisFiles
147
142
{ inherit profileName profileJson nodeSpecsJson ; }
You can’t perform that action at this time.
0 commit comments