Cleanup Policies
To prevent the accumulation of unused resources, you can configure cleanup policies.
Delete inactive dev environments
After the dev environment is stopped, the corresponding resources are released immediately. This doesn't apply to the dev environment volume. The volume is preserved in a block storage, and when the user restarts the dev environment, in fact, CodeCanvas creates a new dev environment and mounts the preserved volume to it. To prevent the accumulation of unused dev environments (i.e., volumes), you can configure the cleanup policy to delete inactive dev environments.
Select Administration in the header navigation, then in the sidebar menu, select Cleanup Policies.
In Delete inactive dev environments, click On and specify:
Reminder period (days) – the number of days after which the user receives an email reminder that the dev environment is about to be deleted. The user can extend the lifetime of the dev environment by clicking the link in the email.
Inactivity period (days) – the number of days after which inactive dev environments are automatically deleted.
Convert inactive volumes to snapshots
To avoid the costs of storing inactive dev environment volumes, you can convert them to snapshots. Unlike volumes that are stored in block storage, snapshots are stored in cheaper object storage, like Amazon S3. Converting volumes to snapshots saves storage costs, but restarting a dev environment from a snapshot takes longer than from a volume.
Select Administration in the header navigation, then in the sidebar menu, select Cleanup Policies.
In Convert inactive volumes to snapshots, click On and specify:
Inactivity period (hours) – time period in hours after which the volume of an inactive dev environment is automatically converted to a snapshot. Set the period to
0
to convert volumes immediately after a dev environment is stopped.
Delete unused warm-up snapshots
Warm-up snapshots are stored in an object storage, like Amazon S3. To prevent the accumulation of unused warm-up snapshots, you can configure the cleanup policy to delete them after a certain period of inactivity.
Select Administration in the header navigation, then in the sidebar menu, select Cleanup Policies.
In Delete unused warm-up snapshots, click On and specify:
Inactivity period (days) – the number of days after which unused warm-up snapshots are automatically deleted.