You ship a release every two weeks and you’ve decided to stop doing in-place upgrades on the production environment. The plan is a textbook blue-green: clone acme-prod to acme-prod-green, deploy the new build there, run the smoke suite against the cloned database, swap the public endpoint, and keep the old environment around for a quick rollback. You hit the Clone button in the PaaS panel, wait nine minutes, open the green environment, and the first smoke test fails because the cron that rebuilds the search index doesn’t exist, the persistent uploads directory is empty, the SMTP credentials are unset, and the Let’s Encrypt binding is pointing the old hostname at the new container. The clone copied the topology. It did not copy the operational state attached to it.
What’s happening
A Jelastic-style environment clone is a deep copy of the topology and software layers but not of every piece of state attached to that topology. Concretely:
- Containers (compute nodes): the image, the layer, the variables defined on the node, and the contents of node-mounted volumes — yes, copied.
- Persistent storage nodes (the dedicated storage layer): by default, not included in the clone unless you explicitly select the storage node in the dialog. Most operators don’t because the dialog defaults to compute only.
- External database services attached via add-on: copied as topology, but the data inside the cloned DB is a snapshot at clone-start time — anything written to source during the nine-minute clone is missing.
- SSL bindings (Let’s Encrypt add-on): the add-on is copied; the issued certificate is not — you get a new add-on with no certificate until you trigger issuance against a hostname the green environment actually answers on.
- External hostnames / custom domains: copied as configuration entries but not bound to the green environment’s load balancer. The DNS record still points at blue.
- Scheduled tasks (cron in the cron add-on): copied if they live in the cron add-on; not copied if they were
crontab -e’d directly on a container. - Environment variables you set in the panel: copied. Secrets you set via filesystem mounts: copied only if the underlying volume is copied.
- External endpoints (NAT, public IPs, fixed ports): copied as configuration, but public IPs are not transferred — green gets new IPs unless you re-attach the reserved IP after swap.
- Region-specific resources (object storage buckets, S3 credentials): the env variables come over, but the bucket itself is shared between blue and green until you fork it.
The clone is a snapshot of what runs, not of what the environment depends on. The blue-green model assumes you’ve identified that distinction before the swap.
How to verify
Three checks run against the clone before traffic flips.
Inventory the topology delta from the CLI:
# Authenticate (Jelastic CLI)
jelastic-cli --user "$JELASTIC_USER" --password "$JELASTIC_PASS" \
--hoster "$HOSTER_DOMAIN" environment Control GetEnvInfo \
--envName acme-prod-green
# Compare with source
jelastic-cli environment Control GetEnvInfo --envName acme-prod \
> /tmp/blue.json
jelastic-cli environment Control GetEnvInfo --envName acme-prod-green \
> /tmp/green.json
diff <(jq '.nodes[]|{type,nodeGroup,fixedCloudlets,flexibleCloudlets}' /tmp/blue.json) \
<(jq '.nodes[]|{type,nodeGroup,fixedCloudlets,flexibleCloudlets}' /tmp/green.json)
Any difference here is intentional only if you sized green differently on purpose. Otherwise it’s a clone bug to file.
Inventory persistent storage attachments:
jq '.nodes[]|select(.nodeGroup=="storage")|{nodeId,disk:.diskLimit,storage:.storageNode}' \
/tmp/green.json
If the storage section is absent on green and present on blue, you need to either re-clone with the storage node selected, or mount green to a snapshot of blue’s storage volume before going live.
Inventory cron entries actually present on each compute node:
# Run on every green node
for nodeid in $(jq -r '.nodes[]|select(.nodeGroup=="cp")|.id' /tmp/green.json); do
echo "=== node ${nodeid} ==="
jelastic-cli environment Control ExecCmdById \
--envName acme-prod-green --nodeId "${nodeid}" \
--commandList '[{"command":"crontab -u jelastic -l 2>/dev/null; ls /etc/cron.d/"}]'
done
Anything missing here that exists on blue is a manual entry that didn’t ride the clone.
Confirm SSL state on green:
jelastic-cli environment Control GetSSLCerts --envName acme-prod-green
If the cert list is empty and the binding is “Let’s Encrypt add-on installed but no certificate issued,” that’s expected on a fresh clone — issuance has to happen against a hostname that resolves to green.
The fix
Treat clone as the start of a runbook, not the end of one. A repeatable green-side checklist that runs in CI or as a single shell script:
#!/usr/bin/env bash
set -euo pipefail
SOURCE_ENV="acme-prod"
GREEN_ENV="acme-prod-green"
HOST_TEMP="green.acme.tld"
HOST_PROD="www.acme.tld"
echo "==> 1. Snapshot blue right before clone (rollback anchor)"
jelastic-cli environment Control CreateEnvBackup \
--envName "${SOURCE_ENV}" --addonNodeGroup cp \
--comment "pre-bluegreen-$(date -u +%Y%m%dT%H%M%S)"
echo "==> 2. Clone with storage layer included"
jelastic-cli environment Control CloneEnv \
--srcEnvName "${SOURCE_ENV}" \
--dstEnvName "${GREEN_ENV}" \
--withExtIPs false \
--withStorage true
echo "==> 3. Reattach scheduled tasks that were defined outside the cron add-on"
# Read source crontab, write to green
SRC_CRON=$(jelastic-cli environment Control ExecCmdByGroup \
--envName "${SOURCE_ENV}" --nodeGroup cp \
--commandList '[{"command":"crontab -u jelastic -l 2>/dev/null || true"}]' \
| jq -r '.responses[0].out')
if [[ -n "${SRC_CRON// }" ]]; then
jelastic-cli environment Control ExecCmdByGroup \
--envName "${GREEN_ENV}" --nodeGroup cp \
--commandList "[{\"command\":\"echo '${SRC_CRON//\'/\\\'}' | crontab -u jelastic -\"}]"
fi
echo "==> 4. Issue Let's Encrypt against a temporary host pointing at green"
# DNS for ${HOST_TEMP} must already resolve to green's LB
jelastic-cli marketplace Installation Install \
--envName "${GREEN_ENV}" --jps lets-encrypt-ssl-addon \
--settings "{\"externaldomains\":\"${HOST_TEMP}\",\"customDomains\":\"${HOST_TEMP}\"}"
echo "==> 5. Run smoke suite against ${HOST_TEMP}"
./smoke.sh "https://${HOST_TEMP}" || { echo "Smoke failed; aborting swap"; exit 1; }
echo "==> 6. Sync the divergence window — anything written to blue during steps 2-5"
# Application-specific. Examples:
# - For DBs: use logical replication slot started at clone-time, drain into green
# - For uploads: rsync delta from blue's storage to green's storage
./drain-delta.sh "${SOURCE_ENV}" "${GREEN_ENV}"
echo "==> 7. Swap public hostname"
# Move the production hostname binding from blue to green
jelastic-cli environment Binder RemoveDomains \
--envName "${SOURCE_ENV}" --domains "${HOST_PROD}"
jelastic-cli environment Binder BindExtDomains \
--envName "${GREEN_ENV}" --extdomains "${HOST_PROD}"
# Re-issue SSL for the real hostname now that DNS will point at green
jelastic-cli marketplace Installation Install \
--envName "${GREEN_ENV}" --jps lets-encrypt-ssl-addon \
--settings "{\"externaldomains\":\"${HOST_PROD}\",\"customDomains\":\"${HOST_PROD}\"}"
echo "==> 8. Hold blue for the rollback window (24h typical)"
echo "Tag blue as rollback-ready and stop deploying to it"
Steps 6-7 are where most blue-green failures concentrate. The clone is fast; the divergence window between clone-start and traffic-swap is where you either lose writes or duplicate them. Decide upfront whether the application can tolerate read-only mode on blue during the swap (clean but slower) or whether you’ll reconcile via logical replication (faster but the schema has to support it).
After 24 hours of healthy green-in-production, terminate blue. Keeping a paused old environment around forever is how you end up paying for two production stacks while protecting nothing — the only useful rollback window is the one short enough that blue’s data is still close to green’s.
Our team operates blue-green cutovers on managed Cloud PaaS as a standard deployment management workflow, including the divergence-window logic above. If you’d rather not own the runbook in-house, scope a managed release pipeline.