From e6bbb612d00d46fd940897121c00e7782ad55a93 Mon Sep 17 00:00:00 2001 From: allaun Date: Thu, 18 Jun 2026 23:28:46 -0500 Subject: [PATCH] fix(infra): point default RDS host to neon server Tailscale IP - Redirected the default RDS_HOST/PGHOST database connection default to neon-64gb (100.92.88.64) across all Python shims, shell wrappers, and Rust probes. - Cleaned up local defaults in rds_connect.py, sync_wiki_to_rds.py, dataset_ingest_rds.py, batch_embed_artifacts.py, db.rs, cache-offload.sh, db-consolidate.sh, backup.sh, and ene-api-wrapper.sh. Build: 0 jobs, 0 errors (lake build) --- 4-Infrastructure/infra/ene-rds/systemd/ene-api-wrapper.sh | 2 +- 4-Infrastructure/rds_probe/src/db.rs | 2 +- 4-Infrastructure/shim/batch_embed_artifacts.py | 2 +- 4-Infrastructure/shim/dataset_ingest_rds.py | 2 +- 4-Infrastructure/shim/rds_connect.py | 2 +- 4-Infrastructure/shim/sync_wiki_to_rds.py | 2 +- 4-Infrastructure/storage/cache-offload.sh | 2 +- 4-Infrastructure/storage/garage/db-consolidate.sh | 2 +- 4-Infrastructure/storage/restic/backup.sh | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/4-Infrastructure/infra/ene-rds/systemd/ene-api-wrapper.sh b/4-Infrastructure/infra/ene-rds/systemd/ene-api-wrapper.sh index b01b34bc..ea88339a 100755 --- a/4-Infrastructure/infra/ene-rds/systemd/ene-api-wrapper.sh +++ b/4-Infrastructure/infra/ene-rds/systemd/ene-api-wrapper.sh @@ -13,7 +13,7 @@ if [[ ! -x "$BIN" ]]; then exit 127 fi -export RDS_HOST="${RDS_HOST:-localhost}" +export RDS_HOST="${RDS_HOST:-100.92.88.64}" export RDS_PORT="${RDS_PORT:-5432}" export RDS_USER="${RDS_USER:-postgres}" export RDS_DB="${RDS_DB:-postgres}" diff --git a/4-Infrastructure/rds_probe/src/db.rs b/4-Infrastructure/rds_probe/src/db.rs index 3e565716..6d5d78bd 100644 --- a/4-Infrastructure/rds_probe/src/db.rs +++ b/4-Infrastructure/rds_probe/src/db.rs @@ -12,7 +12,7 @@ pub struct DbConfig { impl DbConfig { pub fn from_env() -> Self { let host = env::var("RDS_HOST") - .unwrap_or_else(|_| "localhost".to_string()); + .unwrap_or_else(|_| "100.92.88.64".to_string()); let user = env::var("RDS_USER").unwrap_or_else(|_| "postgres".to_string()); let password = env::var("RDS_PASSWORD").unwrap_or_else(|_| "".to_string()); diff --git a/4-Infrastructure/shim/batch_embed_artifacts.py b/4-Infrastructure/shim/batch_embed_artifacts.py index 88611449..5baecf1a 100644 --- a/4-Infrastructure/shim/batch_embed_artifacts.py +++ b/4-Infrastructure/shim/batch_embed_artifacts.py @@ -18,7 +18,7 @@ from shim.utils import sha256_text, utc_now BATCH_SIZE = 50 TOKEN_REFRESH_SEC = 600 -HOST = os.environ.get("RDS_HOST", "localhost") +HOST = os.environ.get("RDS_HOST", "100.92.88.64") PORT = int(os.environ.get("RDS_PORT", "5432")) USER = os.environ.get("RDS_USER", "postgres") DB = os.environ.get("RDS_DB", os.environ.get("RDS_DBNAME", "postgres")) diff --git a/4-Infrastructure/shim/dataset_ingest_rds.py b/4-Infrastructure/shim/dataset_ingest_rds.py index 87e1b29c..2438eb82 100644 --- a/4-Infrastructure/shim/dataset_ingest_rds.py +++ b/4-Infrastructure/shim/dataset_ingest_rds.py @@ -33,7 +33,7 @@ logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(mess log = logging.getLogger("dataset_ingest_rds") # Config -RDS_HOST = os.environ.get("RDS_HOST", "localhost") +RDS_HOST = os.environ.get("RDS_HOST", "100.92.88.64") STACK_ROOT = Path(os.environ.get("STACK_ROOT", "/home/researcher/stack")) DATA_DIR = STACK_ROOT / "shared-data" / "data" / "ingested_datasets" / "2026-05-18" diff --git a/4-Infrastructure/shim/rds_connect.py b/4-Infrastructure/shim/rds_connect.py index 6ab49604..afd0879f 100644 --- a/4-Infrastructure/shim/rds_connect.py +++ b/4-Infrastructure/shim/rds_connect.py @@ -27,7 +27,7 @@ def _resolve_params() -> dict: params["sslmode"] = v return params - host = os.environ.get("RDS_HOST", os.environ.get("PGHOST", "localhost")) + host = os.environ.get("RDS_HOST", os.environ.get("PGHOST", "100.92.88.64")) port = int(os.environ.get("RDS_PORT", os.environ.get("PGPORT", "5432"))) user = os.environ.get("RDS_USER", os.environ.get("PGUSER", "postgres")) dbname = os.environ.get("RDS_DB", os.environ.get("RDS_DBNAME", os.environ.get("PGDATABASE", "postgres"))) diff --git a/4-Infrastructure/shim/sync_wiki_to_rds.py b/4-Infrastructure/shim/sync_wiki_to_rds.py index 9a484ac4..a3b62770 100644 --- a/4-Infrastructure/shim/sync_wiki_to_rds.py +++ b/4-Infrastructure/shim/sync_wiki_to_rds.py @@ -16,7 +16,7 @@ from shim.utils import sha256_text, utc_now STACK_ROOT = Path(os.environ.get("STACK_ROOT", "/home/allaun/Research Stack")) WIKI_ROOT = Path(os.environ.get("WIKI_ROOT", str(STACK_ROOT / "6-Documentation" / "wiki"))) -HOST = os.environ.get("RDS_HOST", "localhost") +HOST = os.environ.get("RDS_HOST", "100.92.88.64") DB = os.environ.get("RDS_DB", os.environ.get("RDS_DBNAME", "postgres")) diff --git a/4-Infrastructure/storage/cache-offload.sh b/4-Infrastructure/storage/cache-offload.sh index 8b654622..b9a64c00 100644 --- a/4-Infrastructure/storage/cache-offload.sh +++ b/4-Infrastructure/storage/cache-offload.sh @@ -31,7 +31,7 @@ TIER0_PGDUMP="/mnt/stackcache/pgdump" TIER2_REMOTE="gdrive:research-stack-offload" TIER1_THRESHOLD_GB=2 -RDS_HOST="${RDS_HOST:-localhost}" +RDS_HOST="${RDS_HOST:-100.92.88.64}" RDS_PORT="${RDS_PORT:-5432}" RDS_USER="${RDS_USER:-postgres}" RDS_DB="${RDS_DB:-postgres}" diff --git a/4-Infrastructure/storage/garage/db-consolidate.sh b/4-Infrastructure/storage/garage/db-consolidate.sh index 2b7b5846..1bc5538c 100644 --- a/4-Infrastructure/storage/garage/db-consolidate.sh +++ b/4-Infrastructure/storage/garage/db-consolidate.sh @@ -38,7 +38,7 @@ export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY export AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION:-garage}" export AWS_ENDPOINT_URL="${AWS_ENDPOINT_URL:-http://localhost:3900}" -RDS_HOST="${RDS_HOST:-localhost}" +RDS_HOST="${RDS_HOST:-100.92.88.64}" RDS_PORT="${RDS_PORT:-5432}" RDS_USER="${RDS_USER:-postgres}" RDS_DB="${RDS_DB:-postgres}" diff --git a/4-Infrastructure/storage/restic/backup.sh b/4-Infrastructure/storage/restic/backup.sh index cc6fe4ba..8eb42436 100755 --- a/4-Infrastructure/storage/restic/backup.sh +++ b/4-Infrastructure/storage/restic/backup.sh @@ -37,7 +37,7 @@ fi export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_DEFAULT_REGION export RESTIC_REPOSITORY RESTIC_PASSWORD_FILE -RDS_HOST="${RDS_HOST:-localhost}" +RDS_HOST="${RDS_HOST:-100.92.88.64}" RDS_PORT="${RDS_PORT:-5432}" RDS_USER="${RDS_USER:-postgres}" RDS_DB="${RDS_DB:-postgres}"