-
Notifications
You must be signed in to change notification settings - Fork 296
/
ic-replica.service
40 lines (37 loc) · 1.74 KB
/
ic-replica.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
[Unit]
Description=IC replica
# We must wait for IC bootstrap to complete: It writes various
# state files and may also be needed to obtain network config.
After=bootstrap-ic-node.service
Wants=bootstrap-ic-node.service
# We must also wait for storage permission fixup to have finished.
After=setup-permissions.service
Wants=setup-permissions.service
# Replica & orchestrator need ic-crypto-csp service running.
After=ic-crypto-csp.service
Wants=ic-crypto-csp.service
# We must also wait for the network to become online: We must
# put the correct address(es) into the ic.json5, but in case
# of dynamic assignment they only become available once all
# network interfaces are up.
After=network-online.target
BindsTo=network-online.target
After=systemd-networkd.service
PartOf=systemd-networkd.service
StartLimitBurst=5
StartLimitIntervalSec=60
[Service]
UMask=026
Type=simple
User=ic-replica
Environment=RUST_BACKTRACE=1
# Remember to update 'rs/default.nix' for nix-shell users
# Remember to update 'src/dfx/src/actors/replica.rs' in the sdk repo for dfx users
Environment=RUST_MIN_STACK=8192000
ExecStartPre=+/opt/ic/bin/generate-replica-config.sh -n /boot/config/network.conf -c /boot/config/nns.conf -b /boot/config/backup.conf -l /boot/config/log.conf -m /boot/config/malicious_behavior.conf -i /opt/ic/share/ic.json5.template -o /run/ic-node/config/ic.json5
ExecStart=/opt/ic/bin/orchestrator --replica-binary-dir /var/lib/ic/data/images --cup-dir /var/lib/ic/data/cups --replica-config-file /run/ic-node/config/ic.json5 --enable-provisional-registration --ic-binary-directory /opt/ic/bin --orchestrator-data-directory /var/lib/ic/data/orchestrator --version-file /opt/ic/share/version.txt
LimitNOFILE=1048576
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target