MySQL, Redis and Elasticsearch in shared setup
Five original stages per role, separate clean VMs, loopback services and exact pinned verification.
I connected MySQL, Redis and Elasticsearch to shared setup. Each role ran on its own fresh Debian VM, with only one 1 GB fixture running at a time. These are three independent successful runs, not all three services installed together on a small VPS.
One explicit role per profile
The profile selects mysql84, redis80 or elasticsearch9. MySQL and Elasticsearch require a separately reviewed public repository key with its exact SHA. Redis uses the system package source and omits both key fields. Replace private paths and hashes in the schematic example. A repository key is neither an SSH key nor a password.
{
"schema_version": 1,
"entry_mode": "clean",
"environment_file": "/private/administrator.env",
"data": {
"role": "mysql84",
"request_file": "/private/request.json",
"profile_file": "/private/mysql.json",
"key_file": "/private/mysql-public-key.gpg",
"key_sha256": "<REVIEWED_PUBLIC_KEY_SHA256>",
"foundation_dependencies_file": "/private/data-foundation-dependencies.json"
}
}
Set resource limits separately
The next block groups three separate resource-profile examples. Put only the matching inner object into the selected role file. The fixture used MySQL memory_max 384 MiB with a 128 MiB buffer pool, Redis 128 MiB with maxmemory 64 MiB and Elasticsearch 768 MiB with heap 256 MiB. These are tested isolated-VM limits, not universal production sizing.
{
"mysql84": {
"schema_version": 1,
"role": "mysql84",
"memory_max_mib": 384,
"buffer_pool_mib": 128
},
"redis80": {
"schema_version": 1,
"role": "redis80",
"memory_max_mib": 128,
"maxmemory_mib": 64
},
"elasticsearch9": {
"schema_version": 1,
"role": "elasticsearch9",
"memory_max_mib": 768,
"heap_mib": 256
}
}
An original startup policy is required
Administrator access, firewall, Nginx startup protection and runtime-data startup policy are independently admitted first. Setup consumes the exact original startup-policy plan, SHA and manifest. A dependency-file outline follows. A similar existing service cannot be silently adopted: this path performs clean installation.
{
"schema_version": 1,
"start_policy": {
"plan_file": "/private/start-policy.plan.json",
"plan_sha256": "<ORIGINAL_START_POLICY_SHA256>",
"manifest_sha256": "<ORIGINAL_START_POLICY_MANIFEST_SHA256>"
}
}
Five ordered stages
The shared coordinator invokes the existing foundation, refresh, packages, configuration and activation roles. Each supplies exact dependencies to the next. Packages retain signed metadata, approved archive closure and immutable history. Apply runs once after planning; partial or unknown outcomes stop the workflow.
deploy-cli host setup plan \
--profile-file "$DATA_PROFILE" --plan-file "$DATA_SETUP_PLAN"
deploy-cli host setup apply \
--plan-file "$DATA_SETUP_PLAN" --plan-sha256 "$DATA_SETUP_SHA256" \
--approve-local-write --approve-privileges
What MySQL returned
The first result block selects actual fields from the successful MySQL run. All five stages completed. The original configuration retained utf8mb4 and utf8mb4_0900_as_ci. Initialization and protection of database administrative access remain inside the original role; the response prints no secret.
{
"status": "passed",
"completed_stages": 5,
"data_service_ready": "mysql84",
"runtime_ready": false,
"whole_host_ready": false
}
Separate Redis and Elasticsearch runs
The next two blocks select actual response fields from two other fresh VMs. Each role completed its five stages and local-service verification. Listeners are loopback-only. Application database users, application Redis ACLs, index roles, data migration and opening external ports were outside this step.
{
"status": "passed",
"completed_stages": 5,
"data_service_ready": "redis80",
"runtime_ready": false,
"whole_host_ready": false
}
{
"status": "passed",
"completed_stages": 5,
"data_service_ready": "elasticsearch9",
"runtime_ready": false,
"whole_host_ready": false
}
Readiness belongs to the selected service
data_service_ready names the verified role. runtime_ready and whole_host_ready remain false. Verify and apply with an exact completion SHA performed no new writes; unpinned replay was refused. Base-utility readiness was also rechecked after new repositories and packages. The command and selected actual MySQL verify fields follow.
deploy-cli host setup verify \
--plan-file "$DATA_SETUP_PLAN" --plan-sha256 "$DATA_SETUP_SHA256" \
--completion-sha256 "$DATA_COMPLETION_SHA256"
{
"status": "passed",
"data_service_ready": "mysql84",
"host_write_attempted": false,
"local_write_attempted": false,
"runtime_ready": false,
"whole_host_ready": false
}
The next combined run
The frame below shows saved result summaries in a genuine terminal; installers were not rerun during capture. All VMs shut down normally. This run changed no rented E01, production or provider settings. The next separate proof must connect these stages into the complete first-root-to-sites workflow.

