Portfolio Infrastructure
Demo testedDeclarative DNS, VPS bootstrap, and shared observability for projects deployed through Pier.

- Terraform
- A and AAAA records in an existing zone
- Ansible
- Ubuntu bootstrap and optional firewall
Overview
The portfolio ships in containers that can run behind Pier on Hostinger. The infrastructure project documents how to prepare a new VPS, configure DNS, and monitor services.
What it does
- Host configuration
- The playbook prepares a new Ubuntu host and checks administrative SSH access before enabling the firewall.
- DNS and TLS
- An optional profile configures DNS-only records in Cloudflare. Pier terminates HTTPS with a trusted certificate.
- Backup restoration
- The kit has an archival script for stable data and a restore test using synthetic examples.
- Metrics and logs
- Prometheus scrapes the Event Lab through a private network. Grafana has dashboards for metrics and synthetic logs queried from Loki.
Architecture
Decisions and trade-offs
- Explicit deployment target
- The code takes the zone and addresses as inputs. A new server's bootstrap uses its own inventory.
Quality and operations
- Terraform was validated and tested with a mocked provider. The playbook passed a syntax check, and the local backup was restored in a test.
- The Docker test queried both Grafana dashboards and verified metrics for an event processed by Event Lab.
Status and next steps
- Set the domain, test routing through Pier, and configure retention and external storage for VPS backups.
Stack
TerraformCloudflareAnsibleUFWDocker ComposePierPrometheusLokiGrafana