Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ jobs:
# Cleanup
rm -f backend_override.tf

- name: Terraform Validate (Uptime Kuma Service)
working-directory: terraform/services/uptime-kuma
run: |
terraform init -backend=false
terraform validate

terraform-lint:
name: Terraform Lint
runs-on: ubuntu-latest
Expand Down
15 changes: 0 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,12 @@ output: # Show Terraform outputs
terraform -chdir=$(TF_DIR) output
.PHONY: output

ssh-key: # Save SSH private key to file
terraform -chdir=$(TF_DIR) output -raw ssh_private_key > uptime-kuma-key.pem
chmod 600 uptime-kuma-key.pem
@echo "SSH key saved to uptime-kuma-key.pem"
.PHONY: ssh-key

ssh-key-peekaping: # Save Peekaping SSH private key to file
terraform -chdir=$(TF_DIR) output -raw module.peekaping.ssh_private_key > peekaping-key.pem
chmod 600 peekaping-key.pem
@echo "SSH key saved to peekaping-key.pem"
.PHONY: ssh-key-peekaping

deploy-uptime: init-vendor # Deploy or update Uptime Kuma using Ansible
@echo "Deploying Uptime Kuma..."
@if [ ! -f ansible/inventory-uptime-kuma.ini ]; then \
echo "Error: Ansible inventory file not found. Run 'make apply' first to generate it."; \
exit 1; \
fi
cd ansible && ansible-playbook -i inventory-uptime-kuma.ini playbooks/uptime-kuma.yaml
.PHONY: deploy-uptime

deploy-peekaping: init-vendor # Deploy or update Peekaping using Ansible
@echo "Deploying Peekaping..."
@if [ ! -f ansible/inventory-peekaping.ini ]; then \
Expand Down
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Ansible.

This repository manages infrastructure for:

- **Uptime Kuma**: Monitoring and status page service at `uptime.ainsley.dev`
- **Peekaping**: Monitoring service
- **Backups**: Terraform backups from Backblaze to Google Drive.

## Architecture
Expand All @@ -29,21 +29,15 @@ platform/
│ │ ├── outputs.tf # Global outputs
│ │ └── main.tf # Module imports
│ └── services/
│ └── uptime-kuma/ # Uptime Kuma service
│ ├── main.tf # VM + firewall
│ ├── volume.tf # 10GB persistent volume
│ ├── cloud-init.yaml # VM provisioning
│ ├── variables.tf
│ └── outputs.tf
│ └── peekaping/ # Peekaping monitoring service
├── ansible/
│ ├── playbooks/
│ │ └── uptime-kuma.yaml # Uptime Kuma deployment
│ │ └── peekaping.yaml # Peekaping deployment
│ └── ansible.cfg # References WebKit roles
├── docker/
│ └── uptime-kuma/
│ ├── docker-compose.yml # Works for local + VM
│ ├── .env.example
│ └── README.md
│ └── peekaping/
│ ├── docker-compose.yml
│ └── .env.example
```

## Setup
Expand Down
14 changes: 5 additions & 9 deletions ansible/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,18 @@ The cloud-init script automatically clones the WebKit repository to `/opt/webkit

## Running Playbooks

### Uptime Kuma Deployment
### Peekaping Deployment

```bash
ansible-playbook -i inventory.ini playbooks/uptime-kuma.yaml \
-e "domain=uptime.ainsley.dev" \
ansible-playbook -i inventory.ini playbooks/peekaping.yaml \
-e "domain=peekaping.ainsley.dev" \
-e "admin_email=hello@ainsley.dev"
```

### Custom Inventory

Create an `inventory.ini` file:
```ini
[uptime_kuma]
uptime.ainsley.dev ansible_host=YOUR_SERVER_IP ansible_user=root
[peekaping]
peekaping.ainsley.dev ansible_host=YOUR_SERVER_IP ansible_user=root
```

## Cloud-Init Integration

The Uptime Kuma service uses `ansible-pull` in cloud-init to automatically provision the VM. See `terraform/services/uptime-kuma/cloud-init.yaml` for details.
8 changes: 0 additions & 8 deletions ansible/inventory-uptime-kuma.ini

This file was deleted.

140 changes: 0 additions & 140 deletions ansible/playbooks/uptime-kuma.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions docker/uptime-kuma/.env.example

This file was deleted.

8 changes: 0 additions & 8 deletions docker/uptime-kuma/.gitignore

This file was deleted.

42 changes: 0 additions & 42 deletions docker/uptime-kuma/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions docker/uptime-kuma/docker-compose.yml

This file was deleted.

3 changes: 0 additions & 3 deletions terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,5 @@ project_name = "ainsley-dev-platform"
# Configure domains for each monitoring service
# Make sure DNS A records point to the server IPs after deployment

# Uptime Kuma monitoring service
uptime_kuma_domain = "old.ainsley.dev"

# Peekaping monitoring service
peekaping_domain = "uptime.ainsley.dev"
9 changes: 0 additions & 9 deletions terraform/base/main.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
# Main Terraform configuration for ainsley.dev Platform
# This file imports and configures service modules

module "uptime_kuma" {
source = "../services/uptime-kuma"

hetzner_token = var.hetzner_token
domain = var.uptime_kuma_domain
admin_email = var.admin_email
environment = var.environment
}

module "peekaping" {
source = "../services/peekaping"

Expand Down
6 changes: 0 additions & 6 deletions terraform/base/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ variable "admin_email" {
}

# Service-specific domains
variable "uptime_kuma_domain" {
type = string
description = "Domain for Uptime Kuma monitoring service"
default = "uptime.ainsley.dev"
}

variable "peekaping_domain" {
type = string
description = "Domain for Peekaping monitoring service"
Expand Down
Loading