Тема: deployment
-
Какие правила хранения образов удерживают реестр контейнеров компактным, не удаляя при этом ещё развёрнутые образы?
Открытый вопрос: реестры собирают мусор только среди blob'ов, на которые не ссылается ни один манифест, а политики жизненного цикла помечают образы как устаревшие по возрасту, количеству или шаблону тега; какую комбинацию правил команды применяют годами без неограниченного роста реестра и без отката, сорвавшегося из-за того, что нужный образ уже удалён?
-
Welche Rollout-Strategie funktioniert auf einem einzelnen Host mit Docker Compose und Reverse Proxy?
Offene Frage: Rollierend, Blue-Green und Canary sind für Orchestratoren beschrieben; viele kleine Dienste laufen aber auf einem Host mit Docker Compose hinter Traefik, nginx oder Caddy. Welche Nachbildung – zweiter Container mit umgeschalteter Proxy-Regel, gewichtete Verteilung, start-first – haben Teams über Monate betrieben, was hat sie gebrochen, und ab welcher Grösse lohnt sich der Orchestrator?
-
Tags and releases: lightweight versus annotated tags and how they travel
A lightweight tag is only a name for a commit; an annotated tag is an object with tagger, date, message and optional signature, which is why git describe ignores lightweight tags by default and why releases should use annotated or signed tags; tags are not pushed with branches unless --follow-tags or --tags is used, and a published tag should never be moved.
-
Корректное завершение работы: обработка SIGTERM в сервисах
Среды выполнения контейнеров отправляют SIGTERM и перед SIGKILL выжидают период для завершения работы. Сервис должен перестать принимать новую работу, завершить или вернуть текущую, закрыть соединения и выйти за отведённое время. Игнорирование сигнала превращает каждое развёртывание в перебой.
-
Design rollback before rollout
Write a recovery decision tree before deployment, distinguishing reversible configuration changes from data migrations that need compensation.
-
Datenbankänderungen ohne Ausfall: Expand und Contract
Ein Schema in drei einzeln auslieferbaren Schritten ändern: erweitern (neue Spalte oder Tabelle anlegen, alte behalten), migrieren (doppelt schreiben und in Häppchen nachfüllen), zusammenziehen (Altes entfernen, sobald aller Code das Neue nutzt); lange Sperren vermeiden, indem keine Tabelle in einem Statement umgeschrieben wird und lock_timeout jede Wartezeit begrenzt.
-
Canary behavior changes before rollout
Expose a bounded cohort to a new behavior, compare it with a baseline and stop using predeclared failure conditions.
-
Read-only maintenance mode: serving reads while writes are paused
For storage moves, failovers and long migrations, a service can keep serving reads and refuse writes with a clear message instead of going dark; PostgreSQL's default_transaction_read_only makes new transactions read-only at the database as a backstop, and HTTP 503 with Retry-After tells clients when to try again. The mode needs one switch, a user-facing message and a rehearsal.
-
Rolling, blue-green and canary deployments compared
Rolling updates replace instances gradually within surge and unavailability bounds; blue-green runs the full new stack beside the old and switches traffic at once; canary sends a small share of real traffic to the new version and promotes on evidence. The choice depends on capacity, rollback speed and whether two versions may serve at the same time.
-
Методология двенадцати факторов как контрольный список для сервисов
Двенадцать факторов описывают соглашения для развёртываемых сервисов: одна кодовая база, объявленные зависимости, конфигурация в окружении, вспомогательные сервисы как подключаемые ресурсы, строгое разделение сборки, выпуска и выполнения, процессы без состояния и журналы как потоки событий.
-
Managing secrets outside the repository
Credentials belong in protected configuration injected at runtime, never in source control, images or logs; rotate them on a schedule and on suspicion, and give each service its own.
-
Продвижение одной сборки по средам: продвижение конфигурации и сходство разработки с продакшеном
Соберите артефакт один раз, присвойте ему неизменяемую идентичность и продвигайте именно этот артефакт из тестовой среды в предпродакшен и продакшен, меняя только конфигурацию конкретной среды. Поддерживайте сходство сред по вспомогательным сервисам и топологии, чтобы успешный этап помогал прогнозировать следующий.
-
Schema migrations run with a short lock_timeout and automatic retry cause fewer deploy-time incidents than migrations without one
Hypothesis: because most ALTER TABLE forms take an ACCESS EXCLUSIVE lock that queues behind any long transaction while blocking every later query, migrations executed with a lock_timeout of a few seconds and a bounded retry loop produce fewer and shorter deploy-time outages than the same migrations run with the default unlimited wait, at the cost of a few migrations that need a manual rerun.
-
Rolling out a service worker safely: scope, versioned caches, the waiting worker and a kill switch
A service worker that caches HTML can pin users to old code after a deploy. Register it with an explicit scope, fetch the script fresh on every update check, version caches per build and delete old ones on activate, choose per-resource strategies, decide how the waiting worker takes over, and ship a tested kill switch before the first release.
-
Which pre-deployment checks have actually stopped a bad release in the last year, and which have never fired?
Open question: pipelines accumulate gates (tests, scans, smoke checks, canary analysis, manual approvals, rollout deadlines), and the Kubernetes documentation notes that a stalled Deployment is only reported, not rolled back; which gates have a record of stopping a bad release, which never fired, and which fired only falsely?
-
Переключатели функций: виды, срок жизни и удаление
Переключатели отделяют развёртывание от выпуска, но каждый переключатель — ветвление в коде; классифицируйте их по назначению (выпуск, эксперимент, эксплуатация, разрешения), назначайте каждому владельца и дату удаления.
-
Zero-downtime schema changes with expand and contract
Change a schema in three deployable steps: expand (add the new column or table, keep the old), migrate (dual-write and backfill in batches), contract (remove the old after all code uses the new); avoid long locks by not rewriting tables in one statement.
-
Создание небольших воспроизводимых образов контейнеров
Фиксируйте базовые образы по дайджесту, устанавливайте зависимости из файлов фиксации с проверкой хешей, копируйте только необходимое во время выполнения, запускайте от пользователя, отличного от root, добавляйте проверку работоспособности и не допускайте секретов в слоях и аргументах сборки.
-
Теги и дайджесты образов контейнеров: изменяемые имена и адреса содержимого
Тег — понятный человеку указатель, который в любой момент можно перенаправить на другой манифест; дайджест — хеш байтов манифеста, навсегда определяющий ровно один образ. Собирайте и тестируйте по тегу, развёртывайте и фиксируйте по дайджесту и записывайте дайджест в каждых примечаниях к выпуску.
-
Running a service under systemd
A unit file declares how a service starts, restarts and is confined; use Type, Restart=on-failure, resource limits and sandboxing directives, and read logs with journalctl instead of writing your own daemonisation.
Машиночитаемо: JSON