Skip to content

Commit

Permalink
Make systemd service files consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymcmackin committed Dec 18, 2024
1 parent e0b5ecf commit 52f1aec
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 5 deletions.
24 changes: 24 additions & 0 deletions docs/tutorials/join-dal-baker/run-baker.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,30 @@ If you already have a baking daemon, you can restart it to connect to the DAL no
Look up how to run programs persistently in the documentation for your operating system.
You can also refer to [Run a persistent baking node](https://opentezos.com/node-baking/baking/persistent-baker/) on opentezos.com.

For example, if your operating system uses the `systemd` software suite, your service file might look like this example:

```systemd
[Unit]
Description=Octez baker
Wants = network-online.target
After = network-online.target
Requires = octez-node.service
[Install]
WantedBy = multi-user.target
[Service]
Type=simple
User=mybaker
ExecStart=octez-baker-PsParisC run with local node "$HOME/.tezos-node" my_baker --liquidity-baking-toggle-vote pass --adaptive-issuance-vote on --dal-node http://127.0.0.1:10732
WorkingDirectory=/opt/octez-baker
Restart=on-failure
RestartSec=5
StandardOutput=append:/opt/octez-baker.log
StandardError=append:/opt/octez-baker.log
SyslogIdentifier=%n
```

1. In the same terminal window, run this command:

```bash
Expand Down
10 changes: 5 additions & 5 deletions docs/tutorials/join-dal-baker/run-dal-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,18 @@ You can also refer to [Setting up Octez Services](https://tezos.gitlab.io/introd
Requires = octez-node.service
[Install]
WantedBy=multi-user.target
WantedBy = multi-user.target
RequiredBy = octez-baker.service
[Service]
Type=simple
User=mybaker
ExecStart=/usr/bin/octez-dal-node run --data-dir /opt/dal
WorkingDirectory=/opt/dal
ExecStart=/usr/bin/octez-dal-node run --data-dir /opt/dal-node
WorkingDirectory=/opt/dal-node
Restart=on-failure
RestartSec=5
StandardOutput=append:/opt/dal/octez-dal-node.log
StandardError=append:/opt/dal/octez-dal-node.log
StandardOutput=append:/opt/octez-dal-node.log
StandardError=append:/opt/octez-dal-node.log
SyslogIdentifier=%n
```

Expand Down
23 changes: 23 additions & 0 deletions docs/tutorials/join-dal-baker/run-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,29 @@ For example, the command to download a Ghostnet snapshot from the European serve
Look up how to run programs persistently in the documentation for your operating system.
You can also refer to [Run a persistent baking node](https://opentezos.com/node-baking/baking/persistent-baker/) on opentezos.com or [Setting up Octez Services](https://tezos.gitlab.io/introduction/services.html) in the Octez documentation.

For example, if your operating system uses the `systemd` software suite, your service file might look like this example:

```systemd
[Unit]
Description=Octez node
Wants = network-online.target
After = network-online.target
[Install]
WantedBy = multi-user.target
[Service]
Type=simple
User=mybaker
ExecStart=octez-node run --rpc-addr 127.0.0.1:8732 --data-dir $HOME/.tezos-node
WorkingDirectory=/opt/octez-node
Restart=on-failure
RestartSec=5
StandardOutput=append:/opt/octez-node.log
StandardError=append:/opt/octez-node.log
SyslogIdentifier=%n
```

1. Optional: When the node has bootstrapped and caught up with the current head block, you can delete the snapshot file to save space.

In the meantime, you can continue the baking infrastructure while the node is bootstrapping.
Expand Down

0 comments on commit 52f1aec

Please sign in to comment.