Commit Graph

11 Commits (e3a349e3a1ff4b27adecc386c1ef58ab916d1976)

Author SHA1 Message Date
Dustin f69ad39547 rootfs: Link /etc/resolv.conf to /run
dustin/metricspi/pipeline/head This commit looks good Details
By default, Buildroot creates `/etc/resolv.conf` as a symlink to
`/tmp/resolv.conf`.  This allows it to be modified at runtime, even if
`/` is on a read-only filesystem (assuming `/tmp` is not).
Unfortunately, this causes problems for systemd units with
`PrivateTmp=yes`, because they are not able to read the `resolv.conf`
file.

A more appropriate location for the writable `resolv.conf` is `/run`.
This filesystem is not affected by the `PrivateTmp` setting, and is
always available to units.
2022-08-08 21:28:18 -05:00
Dustin 5fd8878417 Define victoriametrics user in the package
dustin/metricspi/pipeline/head This commit looks good Details
When I originally added the *victoriametrics* user to the `users` file,
I did not realize that it was possible for a package to define a user.
It makes much more sense to define it there.
2022-06-28 17:13:53 -05:00
Dustin 68140d98c9 Remove nginx user
Buildroot uses *www-data*, so this user is not needed
2022-06-28 17:13:53 -05:00
Dustin ff9b2d02f4 dhcpcd.conf: Correct NTP sources file
Chrony will only read extra sources from files in the directory
specified by `sourcedir` if they end with `.sources`.
2022-06-28 17:13:53 -05:00
Dustin 103250acc2 Remove collectd network-online.target dependency
dustin/metricspi/pipeline/head This commit looks good Details
Now that *dhcpcd.service* and *dhcpcd-wait-online.service* correctly
activate *network.target* and *network-online.target*, respectively, the
hack to fix the  *collectd* *wait_prometheus* plugin binding to the TCP
socket is no longer needed.
2022-06-27 10:32:04 -05:00
Dustin 52e28b6912 dhcpcd: Fix startup process
The *dhcpcd.service* systemd unit file that ships with Buildroot is
broken.  It orders the unit after *network.target*, which makes no
sense.  It also configures the process to fork, but incorrectly
configures the PID file.  Finally, by relying on the fork to indicate
that the network is "online," it does not distinguish between "an
interface is up" and "the network is reachable."  As most daemons only
need the former, they only rely on *network.target*, and thus can fail
to start correctly.

To correct this brokenness, we provide our own unit file for
*dhcpcd.service*, based on the one included in the Fedora *dhcpcd* RPM
package.  For "online" signalling, we provide a pair of shell scripts:
one reads from a named pipe waiting for a message and the other sends a
message to the pipe when configuration is complete.
2022-06-27 10:25:07 -05:00
Dustin 47d19c033b Add user for nginx
dustin/metricspi/pipeline/head This commit looks good Details
The *nginx* package for Buildroot does not automatically create an
unprivileged user for the process to use.
2022-06-26 16:36:47 -05:00
Dustin a9d8a71a92 Add fake usermod command
Ansible's `user` module *requires* that the `usermod` command be
present, even if it would not actually create or modify the specified
user.  It does not actually execute it unless it needs to, so we can
stub it out.  Making it a symlink to `false` ensures that it will never
do anything, and will fail if its actually run.
2022-06-23 15:52:12 -05:00
Dustin fa3b59143b users: Add victoriametrics user
dustin/metricspi/pipeline/head This commit looks good Details
Normally, this would be done by Ansible, but Buildroot does not provide
a `useradd` utility.  As such, the user has to be created at build time.
2022-06-23 11:24:55 -05:00
Dustin 4dddea5a99 Add system-update script
dustin/metricspi/pipeline/head This commit looks good Details
The `system-update` script takes an archive package (`metricspi.tar`)
and extracts its contents into the proper locations to update the
system.
2022-06-23 10:45:18 -05:00
Dustin 50d2f3459b Initial commit 2022-06-22 17:06:58 -05:00