From 07c56086aa0c4e015c9044e333ae4001debcb28d Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 30 Apr 2024 13:14:09 +0300 Subject: Update content for html --- .../2022-10-30-installing-dtail-on-openbsd.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'gemfeed/2022-10-30-installing-dtail-on-openbsd.html') diff --git a/gemfeed/2022-10-30-installing-dtail-on-openbsd.html b/gemfeed/2022-10-30-installing-dtail-on-openbsd.html index c167cdfa..22df6000 100644 --- a/gemfeed/2022-10-30-installing-dtail-on-openbsd.html +++ b/gemfeed/2022-10-30-installing-dtail-on-openbsd.html @@ -8,7 +8,7 @@ -

Installing DTail on OpenBSD


+

Installing DTail on OpenBSD



Published at 2022-10-30T11:03:19+02:00

@@ -61,7 +61,7 @@
I will also mention some relevant Rexfile snippets in this post!

-

Compile it


+

Compile it



First of all, DTail needs to be downloaded and compiled. For that, git, go, and gmake are required:

@@ -96,7 +96,7 @@ $ doas pkg_delete git go gmake
One day I shall create an official OpenBSD port for DTail.

-

Install it


+

Install it



Installing the binaries is now just a matter of copying them to /usr/local/bin as follows:

@@ -138,7 +138,7 @@ END $ doas chmod 755 /etc/rc.d/dserver
-

Rexification


+

Rexification



This is the task for setting it up via Rex. Note the . . . ., that's a placeholder which we will fill up more and more during this blog post:

@@ -165,7 +165,7 @@ task 'dtail', group => 'frontends', };
-

Configure it


+

Configure it



Now, DTail is fully installed but still needs to be configured. Grab the default config file from GitHub ...

@@ -188,7 +188,7 @@ $ curl https://raw.githubusercontent.com/mimecast/dtail/master/examples/dtail.js }
-

Rexification


+

Rexification



That's as simple as adding the following to the Rex task:

@@ -204,7 +204,7 @@ file '/etc/dserver/dtail.json', on_change => sub { $restart = TRUE };
-

Update the key cache for it


+

Update the key cache for it



DTail relies on SSH for secure authentication and communication. However, the system user _dserver has no permission to read the SSH public keys from the user's home directories, so the DTail server also checks for available public keys in an alternative path /var/run/dserver/cache.

@@ -257,7 +257,7 @@ $ echo /usr/local/bin/dserver-update-key-cache.sh | doas tee -a /etc/daily.local /usr/local/bin/dserver-update-key-cache.sh
-

Rexification


+

Rexification



That's done by adding ...

@@ -273,7 +273,7 @@ append_if_no_such_line '/etc/daily.local', '/usr/local/bin/dserver-u
... to the Rex task!

-

Start it


+

Start it



Now, it's time to enable and start the DTail server:

@@ -313,7 +313,7 @@ Caching /home/rex/.ssh/authorized_keys -> /var/cache/dserver/rex.authorized_k All set...
-

Use it


+

Use it



The DTail server is now ready to serve connections. You can use any DTail commands, such as dtail, dgrep, dmap, dcat, dtailhealth, to do so. Checkout out all the usage examples on the official DTail page.

@@ -339,7 +339,7 @@ REMOTE|blowfish|100|7|fstab|31bfd9d9a6788844.h /usr/local ffs rw,wxallowed,nodev REMOTE|fishfinger|100|7|fstab|093f510ec5c0f512.h /usr/local ffs rw,wxallowed,nodev 1 2
-

Conclusions


+

Conclusions



It's a bit of manual work, but it's ok on this small scale! I shall invest time in creating an official OpenBSD port, though. That would render most of the manual steps obsolete, as outlined in this post!

-- cgit v1.2.3