Skip to content

Commit

Permalink
db-sync fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
System administrator committed Mar 2, 2021
1 parent e05f2bc commit 2edd3f5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 60 deletions.
19 changes: 13 additions & 6 deletions db-sync.cue
Expand Up @@ -135,9 +135,14 @@ import (
task: "snapshot": {
driver: "exec"

vault: {
policies: ["nomad-cluster"]
change_mode: "noop"
}

resources: {
cpu: 100
memory: 32
cpu: 6800
memory: 2 * 1024
}

volume_mount: "persist": {
Expand All @@ -147,14 +152,15 @@ import (
config: {
flake: "github:input-output-hk/vit-testing/add-voting-tools#snapshot-trigger-service"
command: "/bin/snapshot-trigger-service"
args: ["--config", "/local/snapshot.config"]
args: ["--config", "/secrets/snapshot.config"]
}

template: "genesis-template.json": data: "{}"

template: "local/snapshot.config": {
template: "secrets/snapshot.config": {
left_delimiter: "[["
right_delimiter: "]]"
change_mode: "noop"
_magic: string
if #dbSyncNetwork == "mainnet" {
_magic: "\"--mainnet\""
Expand All @@ -176,10 +182,11 @@ import (
"--db-user", "cexplorer",
"--db-host", "/alloc",
"--out-file", "{{RESULT_DIR}}/genesis.yaml",
"--scale", "1000000"
"--scale", "1000000",
"--slot-no", "23118048"
]
},
"token": "RBj0OfHw5jT87A"
"token": "[[with secret "kv/data/nomad-cluster/\(namespace)/\(#dbSyncNetwork)/snapshot"]][[.Data.data.token]][[end]]"
}
"""
}
Expand Down
2 changes: 1 addition & 1 deletion deploy.cue
Expand Up @@ -27,7 +27,7 @@ Namespace: [Name=_]: {
namespace: string
#domain: string
#vitOpsRev: =~"^\(hex){40}$" | *"c9251b4f3f0b34a22e3968bf28d5a049da120f8f"
#dbSyncRev: =~"^\(hex){40}$" | *"1518c0ee4eaf21caff207b1fc09ff047eda50ee0"
#dbSyncRev: =~"^\(hex){40}$" | *"af6f4d31d137388aa59bae10c2fa79c219ce433d"
datacenters: [...datacenter] | *[ "eu-central-1", "us-east-2", "eu-west-1"]
}
jobs: [string]: types.#stanza.job
Expand Down
69 changes: 17 additions & 52 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Expand Up @@ -14,7 +14,7 @@
url = "github:input-output-hk/jormungandr-nix";
flake = false;
};
jormungandr.url = "github:input-output-hk/jormungandr/use-rust-nix";
jormungandr.url = "github:input-output-hk/jormungandr?ref=v0.10.0-alpha.3";
vit-servicing-station.url =
"github:input-output-hk/vit-servicing-station/use-rust-nix";
cardano-node.url =
Expand Down

0 comments on commit 2edd3f5

Please sign in to comment.