Skip to content

Roll out SSH deployment archives using releases and an atomic current symlink #1555

Description

@shyim

Parent: #1553 (under #1009).

User story

As a developer using SSH hosting, I want to activate an existing archive through a versioned release directory, so that preparation can finish before the running application's code is switched.

Dependencies and current status

#1554 provides deployment creation; archives produced by deployment package archive are also valid inputs. An implementation exists in the current working branch; review and merge are pending.

Acceptance criteria

  • project deployment rollout <local-archive> -e <environment> uses the supplied archive without rebuilding it.
  • for deployment situations/commands,ssh.directory is an absolute path ending in /current; releases, shared and CLI metadata are siblings beneath its parent.
  • Validate archive paths, entry types and contained symlinks locally; verify the uploaded archive checksum before extraction.
  • Hold a remote process-owned deployment lock across upload, preparation and activation. Concurrent attempts fail clearly.
  • Create a unique release, link the default shared runtime paths, run Deployment Helper, ensure install.lock, and run pre-rollout system checks before activation.
  • Respect existing releases and shared data. Refuse to replace a real current directory or silently migrate data out of a live release.
  • Atomically rename a prepared symlink onto current; repeated rollout of the same deployment creates a distinct rollout reference.
  • Failed preparation preserves current. Client disconnect before activation authorization cannot cause a later switch; a lost connection during activation reports that the active release must be inspected.
  • Retain old/failed releases and useful rollout metadata; remove owned temporary uploads and release the lock on failure.
  • Send helper output to stderr and print the successful rollout reference to stdout.
  • Document PHP/tar/Deployment Helper prerequisites and the distinction between atomic activation and full zero downtime.
  • Exercise the actual remote PHP preparation script with local SSH fixtures, covering repeat rollout, shared-data preservation, helper/check failures, corrupt uploads, locking and disconnect handling.

Out of scope

Configurable shared-path lists (separate child issue), history/rollback commands, database rollback, automatic pruning, and universal worker/OPcache restart behavior.

Readiness checklist

  • Acceptance criteria are defined.
  • Backward compatibility: deployment commands remain experimental behind the deployment build tag.
  • User-facing help/documentation reviewed.
  • Tests added or adjusted and reviewed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Fields

    No fields configured for Story.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions