Skip to content

Instantly share code, notes, and snippets.

@possebon
possebon / 23-security-checklist.md
Created December 19, 2025 17:51
Open Source Infrastructure Stack - 23-security-checklist

Security Checklist

  • Infisical Machine Identity created
  • All secrets migrated to Infisical
  • No hardcoded credentials in repository
  • SSL certificates auto-renewing
  • Firewall rules configured
  • Keycloak admin password changed
  • Database passwords rotated
  • Backup encryption enabled
@possebon
possebon / 22-essential-commands.md
Created December 19, 2025 17:51
Open Source Infrastructure Stack - 22-essential-commands

Essential Commands Quick Reference

# Initialize infrastructure
tofu init && tofu apply

# Deploy all services
ansible-playbook playbooks/site.yml

# Deploy single environment
@possebon
possebon / 21-infrastructure-file-structure.md
Created December 19, 2025 17:51
Open Source Infrastructure Stack - 21-infrastructure-file-structure

Infrastructure Repository File Structure

infrastructure/
├── opentofu/
│   ├── main.tf           # Server provisioning
│   ├── secrets.tf        # Infisical integration
│   ├── versions.tf       # Provider configuration
│   └── variables.tf      # Input variables
├── ansible/
@possebon
possebon / 20-github-actions-workflow.md
Created December 19, 2025 17:51
Open Source Infrastructure Stack - 20-github-actions-workflow

GitHub Actions GitOps Workflow

# .github/workflows/deploy.yml
name: Deploy Infrastructure

on:
  push:
    branches: [main]
@possebon
possebon / 19-deployment-pipeline-commands.md
Created December 19, 2025 17:51
Open Source Infrastructure Stack - 19-deployment-pipeline-commands

Complete Deployment Pipeline

# Step 1: Bootstrap Infisical credentials
export INFISICAL_CLIENT_ID="your-client-id"
export INFISICAL_CLIENT_SECRET="your-client-secret"

# Step 2: Provision infrastructure
cd infrastructure/opentofu
tofu init
@possebon
possebon / 18-traefik-tls-config.md
Created December 19, 2025 17:51
Open Source Infrastructure Stack - 18-traefik-tls-config

Traefik TLS Configuration for A+ SSL Rating

# Our Traefik TLS configuration achieves A+ on SSL Labs
--certificatesresolvers.letsencryptresolver.acme.tlschallenge=true
--entrypoints.websecure.http.tls.options=modern@file

This configuration uses:

  • Let's Encrypt for automatic certificate issuance
@possebon
possebon / 17-signoz-server-config.md
Created December 19, 2025 17:51
Open Source Infrastructure Stack - 17-signoz-server-config

SigNoz Unified Server Configuration

# SigNoz unified server (v0.104.0+)
signoz-server:
  image: signoz/signoz-community:v0.104.0
  environment:
    - SIGNOZ_TELEMETRYSTORE_CLICKHOUSE_DSN=tcp://signoz-clickhouse:9000
    - SIGNOZ_TOKENIZER_JWT_SECRET=${SIGNOZ_JWT_SECRET}
 deploy:
@possebon
possebon / 16-ansible-credential-resolution.md
Created December 19, 2025 17:51
Open Source Infrastructure Stack - 16-ansible-credential-resolution

Ansible Credential Resolution Pattern

# Dual-mode: Infisical OR environment variable fallback
postgres_password: >-
  {{
    _infisical_global.POSTGRES_PASSWORD | default(None)
    if infisical_enabled | default(false) | bool and _infisical_global is defined
    else lookup('env', 'POSTGRES_PASSWORD') | default('changeme', true)
 }}
@possebon
possebon / 15-ansible-directory-structure.md
Last active December 19, 2025 18:30
Open Source Infrastructure Stack - 15-ansible-directory-structure
ansible/
├── group_vars/
│   ├── all.yml          # Shared across ALL environments
│   ├── infisical.yml    # Secrets management config
│   ├── global.yml       # Global services (Keycloak, n8n, etc.)
│   ├── development.yml  # Dev-specific overrides
│   ├── staging.yml      # Staging-specific overrides
│   └── production.yml   # Production-specific overrides
├── playbooks/
@possebon
possebon / 14-traefik-deploy-labels.md
Last active December 19, 2025 18:27
Open Source Infrastructure Stack - 14-traefik-deploy-labels

Traefik Automatic Service Discovery Labels

deploy:
  labels:
    - "traefik.enable=true"
    - "traefik.http.routers.myapp.rule=Host(`app.yourdomain.com`)"
    - "traefik.http.routers.myapp.entrypoints=websecure"
    - "traefik.http.routers.myapp.tls.certresolver=letsencryptresolver"