Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker-compose to support testnet and alonzo-purple #2826

Merged
merged 3 commits into from
Aug 18, 2021
Merged
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
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ let
cardano-address
cardano-cli
cardano-node
(pkgs.linkFarm "docker-config-layer" [ { name = "config"; path = pkgs.cardano-node-deployments; } ])
];
};

Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ services:
entrypoint: []
command: bash -c "
([[ $$NETWORK == \"mainnet\" ]] && $$CMD --mainnet) ||
($$CMD --testnet /config/*-$$NETWORK-byron-genesis.json)
([[ $$NETWORK == \"alonzo-purple\" ]] && $$CMD --testnet /config/y88z6z1w0kwypj7zrlhk7vs6z8k1pckd-byron-genesis.json) ||
($$CMD --testnet /config/kax0css4lx3ywihvsgrqjym0jpi20f99-byron-genesis.json)
Comment on lines +31 to +32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be very fragile because the hashes will change.

We really need the cardano-node docker image to provide an organised /config directory, like the one I have added into our docker image (new commits on this branch).

Copy link
Contributor Author

@piotr-iohk piotr-iohk Aug 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, how about we use config files from the cardano-wallet /config directory then? (done in 50c19e8)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that would be good for the next release. But if anyone uses docker-compose.yml from master branch, there will be no /config/${NETWORK} in the inputoutput/cardano-wallet:2021.8.11 image.

So perhaps we could use fragile nix store path hashes until the day of next release, then merge 50c19e8 with the release bump PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've added temp note to https:/input-output-hk/cardano-wallet/wiki/Release-Checklist so we don't forget.

"
environment:
CMD: "cardano-wallet serve --node-socket /ipc/node.socket --database /wallet-db --listen-address 0.0.0.0"
Expand All @@ -44,7 +45,9 @@ services:
volumes:
node-mainnet-db:
node-testnet-db:
node-alonzo-purple-db:
wallet-mainnet-db:
wallet-testnet-db:
wallet-alonzo-purple-db:
node-ipc:
node-config:
3 changes: 3 additions & 0 deletions nix/overlays/cardano-deployments.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ pkgs: _: {
staging
testnet
shelley_qa
alonzo-purple
;
};
updateConfig = env: env.nodeConfig // {
minSeverity = "Notice";
} // (if (env.consensusProtocol == "Cardano") then {
ByronGenesisFile = "genesis-byron.json";
ShelleyGenesisFile = "genesis-shelley.json";
AlonzoGenesisFile = "genesis-alonzo.json";
} else {
GenesisFile = "genesis.json";
});
Expand All @@ -35,6 +37,7 @@ pkgs: _: {
'' + (if env.consensusProtocol == "Cardano" then ''
jq . < ${env.nodeConfig.ByronGenesisFile} > $cfg/genesis-byron.json
cp ${env.nodeConfig.ShelleyGenesisFile} $cfg/genesis-shelley.json
cp ${env.nodeConfig.AlonzoGenesisFile} $cfg/genesis-alonzo.json
'' else ''
jq . < ${env.genesisFile} > $cfg/genesis.json
'')) environments);
Expand Down
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"homepage": null,
"owner": "input-output-hk",
"repo": "iohk-nix",
"rev": "6d54c33f904c0012820bad823090bdeb2540a8d1",
"sha256": "1gwzy2v9jmv66kfxd13yngvmb09b8s0p2y6gvfjb91ial580390m",
"rev": "ced24db2fbed1e56563e17fd2d47436c3a4649f3",
"sha256": "0631fal6zczgs7b7nhsp4jrp0xini8r653xv0831makxd496b2v8",
"type": "tarball",
"url": "https:/input-output-hk/iohk-nix/archive/6d54c33f904c0012820bad823090bdeb2540a8d1.tar.gz",
"url": "https:/input-output-hk/iohk-nix/archive/ced24db2fbed1e56563e17fd2d47436c3a4649f3.tar.gz",
"url_template": "https:/<owner>/<repo>/archive/<rev>.tar.gz"
},
"sphinxcontrib-haddock": {
Expand Down