A Packer template for building a DigitalOcean Custom Image using VirtualBox that includes these components:
- TimescaleDB with the default configuration
- The Promscale extension
- node_exporter listening on port 9100 (requires TLS certificates)
- postgres_exporter listening on port 9187 (requires TLS certificates)
And these optional components (enabled by default):
- Promtail (set
enable_promtail
tofalse
to disable)…- Listening for logs on port 3100
- Collecting logs from /var/log, syslog (via rsyslog) & journald; and
- Configured to forward all logs to an unspecified Loki instance
- pgBackRest with a placeholder configuration (set
enable_pgbackrest
tofalse
to disable) - s4cmd (set
enable_s3_tools
tofalse
to disable) - Zstandard (set
enable_s3_tools
tofalse
to disable)
Some of these must be configured through user data or other means when deployed. The easiest way is via the builtin envsubst tool.
To skip the DigitalOcean import (leaving the VM as an appliance that can be imported into VirtualBox), use -except:
packer build -except=digitalocean-import server.pkr.hcl
journald is configured to store its logs only in memory, so they do not survive reboots.
The CI builds fail frequently thanks to rate limiting on GitHub’s end, despite the workflows specifying PACKER_GITHUB_API_TOKEN
. There’s nothing to be done except wait and retry.
Parts of this repository are modelled after Jeff Geerling’s excellent packer-boxes repository and tsugliani/packer-vsphere-debian-appliances.