What is Deployment?
Deployment in software and web development means to push changes or updates from one environment to another. When setting up a website you will always have your live website, which is called the live environment.
If you want the ability to make changes without these affecting your live website, then you can add additional environments. This will typically be a local environment, a development environment and a staging environment (also known as a staging site). How many environments you need is up to you and depends on the complexity of the project you are working on.
While deployment models can vary, the most common is the classic “left to right” deployment model. In this model changes are made in local, development or staging environments (depends on the setup) and then pushed from left to right through the different environments ending up in the live environment. Once this deployment process has completed the new changes will be visible in the live environment.
The above image shows a very simplified and classic way of handling deployments when working with websites in a CMS. You do not necessarily need all of the above environments, but the process stays the same.
By using multiple environments you get a list of advantages - the main one being, that you can make changes without it affecting your live website. Once the changes are made and ready to be pushed live, the deployment process takes care of the rest.
- Software deployment
- Software releases
- Pushing changes
The deployment process
When it comes to the deployment process it will often be split up in a two-part deployment approach. It will typically be a split between meta data and content as these have different impacts on a new environment and need to be handled differently.
Meta data include changes to your code, templates, stylesheets, files and so on. These changes will often require a validation check between environments to see if they have any unforeseen conflicts that need to be resolved. Many deployment tools will include checks for consistency and help guide you in case of conflicts.
Content such as text, images and videos are handled differently during deployment as they are less complicated to move between environments than meta data. For that reason, you will often see that deployment tools make content deployment accessible for content editors and not only for developers. That way a content editor is not depending on a developer when it comes to pushing new content to a live environment.
Remember to have a software deployment plan
To make sure the deployment process goes as smoothly as possible it is best to have a deployment plan that you follow - every time. By having a plan you ensure that everything is done the same way each time changes are made. This is especially helpful when multiple users are working on the same project.
A deployment plan can include rules for when to deploy from local environments to development or staging sites as well as time plans for when new changes can go to a live environment. By having a set plan you reduce the risk of conflicts between different changes and make sure the deployment process is as smooth and easy as possible.
An example of environments in Umbraco Cloud.
What are the advantages of deployment?
Reduced risk of breaking a live website
One of the main reasons for using multiple environments and relying on deployment is to reduce the risk of changes having a negative impact on a live website. While minor changes can easily be done directly on a live website, bigger changes can be made on separate environments without the risk of breaking anything in the live environment.
When having multiple users working on the same website it also ensures that no one risks breaking something due to another user’s changes.
Without the worry of breaking something on a live website you can make changes in whichever order you prefer. This means that you can optimize your workflow of getting the changes done without any consideration to how the website looks or functions while doing it.
If you are working in a local environment you also have the advantage of changes processing faster and not be reliant on any connectivity issues.
When it comes to deploying your changes you will also save time by pushing all of your changes at the same time instead of having to do it in many smaller steps.
Time sensitive content is easier to manage
If you are running campaigns that are time sensitive and can only go live from a certain day or time, then running multiple environments and using deployment can save you a great deal of stress.
By creating all the content on a staging (or similar) environment you can finish your campaign without worrying about it being visible to your users. And when it is time to launch it can all be made visible in a very short time by deploying it to your live environment.
And if the deployment tool includes user roles with permission settings it is possible for a content editor to do all of this - including deploying the changes - without involving a developer in the process.
Deployment made easy with Umbraco Cloud
When you are using Umbraco Cloud you get the advantage of Umbraco Deploy, which is a deployment model that relies on Git and Kudu to move your changes from one environment to another.
In Umbraco Cloud we use a two-part deployment approach, which splits meta data and content, to make it as easy and flexible a process both for developers and content editors.
If you are interested in how deployment works with Umbraco Cloud you can see a short video tutorial below or go to our documentation on deployment for in-depth documentation on Umbraco Deploy.