Skip to content
quest'n'click

Clever CloudHow-toFor adminsApplies from 4.2.3

Costs and teardown

Cette page en françaisThis page on the GitHub wiki

What a hosted Studio is made of on your Clever Cloud bill, and how to delete all of it once the game is safe elsewhere.

What you get

An organisation with nothing left of the Studio: no app, no add-on, no bucket, no DNS record pointing at Clever Cloud, and no secret of it left on your machine; with the game kept outside, beforehand.

Context and versions

  • A hosted Studio on Clever Cloud, from 4.2.3.
  • Verified on: not verified on a live installation. The spike's and the reference deployment's resources were kept for later passes (D44), not deleted; this teardown has not been exercised.

What you pay for

No price was measured by this project (no invoice, no dated price list in the repository). What a deployment holds, to price on Clever Cloud's pricing page on the day:

ResourceThe reference deployment's size
The studio appNode.js XS, 1 instance (2 during each redeploy, for a few minutes)
The studio-worker appNode.js XS, 1 instance (2 during each redeploy)
PostgreSQLplan DEV, too small for a team (Apps and add-ons)
Cellarplan S; the bucket grows for good with previews and the journal (Retention)
Keycloakmanaged, plan BASE
A drill's PostgreSQL add-onfor the time of a drill, if you delete it after

Prerequisites

Where to run the commands

On your machine, in the engine repository where the apps are linked (clever …); the bucket with an S3 tool; the DNS records at your DNS provider.

Steps

  1. Stop the daily backup, so nothing writes to the bucket while you empty it:

    # on your machine, in the engine repository
    clever env rm STUDIO_BACKUP_CRON --alias my-game-studio
    clever stop --alias my-game-studio
    clever stop --alias my-game-worker
  1. With an S3 tool and the Cellar credentials, empty the bucket (sha256/, journal/, backups/, staging/), then delete it. Check your copy elsewhere opens before you do.
  1. Delete the add-ons (a drill's too, if one is left):

    # on your machine, in the engine repository
    clever addon delete my-game-pg
    clever addon delete my-game-cellar
    clever addon delete my-game-pg-drill

    The managed Keycloak is an add-on too: delete it the same way if it serves nothing else, or only its web-scumm realm in its admin console.

  1. Delete both applications:

    # on your machine, in the engine repository
    clever delete --alias my-game-studio
    clever delete --alias my-game-worker
  1. Remove the DNS records of studio., play. and worker. at your DNS provider; delete .clever.json from the repository folder and ~/secrets/my-game/ (the job keys, the session key, the tokens, the realm file); remove the CLI's entry for the server from ~/.config/web-scumm/studio-tokens.json; at your Git host, remove the Studio's deploy key.

Expected result, and how to check it

clever applications list and clever addon no longer list them; Clever Cloud's console shows no resource of the Studio; https://studio.example.fr no longer resolves to Clever Cloud.

Common errors

SymptomCauseFix
The bucket cannot be deletedIt still holds objectsEmpty it first (step 2)
clever delete asks which appNo alias given--alias
A backup appears after you emptied the bucketThe cron ran on an instance still upStep 1 first, then empty again

Files or data changed

Everything of the installation is deleted: apps, database, bucket, Keycloak realm or add-on, domains, secrets. Only the export and the copies you made remain.

Recovery or going back

None from Clever Cloud once deleted. With the backup and the bucket copy you kept, a new installation of the same version can be restored (restore drill); with the exported folder, a new one can import the game, as a new history.

References