-
Notifications
You must be signed in to change notification settings - Fork 722
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
Cardano cluster, on-fly genesis, Chairman service & NixOS test #177
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how this can be ran without having systemd. Can you please provide an example of how the scripts attribute would utilize this service?
nix/nixos/cardano-node-options.nix
Outdated
@@ -109,7 +110,7 @@ in { | |||
|
|||
stateDir = mkOption { | |||
type = types.str; | |||
default = "/var/lib/cardano-node"; | |||
default = "/var/lib/cardano-node-%i"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets not pollute lib. Maybe optionally if multiple instances are running, do /var/lib/cardano-node/%i
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed -- we now have an instanced
option to the NixOS service, that guides the choice of:
- systemd service name (if
instanced
isfalse
, the service is not instanced) - node id & port
nix/nixos/cardano-node-service.nix
Outdated
@@ -27,7 +27,7 @@ in { | |||
uid = 10016; | |||
group = "cardano-node"; | |||
}; | |||
systemd.services.cardano-node = { | |||
systemd.services."cardano-node@" = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should optionally do this if it's a cluster vs just a single node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
af44a71
to
354c6db
Compare
Absolutely, it needs systemd. |
6ae275e
to
549e5d8
Compare
466b231
to
d364119
Compare
326244e
to
7d998a6
Compare
Breaks connect scripts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaks the scripts.
77a0555
to
e17765d
Compare
Hmm, @disassembler, are you sure you tested the latest commit?
|
d511894
to
4764ea5
Compare
d8e322c
to
b6f7d41
Compare
See: https://fedoramagazine.org/systemd-template-unit-files/ Signed-off-by: Kosyrev Serge <serge.kosyrev@iohk.io>
b6f7d41
to
29b047e
Compare
bors r+ |
177: Cardano cluster, on-fly genesis, Chairman service & NixOS test r=deepfire a=deepfire 1. Turn the `cardano-node.service` into instanced set of `cardano-node@NODE-ID.service`, systemd-unit-wise 2. Define a `cardano-cluster` target. 3. Generate genesis on fly for the cluster. 4. Chairman service, with a factored script generator.. 5. Chairman's cluster NixOS test. Co-authored-by: Kosyrev Serge <serge.kosyrev@iohk.io>
cardano-node.service
into instanced set ofcardano-node@NODE-ID.service
, systemd-unit-wisecardano-cluster
target.