Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Smirnov Alexey
committed
Feb 14, 2019
1 parent
24753c8
commit 5a74ce2
Showing
3 changed files
with
57 additions
and
60 deletions.
There are no files selected for viewing
58 changes: 29 additions & 29 deletions
58
ci/local-dev/manifests/ks/components/insolar/genesis.libsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
local base_params = import '../params.libsonnet'; | ||
local params = std.mergePatch( base_params.components, std.extVar("__ksonnet/params").components ); | ||
local params = std.mergePatch(base_params.components, std.extVar('__ksonnet/params').components); | ||
local utils = params.utils; | ||
local insolar_params = params.insolar; | ||
|
||
local make_min_roles() = { | ||
virtual: 1, | ||
virtual: 1, | ||
heavy_material: 1, | ||
light_material: 1 | ||
light_material: 1, | ||
}; | ||
|
||
{ | ||
// It generates nodes in particular order: 1) heavy_material 2) light_material 3) virtual | ||
generate_genesis() :: { | ||
// It generates nodes in particular order: 1) heavy_material 2) light_material 3) virtual | ||
generate_genesis():: { | ||
|
||
// common fields | ||
root_keys_file: "/opt/insolar/config/root_member_keys.json", | ||
root_balance: 1000000000, | ||
majority_rule: 0, | ||
min_roles: make_min_roles(), | ||
pulsar_public_keys: [ "pulsar_public_key" ], | ||
// common fields | ||
root_keys_file: '/opt/insolar/config/root_member_keys.json', | ||
node_keys_dir: '/opt/insolar/config/nodes', | ||
discovery_keys_dir: '/opt/insolar/config/discovery', | ||
keys_name_format: '/key-%02d.json', | ||
root_balance: 1000000000, | ||
majority_rule: 0, | ||
min_roles: make_min_roles(), | ||
pulsar_public_keys: ['pulsar_public_key'], | ||
|
||
// generating discovery_nodes | ||
local discovery_nodes_tmpl() = { | ||
host: utils.host_template, | ||
role: "%s", | ||
keys_file: "/opt/insolar/config/nodes/keys/%s-%d.json", | ||
cert_name: "%s-%d-cert.json" | ||
}, | ||
// generating discovery_nodes | ||
local discovery_nodes_tmpl() = { | ||
host: utils.host_template, | ||
role: '%s', | ||
cert_name: '%s-%d-cert.json', | ||
}, | ||
|
||
discovery_nodes: | ||
discovery_nodes: | ||
[ | ||
{ | ||
host: discovery_nodes_tmpl().host % [ id, insolar_params.tcp_transport_port ] , | ||
keys_file: discovery_nodes_tmpl().keys_file % [ insolar_params.hostname, id ], | ||
cert_name: discovery_nodes_tmpl().cert_name % [ insolar_params.hostname, id ], | ||
{ | ||
host: discovery_nodes_tmpl().host % [id, insolar_params.tcp_transport_port], | ||
cert_name: discovery_nodes_tmpl().cert_name % [insolar_params.hostname, id], | ||
|
||
role: discovery_nodes_tmpl().role % utils.id_to_node_type( id ), | ||
} | ||
for id in std.range(0, utils.get_num_nodes - 1) | ||
] | ||
} | ||
role: discovery_nodes_tmpl().role % utils.id_to_node_type(id), | ||
} | ||
for id in std.range(0, utils.get_num_nodes - 1) | ||
], | ||
}, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 20 additions & 19 deletions
39
ci/local-dev/manifests/ks/environments/dev/params.libsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,27 @@ | ||
local params = std.extVar("__ksonnet/params"); | ||
local globals = import "globals.libsonnet"; | ||
local envParams = params + { | ||
components +: { | ||
"insolar.insolar"+:{ | ||
image+: { | ||
image: "registry.insolar.io/insolard", | ||
tag: "v0.7.6", | ||
image_pull_policy: "IfNotPresent" | ||
} | ||
}, | ||
"pulsar.insolar"+:{ | ||
image+: { | ||
image: "registry.insolar.io/insolard", | ||
tag: "v0.7.6", | ||
image_pull_policy: "IfNotPresent" | ||
} | ||
} | ||
local params = std.extVar('__ksonnet/params'); | ||
local globals = import 'globals.libsonnet'; | ||
local envParams = params { | ||
components+: { | ||
'insolar.insolar'+: { | ||
image+: { | ||
image: 'registry.insolar.io/insolard', | ||
tag: 'f830c86', | ||
image_pull_policy: 'IfNotPresent', | ||
}, | ||
}, | ||
'pulsar.insolar'+: { | ||
image+: { | ||
image: 'registry.insolar.io/insolard', | ||
tag: 'f830c86', | ||
image_pull_policy: 'IfNotPresent', | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
{ | ||
components: { | ||
[x]: envParams.components[x] + globals, for x in std.objectFields(envParams.components) | ||
[x]: envParams.components[x] + globals | ||
for x in std.objectFields(envParams.components) | ||
}, | ||
} |