Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions clusters/cardano.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,31 @@ let
cardano-ops.roles.explorer
];

services.cardano-node.allProducers = if (relayNodes != [])
then [ pkgs.globals.relaysNew ]
else (map (n: n.name) coreNodes);

node = {
roles = {
isExplorer = true;
class = "explorer";
};
org = def.org or "IOHK";
nodeId = def.nodeId or 99;
};
} def;
}) // (lib.optionalAttrs globals.withExplorerIog {
explorer-iog = let def = (topology.explorer-iog or {}); in mkNode {
_file = ./cardano.nix;
deployment.ec2 = {
region = def.region or "eu-central-1";
ebsInitialRootDiskSize = if globals.withHighCapacityExplorer then 1000 else 100;
};
imports = [
(def.instance or instances.explorer)
cardano-ops.roles.explorer-iog
];

services.cardano-node.allProducers = if (relayNodes != [])
then [ pkgs.globals.relaysNew ]
else (map (n: n.name) coreNodes);
Expand Down
4 changes: 3 additions & 1 deletion globals-defaults.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ in {
domain = "${globals.deploymentName}.${globals.dnsZone}";
relaysNew = globals.environmentConfig.relaysNew or "relays-new.${globals.domain}";

explorerHostName = "explorer.${globals.domain}";
explorerHostName = "explorer.${pkgs.globals.domain}";
explorerIogHostName = "explorer-iog.${pkgs.globals.domain}";
explorerForceSSL = true;
explorerAliases = [];

withMonitoring = true;
withExplorer = true;
withExplorerIog = false;
withCardanoDBExtended = true;
withSubmitApi = false;
withFaucet = false;
Expand Down
2 changes: 2 additions & 0 deletions globals-mainnet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ pkgs: {
explorerHostName = "explorer.cardano.org";
explorerForceSSL = true;
explorerAliases = [ "explorer.mainnet.cardano.org" "explorer.${pkgs.globals.domain}" ];
explorerIogAliases = [ "beta.explorer.iohk.io" ];

withCardanoDBExtended = true;
withHighCapacityMonitoring = true;
withHighCapacityExplorer = true;
withHighLoadRelays = true;
withSmash = true;
withExplorerIog = true;

withMetadata = true;
metadataHostName = "tokens.cardano.org";
Expand Down
1 change: 1 addition & 0 deletions globals-testnet.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pkgs: {
withSmash = true;
withMetadata = true;
withHighLoadRelays = true;
withExplorerIog = true;

faucetHostname = "faucet";

Expand Down
2 changes: 2 additions & 0 deletions nix/cardano.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
self: super:
let
cardano-db-sync-pkgs = import (self.sourcePaths.cardano-db-sync + "/nix") {};
cardano-db-sync-pkgs-old = import (self.sourcePaths.cardano-db-sync-old + "/nix") {};
cardano-explorer-app-pkgs = import self.sourcePaths.cardano-explorer-app;
cardano-rosetta-pkgs = import (self.sourcePaths.cardano-rosetta + "/nix") {};
cardanoNodePkgs = import (self.sourcePaths.cardano-node + "/nix") { gitrev = self.sourcePaths.cardano-node.rev; };
in rec {
inherit (cardano-db-sync-pkgs) cardanoDbSyncHaskellPackages;
cardanoDbSyncHaskellPackagesOld = cardano-db-sync-pkgs-old.cardanoDbSyncHaskellPackages;
inherit cardano-explorer-app-pkgs cardanoNodePkgs;
inherit (cardanoNodePkgs.cardanoNodeHaskellPackages.cardano-cli.components.exes) cardano-cli;
inherit (cardanoNodePkgs.cardanoNodeHaskellPackages.cardano-submit-api.components.exes) cardano-submit-api;
Expand Down
12 changes: 12 additions & 0 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@
"url": "https://github.com/input-output-hk/cardano-db-sync/archive/0b054e18aec3b1e387a1c7b713c562ade37417a3.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"cardano-db-sync-old": {
"branch": "refs/tags/8.0.0",
"description": "A component that follows the Cardano chain and stores blocks and transactions in PostgreSQL",
"homepage": "",
"owner": "input-output-hk",
"repo": "cardano-db-sync",
"rev": "1c7dbdac93e4d75118f1592dbb411f4f6a617128",
"sha256": "0wiqijrvahdn4w4mzdps22l85h9fb7dgmqq8p1alrmj4jb1hy3bb",
"type": "tarball",
"url": "https://github.com/input-output-hk/cardano-db-sync/archive/1c7dbdac93e4d75118f1592dbb411f4f6a617128.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"cardano-explorer-app": {
"branch": "refs/tags/1.5.0",
"description": "Cardano Explorer App",
Expand Down
Loading