Commit Graph
33 Commits
Author SHA1 Message Date
deytenit 860ff34c70 Remove the image build and consolidate operational code under scripts 2026-11-08 12:39:49 +03:00
deytenit ef5be2331d Bootstrap private node checkouts and operator access from the workstation 2026-11-08 12:39:49 +03:00
deytenit 702857ec0a Apply platform SSH policies through a recoverable port handover 2026-11-08 12:39:49 +03:00
deytenit ba9ef92051 Split host setup into explicit entity actions 2026-11-08 12:39:49 +03:00
deytenit a297e7c71e fix: allow non-Compose commits on Docker-free hosts [skip ci] 2026-11-08 12:39:48 +03:00
deytenit 36c50290d1 fix: synchronize node main directly without capture CI [skip ci] 2026-11-08 12:39:48 +03:00
deytenit c091cbfb80 Use Gitea repository guidance and retain Alloy security regression check [skip ci] 2026-11-08 12:39:48 +03:00
deytenit 325e7ae5fb Merge deployed native Alloy and backup recovery changes [skip ci] 2026-11-08 12:39:48 +03:00
deytenit dd9b4fb93b Deliver tested native Alloy and backup recovery sources 2026-11-08 12:39:47 +03:00
deytenit 8f68303912 Add native Alloy configuration for isolated Icarus deployment 2026-11-08 12:39:47 +03:00
deytenit 0881013357 docs(apex): keep public guidance and examples deployment-neutral 2026-10-26 12:53:58 +03:00
deytenit 995ea9bdf9 fix(apex): preserve environments and restore secure standalone operations 2026-10-26 12:26:09 +03:00
deytenit 6463bad5ee feat(engine): de-slop commons, harden security, add targeted compose and env bridge
- Purge misplaced RFCs, scratch tokens, and node-proprietary assets
- Decouple remote provisioning to ci/scripts/init-node.py
- Add targeted composition orchestration in actions/compose.py
- Add host-side Xray stale socket cleanup in /dev/shm
- Add actions/env.py for shell exports and .env synchronization
- Harden UFW, backup retention, host tempfiles, and notify dispatcher
- Add pyproject.toml and Makefile with 78 passing unit tests
2026-10-26 00:03:33 +03:00
deytenit 3e26df259f fix: check running images with Docker Buildx
Compare matching runtime and registry digest types, and distinguish declared Compose builds from registry images. Report unavailable checks explicitly.

Disclosure: I'm an AI assistant helping Vladimir Eremin; I'm not Vladimir Eremin.
2026-10-11 02:18:46 +03:00
deytenit fe86e55f4a feat: apply node timezone before scheduled jobs
Read an optional configs/timezone declaration and refresh active cron after a timezone change. Report a failed cron restart instead of claiming success.

Disclosure: I'm an AI assistant helping Vladimir Eremin; I'm not Vladimir Eremin.
2026-10-11 02:07:13 +03:00
deytenit 99ff1f1433 fix: share Happ generation and correct protocol labels
Move the reusable generator into commons, add Netherlands display metadata, and label Hysteria links by protocol without changing URI parameters.

Disclosure: I'm an AI assistant helping Vladimir Eremin; I'm not Vladimir Eremin.
2026-10-11 01:49:44 +03:00
deytenit 65fef9a6b0 fix: support current Traefik ACME certificate export
Update the on-demand certificate dumper to v2.11.4 so Traefik accounts without KeyType no longer panic. Validated native export and all 260 tests.

Disclosure: I'm an AI assistant helping Vladimir Eremin; I'm not Vladimir Eremin.
2026-10-11 01:23:21 +03:00
deytenit 6be21acde1 feat: initialize Debian nodes through shared provisioning
Add local SSH enrollment for clean Debian 13 hosts using the same baseline and user-data contract as Packer. Preserve provider networking, validate storage and repository ownership, and protect final SSH and security-service activation with persistent access recovery.

Document composition-scoped replication patterns for independent node repositories and add behavioral coverage for provisioning, retries, and recovery. Native verification of the security activation transaction remains the production enrollment gate.

Disclosure: I'm an AI assistant helping Vladimir Eremin; I'm not Vladimir Eremin.
2026-10-10 20:32:12 +03:00
deytenit 0748ab43a0 feat: Add memory retention policies for apt and systemd-journal 2026-09-27 21:41:02 +03:00
deytenit 7b4e40dba5 fix(configure): gracefully handle missing ufw dirs and skip redundant apt calls 2026-09-13 15:39:23 +03:00
deytenit 6123c3f6b4 feat: add Debian 13 golden image Packer pipeline and cloud-init bootstrap 2026-08-30 19:48:22 +03:00
deytenit b72b961968 fix: forward host proxy env vars and network to dclint container 2026-08-09 01:09:18 +03:00
deytenit bd973d783d refactor: make engine domain-agnostic — identity from node.env, no hardcoded domain
Drop the hardcoded-domain FQDN regex and every hardcoded domain from commons.
Node identity is now explicit in node.env: APEX_NODE_FQDN (real FQDN,
traefik Host()), APEX_NODE_HOST (public host name — backup --host,
obs/notify instance), APEX_SUBNET. The short name (log prefix, sync/<node>
branch, messages) is derived as the first host label.

