Persistent Storage

Note: currently this feature is not available for Kubernetes based deployments. We will be adding this soon.

You can enable the persistent storage feature when you need to keep your data intact between deployment restarts. This feature comes with a few important details:

  • Squash automatically skips the application build process when persistent storage is enabled. This is to avoid re-creating the containers and potentially erasing your data.
  • Because the application build process is skipped, the deployment startup process will be faster when this is enabled.
  • Squash does not automatically update the deployment with the latest code running in the branch, this is also to prevent destroying your data. For such cases you can still manually update the code by connecting to the deployment VM through SSH. You may also define Custom Deployment actions to quickly perform safe application restarts/updates from the Squash deployment settings page.

Life cycle of persistent storage volumes

Once a deployment is terminated Squash will keep the persistent storage volume active for the corresponding period defined in the deployment settings page.

  • Currently we support expiration times between 1 and 10 days.
  • Squash automatically renews the expiration date every time you restart a deployment associated with it.
    • For example, let’s say you started a new deployment on April 1st with persistent storage enabled and with the expiration time of 5 days.
    • The deployment is terminated on the same day.
    • Squash will keep the deployment’s storage saved with a termination date of April 6th.
    • On April 3rd you restarted the deployment again.
    • Squash automatically renews its expiration date to April 8th.

How to enable the persistent storage – repository level

You can enable this feature on a repository level in order to enable it by default to all new deployments. Go to the Settings -> Repositories page:

 

Then click settings:

and check the “Enable persistent storage” field and pick the desired expiration time.

 

How to enable the persistent storage – deployment/branch level

You can enable this feature on a deployment specific level, which gives you greater flexibility to turn it off on a per branch/application basis.

Got to the deployment settings page and click on “Settings”:

 

Then click on “Persistent Storage” and pick the desired expiration time.

Persistent Storage notification in the Squash web interface

Once the persistent storage feature is enabled Squash will indicate in a few areas when the feature has been successfully retrieved. There are a few scenarios where this feature will be enabled and Squash won’t be able to retrieve it:

  • When the persistent storage volume has expired
  • During restarts without persistent storage enabled:

 

This is how Squash will notify you when the persistent storage is successfully retrieved for a given deployment:

 

 

And from the deployment loading page: