40 Commits

Author SHA1 Message Date
eedf030dae p/vm: Update to 1.85.3
All checks were successful
dustin/metricspi/pipeline/pr-master This commit looks good
dustin/metricspi/pipeline/head This commit looks good
2022-12-22 13:52:20 -06:00
61154fc740 ci: Increase workspace volume size
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
The default volume size created by the `dynamicPVC` function is not
sufficient to build the *metricspi* project.
2022-12-21 11:05:19 -06:00
e16987d66e ci: Update build container image name
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
registry.pyrocufflink.blue is going away, and all the container images
hosted there are moving to Gitea.
2022-12-21 10:04:55 -06:00
332e36a388 ci: Use a dynamic PVC for the workspace volume
Some checks reported errors
dustin/metricspi/pipeline/head Something is wrong with the build of this commit
Using an actual persistent volume for the workspace ultimately doesn't
work with multibranch pipelines.  When a branch/PR goes away and the
corresponding Jenkins job is deleted, the workspace cannot be cleaned up
because it is not mounted anywhere.  As such, we will just use a dynamic
PVC to ensure that the workspace is always cleaned up and nothing gets
left behind.  This of course obviates the need for the `Clean`
parameter.
2022-12-21 09:56:11 -06:00
06b04abf47 ci: Switch to K8s build agent
Some checks reported errors
dustin/metricspi/pipeline/pr-master This commit looks good
dustin/metricspi/pipeline/head Something is wrong with the build of this commit
2022-08-29 11:30:41 -05:00
42ce4c1383 dhcpcd: Include ntp.conf hook
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
Although `dhcpcd` includes a hook for configuring the NTP daemon from
DHCP options, it is not installed by default.  To enable it, one must
pass `-with-hook=ntp.conf` to the `configure` script before compiling
and installing the package.  Buildroot does not pass this flag by
default, but it does allow us to add it to the list of flags to pass in
our external configuration.
2022-08-22 22:30:31 -05:00
e3a349e3a1 pkg/alertmanager: Configure state directory
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
AlertManager is a stateful service, and as such needs a writable
location for its data.  Using the `StateDirectory` service unit
directive, we can configure systemd to create this directory
automatically, if it does not already exist when the service starts.

In order for the service to be able to write to the state directory, it
must have a stable UID.  This means it cannot use the `DynamicUser`
service unit directive.
2022-08-10 18:21:36 -05:00
276bcce2a4 pkg/victoriametrics: Fix up vmalert unit file
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
I really bundled the `vmalert.service` unit file.  I obviously copied it
from `vmagent.service` but didn't finish editing it.
2022-08-10 18:02:55 -05:00
8099546ec8 pkg/alertmanager: Add systemd unit
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
The *alertmanager.service* systemd unit allows the AlertManager to run
as a daemon process.
2022-08-10 17:40:17 -05:00
f69ad39547 rootfs: Link /etc/resolv.conf to /run
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
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
7fddc6fef5 pkg/v-m: vmagent: Remove IP address restrictions
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
Setting `IPAddressAllow` and `IPAddressDeny` instructs systemd to
construct BPF firewall rules to restrict traffic.  Since `vmagent` is
responsible for scraping metrics from hosts on the network, it does not
make any sense to restrict it to localhost-only communication.
2022-08-07 21:29:26 -05:00
c1a6f3bb8e package/v-m: Remove DynamicUser from systemd units
None of the Victoria Metrics services should run as a dynamic user.
Indeed, enabling the setting appears to have no effect when `User` is
defined and refers to a user that already exists.  To reduce confusion,
we should omit these directives from the unit files.
2022-08-07 21:26:49 -05:00
e009a4e167 ci: Install git
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
The `git` program is needed to build *blackbox_exporter* from Go source.
2022-08-07 10:18:36 -05:00
a836526d40 Add and enable blackbox_exporter package
Some checks failed
dustin/metricspi/pipeline/head There was a failure building this commit
*blackbox_exporter* is a generic exporter for Prometheus that can be
used to provide metrics about HTTP, etc. services.  I use it to monitor
the availability and responsiveness of websites I host.
2022-08-06 16:05:21 -05:00
34b650c2f4 Install rng-tools
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
This package provides *rngd*, a service to continually credit the kernel
entropy pool with random data gathered by various sources, such as
hardware devices.
2022-07-17 20:46:47 -05:00
64896099ec Enable ngx_http_v2_module
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
For HTTP2 support
2022-06-29 14:27:30 -05:00
aaab85ad2f Enable ngx_http_ssl_module
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
This module is needed for HTTPS.
2022-06-28 21:58:47 -05:00
5fd8878417 Define victoriametrics user in the package
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
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
68140d98c9 Remove nginx user
Buildroot uses *www-data*, so this user is not needed
2022-06-28 17:13:53 -05:00
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
d99c3b8f4c Merge victoriametrics and vmutils packages
There's no reason for these to be separate packages.  They come from the
same source tree, so having a single package makes more sense.  I only
separated them originally because I wasn't sure exactly how to express
the proper options in the kconfig language.
2022-06-28 17:13:53 -05:00
66e8246c3b Add systemd units for Victoria Metrics
I think it makes the most sense to install the systemd unit files for
services along with their binaries.  This is how most software provided
by Linux distribution package manager works.  Providing the systemd unit
with the package eliminates the need for variability, since the paths to
the executable and other files are well defined.
2022-06-28 17:02:03 -05:00
37cea1dd47 dhcpcd: Wait for carrier before active
In order to ensure that network interfaces are active, but not
necessarily fully configured, before *network.target* is reached, the
*dhcpcd.service* unit now waits until at least one interface has
processed the `CARRIER` event before being marked as active.  This is
accomplished using the *sd_notify* infrastructure, via the
`systemd-notify` command, executed in a client configuration hook
script.
2022-06-28 17:02:03 -05:00
a299e3d91c grafana: Install grafana-server.service 2022-06-28 17:02:03 -05:00
103250acc2 Remove collectd network-online.target dependency
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
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
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
47d19c033b Add user for nginx
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
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
a494dc2c9f Add Nginx
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
2022-06-26 12:39:15 -05:00
5a9e9c0597 Add Grafana, AlertManager, vmutils
The *vmutils* package can be built from source easily, as its just a
collection of Go applications.  Grafana and Alertmanager are quite a bit
more complicated because of their respective browser applications.  In
the interest of getting this project actually going, we'll just install
the official binary releases of these (for now?).
2022-06-26 12:35:12 -05:00
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
fa3b59143b users: Add victoriametrics user
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
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
2befb681c7 Install Victoria Metrics
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
Victoria Metrics is not available by default with Buildroot, but adding
a package description for it is very straightforward.  The flags and
tags are specified within Victoria Metrics's own Makefile.
2022-06-23 10:59:07 -05:00
4dddea5a99 Add system-update script
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
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
aaf75ca1a0 ci: Install systemd in build container
The *systemd* package provides the `systemd-hwdb` command, which is used
during the build to generate `/usr/lib/udev/hwdb.bin` in the target
filesystem.
2022-06-23 10:33:30 -05:00
40867c456d package: Include Pi firmware in archive root
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
Raspberry Pi firmware files are now included in the root of the
distribution archive, insteaad of in an `rpi-firmware` subdirectory.
This will make it easier to extract them to the FAT32 partition on the
SD card, along with the kernel and initramfs images files.
2022-06-23 10:26:04 -05:00
5650285a8a rootfs: Install tar
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
`tar` will be needed to extract update packages
2022-06-22 21:13:24 -05:00
a767ed66a5 ci: Build package 2022-06-22 21:13:24 -05:00
a7a779b2f6 build: add package target
`make package` will produce a tarball containing the kernel image,
initramfs image, Raspberry Pi firmware, and root filesystem image.
2022-06-22 20:52:48 -05:00
6176e86eff ci: Add CI pipeline
All checks were successful
dustin/metricspi/pipeline/head This commit looks good
2022-06-22 17:11:55 -05:00
50d2f3459b Initial commit 2022-06-22 17:06:58 -05:00