notify instance is just the host (no hardcoded prefix); the git bot identity
moves to APEX_GIT_AUTHOR_NAME/EMAIL (node.env) with generic defaults. Alloy
node+instance labels use APEX_NODE_HOST. Fallbacks keep a node working if it
omits a var (host<-fqdn<-hostname).

BREAKING CHANGE: removes APEX_NODE and APEX_CLUSTER env vars; node name is now derived from APEX_NODE_FQDN
2026-07-08 09:32:20 +03:00
deytenit 07a53b9b2f feat: migrate to resticontainer with label-driven per-service backup
Swap the restic core service for resticontainer
(ghcr.io/deytenit/resticontainer:0.19.1): per-service backup intent via
restic.* compose labels (paths / stop / pre+post hooks), docker socket +
/:/hostfs:ro to resolve container mounts to host paths and snapshot the
union in one restic run. backup/run drops explicit /data/tier1,2 args
(paths now come from labels), keeps init/forget/notify, and guards on a
fresh snapshot. Snapshots are stamped --host <node>.apex.ermnvldmr.com
--tag biweekly and written with --compression max.
2026-07-07 20:37:31 +03:00
deytenit 334ca196e0 feat: add .apex-root-owned opt-out for root-owned tier compositions
An empty .apex-root-owned marker in a composition dir makes tiers/useradd
skip its noroot user + .env UID injection, and tiers/chown force its tier
data (dir + children, recursively) to root:root instead of noroot-<proj>.
For services that run as root and reject non-root-owned data (e.g. seafile-mc).
2026-07-06 10:39:04 +03:00
deytenit ce93f879e7 refactor: gate xray behind profile, expose loki via basicauth, move happ generator to daedalus
- xray gets profiles: [xray] — daedalus/icarus opt in via COMPOSE_PROFILES,
  morpheus never runs it.
- loki is routed at /loki on the node FQDN behind basicauth
  (APEX_LOKI_BASIC_AUTH from node .env); /loki is loki's native API prefix
  so no strip-prefix needed.
- utils/generate-happ-subscriptions + source/ move to daedalus proprietaries;
  commons keeps only what every node shares (16 actions now).
2026-07-05 12:16:51 +03:00
deytenit 1bc448961a fix: update sync/repository rebase target from trunk to main 2026-07-05 12:04:24 +03:00
deytenit c5b61a3294 fix: exclude commons/ from dclint --fix to prevent submodule dirtying
In node repos the shared core compose lives inside the pinned commons
submodule; letting dclint rewrite it dirties the submodule, which makes
sync/repository abort the nightly capture-up. Harmless in the standalone
commons repo (no commons/ dir).
2026-07-05 11:20:25 +03:00
deytenit 6aaef35780 fix: resolve 17 confirmed bash-parity drifts from port review
Adversarial parity review of every ported action against its bash source
confirmed 17 real behavioral drifts (of 22 claimed); all fixed here:

- tiers/chown: defaults were compositions/apex/tierN (one level too deep);
  now the tier roots. shared/ base reset is non-recursive again.
- compose: --dry-run was swallowed by argparse.REMAINDER; now stripped.
- host.write_file: rendered files land 0644 (tempfile's 0600 made fresh
  systemd units/crowdsec configs owner-only).
- systemd.deploy_units: top-level non-hidden files only.
- ufw: missing docker/host config dir exits 66; missing /etc/ufw target
  aborts; empty rules dir warns; dotfile .rules excluded.
- sync/packages: Telegram error-trap parity and failed notify exits 1.
  Same notify-failure exit for backup/run and sync/repository.
  repository regains the node-dir guard.
- tiers/useradd: no more secret-bearing .env.bak per run.
- tiers/link: EOF on confirm prompt declines and continues.
- extract-traefik-certs: sudo mkdir inside the notify envelope.
- generate-happ-subscriptions: realpath parent-exists guards + docker check.
- configure/crowdsec: bouncer install goes through install_packages.
- lint-docker-compose: malformed/unreadable anchor-IP inputs are lint errors.
- core compose: APEX_RESTIC_REPOSITORY now ?error; RESTIC_COMPRESSION
  per-node via APEX_RESTIC_COMPRESSION (default auto).
- sys.service_exists line-anchored; tpl docstring corrected.
2026-07-05 10:50:40 +03:00
deytenit ec54ab592f feat: port utils actions (extract-traefik-certs, generate-happ-subscriptions, lint-docker-compose) 2026-07-04 21:29:17 +03:00
deytenit b9c80b0212 feat: port tiers actions (link, chown, useradd) 2026-07-04 21:28:28 +03:00
deytenit f7fc0eb697 feat: port sync and backup/run actions 2026-07-04 21:27:39 +03:00
deytenit 05469332e8 feat: port configure actions (base, ufw, crowdsec, cron, systemd, routing) 2026-07-04 21:26:56 +03:00