Choosing a deployment strategy
Overview
Whenever you update your application code, you can adjust two aspects of the way it is updated:
- How the updated code is pushed to your servers (the deployment strategy)
- How the updated version is shown to customers (the rollout strategy)
This guide is concerned with the first aspect - how the new code gets to your servers.
If you need help with the second aspect - how the new version of your application is presented to your customers - please read our separate guide to rollout strategies.
Types of deployment strategies
Cloud 66 supports two deployment strategies:
- Parallel (default)
- Fast
When you deploy in parallel, all the deployment tasks for the servers in your application will run in parallel. You will redeploy the entire application - including all code, pre-built images and configurations.
Fast Deployments only push changes to code and/or images.
Fast Deployments
Fast Deployments are designed to quickly push out changes to the code of your application (for instance via a continuous deployment pipeline). When you enable Fast Deployment for an application, we will:
- Build your code into images AND/OR
- Apply updated images to services
- Run the
deploy_command
(ie. for DB Migrations)
If you have made any other changes to your application apart from changing the code, a fast deploy will not capture those changes. It is not intended to handle structural or configuration changes.
Changing your application's deployment strategy
There are three ways to set a deployment strategy for an app:
- Using the Dashboard and selecting "Deploy with options"
- Creating a deployment profile that defines a strategy
- Setting deployment strategy using Cloud 66 Toolbelt
Using "Deploy with options"
You can trigger a deployment that uses any of the three strategies by clicking the Deploy button on your application page and choosing Deploy with Options. This will allow you to choose between the three strategies.
This will only apply to the current deployment - it does not change the default deployment strategy for your app.
You won't be given the option to choose a deployment strategy unless you have multiple servers.
Using a deployment profile
Deployment profiles allow you to customise how your app will be deployed, including the deployment strategy it should use.
To create a profile:
- From your app dashboard, click on the green Deploy button and then the Create New Profile link.
- Name the profile
- Choose a deployment strategy
- Choose which components will be deployed (optional)
- Define upgrade settings (optional)
- Save the profile
To deploy using a profile:
- From your app dashboard, click on the green Deploy button
- Click on the name of the profile you'd like to use for this deployment
For more information on deployment profiles, please read our reference guide.
Using the Toolbelt (command line)
You can also trigger a Fast Deployment using Cloud 66 Toolbelt using the following command:
If you're planning to use this strategy regularly, you should consider creating a deployment profile to make triggering Fast Deployments quicker. You can do this via the Deploy with Options menu by clicking the Save these deployment options? link.
Remember you can also trigger deployment profiles using Toolbelt: