PHP, Symfony and HTTPS in one run: the clean and existing coordinator
Ten phases on a fresh VM, E-01 verification without writes, and a real Composer failure: the runtime scope already covered by host setup.
Separate commands could already install PHP, prepare private Symfony and verify HTTPS. I combined them in a host setup coordinator so one reviewed run passes exact results between phases. On a fresh Debian VM, it completed ten lower stages; on the educational E-01, it separately verified an existing completion without server writes.
Where this sequence starts
Administrator SSH-key and sudo access, independent current-boot evidence, base prerequisites with Nginx and an accepted management firewall are prepared separately. The certificate, key and private HTTP-authentication profile are also ready beforehand. This coordinator run starts with a new PHP runtime. Initial root access and data-service installation remain their own stages.
clean requires absent selected PHP packages, original paths and the role journal. existing receives an explicit reference to a verified completion. Neither scenario substitutes for the other.
Bind the plan to specific inputs
The private JSON profile selects the scenario, administrator env and known lower profiles. For first installation it also names a keyring with SHA256, an ordinary local Git checkout and the exact teaching-skeleton commit. It contains no arbitrary shell-command sequence. Input files stay private, and the control directory has mode 0700.
deploy-cli host setup plan \
--profile-file "$CLEAN_RUNTIME_PROFILE" \
--plan-file "$WORKFLOW_PLAN"
Planning checks administrator admission, console evidence and firewall, and retains the first lower candidate. It binds exact inputs and the actual CLI executable. Keep that same executable for this workflow: changing the binary or reviewed files requires separate consideration.
Ten phases in one run
The fixed order is foundation → refresh → packages → layout → configuration → activation → enable → minimal → private → HTTPS. Each action remains with its existing lower owner. Later plans are generated just before their phase under the reviewed typed profiles; the initial workflow does not claim a pre-observed snapshot of every future step.
After reviewing the plan, grant two distinct permissions: operator-local records and privileged changes for the new runtime. The command contains no password argument.
deploy-cli host setup apply \
--plan-file "$WORKFLOW_PLAN" \
--plan-sha256 "$WORKFLOW_PLAN_SHA256" \
--approve-local-write \
--approve-privileges
On a fresh VM, this invocation completed all ten phases. Selected actual CLI JSON response fields follow; digests and other fields are omitted.
{
"status": "passed",
"entry_mode": "clean",
"completed_stages": 10,
"host_write_attempted": true,
"host_write_performed": true,
"host_write_state": "changed",
"runtime_ready": true,
"whole_host_ready": false
}
After completion on the VM, I separately read service state with a standard command. Its actual stdout follows; no service was restarted.
systemctl is-active nginx.service deploy-cli-php85.service
active
active
Do not blindly restart an incomplete run
Before a server write, the coordinator retains local intent and the exact phase plan. A successful result receives its own immutable reference. If a lower action refuses or its result is unknown, the next phase does not run. The incomplete prefix stays for investigation, without automatic reset or resume.
A real failure exercised this rule: the first VM completed eight phases, but Composer timed out downloading a public GitHub archive; its log also reported refusal to clean the vendor directory after the failed installation. The coordinator did not proceed to HTTPS, and repeat apply refused before server actions. All 35 retained workflow files stayed unchanged. A separate state read showed FPM remained inactive/dead after the failure; runtime readiness was not established. We retained and shut down that fixture. After separately verifying a complete HTTPS download, we started another fresh VM with verified network addresses pinned only in the test fixture, keeping TLS checks and composer.lock intact. Composer installed dependencies again; no prepared vendor tree was copied.
Final HTTPS verification produces a completion with its own SHA256. Verification uses that independently accepted digest to check retained local files and the current runtime:
deploy-cli host setup verify \
--plan-file "$WORKFLOW_PLAN" \
--plan-sha256 "$WORKFLOW_PLAN_SHA256" \
--completion-sha256 "$COMPLETION_SHA256"
Apply replay with an explicit completion digest also only verifies. Replay without that digest refuses; it does not start installation again.
Existing checks an existing result
A different profile explicitly selects installation, adoption or reconciliation completion. Accepted configuration with a newer APT checkpoint needs all separate references and pins for that reader. This path grants only permission for new operator-local records:
deploy-cli host setup plan \
--profile-file "$EXISTING_COMPLETION_PROFILE" \
--plan-file "$EXISTING_WORKFLOW_PLAN"
deploy-cli host setup apply \
--plan-file "$EXISTING_WORKFLOW_PLAN" \
--plan-sha256 "$EXISTING_WORKFLOW_PLAN_SHA256" \
--approve-local-write
On E-01, actual plan, apply, verify and repeat reading passed without attempting a server write. Apply here publishes an operator-local completion rather than reinstalling the runtime. Selected actual CLI JSON response fields follow:
{
"status": "passed",
"entry_mode": "existing",
"completed_stages": 0,
"local_write_attempted": true,
"host_write_attempted": false,
"host_write_performed": false,
"runtime_ready": true,
"whole_host_ready": false
}
All 54 selected files, the package snapshot and Nginx/PHP-FPM observations on the VPS were preserved. On the separate VM, I added an owned foreign Nginx file, observed an existing-verification refusal, removed that file and confirmed that the incomplete workflow still would not resume automatically. A separate completed-runtime verification after cleanup passed; 46 selected files and service observations stayed exact.
The frame below summarizes saved results from these runs. It is a genuine terminal summary, without executing the commands again during capture.


The runtime is ready within its scope
runtime_ready covers prepared PHP, private Symfony and local HTTPS. whole_host_ready remains false: subsequent stages still need to join initial access, other services and separate new-boot verification. The teaching site retains its password and noindex. Primary E-01 backups remain in the Mirohost panel; the separate R2 experiment is not a prerequisite for this coordinator.