Skip to content

Commit

Permalink
Provide example systemd file names and commands (#511)
Browse files Browse the repository at this point in the history
* one-third of voting power, too

* Voting at 100%

* Need .service extension

* Info on logging from https://opentezos.com/node-baking/baking/persistent-baker/#displaying-service-logs

* Include .service in file name

Co-authored-by: windushka <[email protected]>

---------

Co-authored-by: windushka <[email protected]>
  • Loading branch information
timothymcmackin and windushka authored Jan 23, 2025
1 parent 78f1213 commit d863e07
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 7 deletions.
23 changes: 18 additions & 5 deletions docs/tutorials/join-dal-baker/run-baker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Step 4: Run an Octez baking daemon"
authors: Tezos core developers, Tim McMackin
last_update:
date: 14 January 2025
date: 15 January 2025
---

Now that you have a layer 1 node and a DAL node, you can run a baking daemon that can create blocks and attests to DAL data.
Expand Down Expand Up @@ -35,9 +35,9 @@ You can also refer to [Run a persistent baking node](https://opentezos.com/node-

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

```systemd
```systemd title="/etc/systemd/system/octez-baker-PsQuebec.service"
[Unit]
Description=Octez baker
Description=Octez baker PsQuebec
Wants=network-online.target
After=network-online.target
Requires=octez-node.service
Expand All @@ -57,6 +57,19 @@ You can also refer to [Run a persistent baking node](https://opentezos.com/node-
SyslogIdentifier=%n
```

If you name this service file `/etc/systemd/system/octez-baker-PsQuebec.service`, you can start it by running these commands:

```bash
sudo systemctl daemon-reload
sudo systemctl start octez-baker-PsQuebec.service
```

You can stop it by running this command:

```bash
sudo systemctl stop octez-baker-PsQuebec.service
```

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

```bash
Expand Down Expand Up @@ -174,9 +187,9 @@ You don't have to run an accuser, but if you do, you can receive as a reward par
Like the baker, the command for the accuser has the protocol name at the end.
For example, if your operating system uses the `systemd` software suite, the attester service file might look like this example:

```systemd
```systemd title="/etc/systemd/system/octez-accuser-PsQuebec.service"
[Unit]
Description=Octez accuser
Description=Octez accuser PsQuebec
Wants=network-online.target
After=network-online.target
Requires=octez-node.service
Expand Down
33 changes: 31 additions & 2 deletions docs/tutorials/join-dal-baker/run-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Step 1: Run an Octez node"
authors: Tezos core developers, Tim McMackin
last_update:
date: 9 January 2025
date: 17 January 2025
---

The first thing you need is a Tezos layer 1 node, which is an instance of the `octez-node` program and part of the Octez suite of programs.
Expand Down Expand Up @@ -108,7 +108,7 @@ You can also refer to [Run a persistent baking node](https://opentezos.com/node-

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

```systemd
```systemd title="/etc/systemd/system/octez-node.service"
[Unit]
Description=Octez node
Wants=network-online.target
Expand All @@ -129,6 +129,35 @@ You can also refer to [Run a persistent baking node](https://opentezos.com/node-
SyslogIdentifier=%n
```

If you name this service file `/etc/systemd/system/octez-node.service`, you can start it by running these commands:

```bash
sudo systemctl daemon-reload
sudo systemctl start octez-node.service
```

You can stop it by running this command:

```bash
sudo systemctl stop octez-node.service
```

The `systemd` software suite uses the `journalctl` program for logging, so you can use it to monitor the node and the other Octez daemons you run.
For example, this command prints the log of the Octez node service as it is updated, similar to the `tail -f` command:

```bash
journalctl --follow --unit=octez-node.service
```

The `journalctl` program has options that let you search logs during time periods.
For example, this command shows log entries between two times:

```bash
journalctl --unit=octez-baker.service --since "20 minutes ago" --until "60 seconds ago"
```

For more information about logging, see the documentation for the `journalctl` program.

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 d863e07

Please sign in to comment.