Jonathan Bennett

What Does it Mean to "Deploy"

Phrases like “deploying your code” are often thrown around without much explanation. Let’s fix that!

The Software Development Lifecycle

Software is born on a developer’s computer, joined in with other developer’s work, makes it’s way onto test servers, and finally, if everything goes well, ends up on the production server for the entire world to enjoy. These last two steps, going to the test and production server are at the heart of “deployment”.

What is “Deployment”

At it simplest, deployment is taking code from somewhere and putting it somewhere else. Typically, this will be from your developer’s machine, or your shared repository, to the server. Because this process is automated, it’s common to setup additional steps to this process to improve quality. In a typical setup this would include:

  1. automated test to improve reliability, prevent regressions, and confidence
  2. compression and optimization of resources such as images
  3. enforce access control
  4. avoid errors while deploying
  5. track “versions” of the system to help isolate issues

Why Automate?

Even if you can’t set things up to get all the benefits above, automating as much of your process as you can builds the foundation for the other steps.

My projects often have a bin/deploy file which is a simple script file that pulls the latest code, updates the database, refreshes the caches, and reboots the server.

From a process documentation point of view, this is beautiful since I do not need to explain the deployment process to anyone, and if I ever do, it is right there in plain text. Once that works, its a fairly simple process to have the script kicked off by a system, which continues the trend towards automation. This is what lays the foundation of a resilient and stable system.