Update to Atomic deployments

May 3, 2017

Update to Atomic deployments

Atomic deployments are the first in the series of pipeline templates that we introduced to Buddy.

In short, they allow you to update your website with zero downtime by uploading the files a cache directory on the server and switching the symlink of the web server to the new version when everything's finished.

Recently we've modified the template by adding a feature that lets you define how many website versions you want to keep on the server.

This setting is useful to prevent the disk from getting full. By default the number of cached versions in 10. To change it, expand More Options at the bottom of the template details:

Atomic deployment templateAtomic deployment template

How atomic deployments work

INFO: If you'd like to read about Atomic Deployments in detail, check out our feature here.

The template requires SFTP installed on the server and consists of two actions: SFTP and SSH. It creates a couple of directories on the server to which the files are uploaded and stored:

  • /current - the directory to which your web server points. It contains a symbolic link to the current website version in the /releases directory.
  • /releases - contains the history of uploaded releases. For each version, a directory with the name of the release tag is created. This allows for a quick rollback of changes.
  • /deploy-cache - used for storing new files during the deployment. Once the upload has finished, its contents are copied to a new directory in the /releases directory.

WARNING: Buddy only deploys files resulting from the changeset between the current and uploaded revision to the /deploy-cache folder. There's no need to clear the cache on every deployment.

Share:

Alexander Kus

Alexander Kus

Customer Success Manager

A story-teller and conversation-lover, Alexander decided to invest his skills to help his friends at Buddy transform the cold language of patch notes into exciting narratives. Also: an avid gamer, hip-hop DJ, Liverpool FC fan, absentminded husband, and the father of two.