## 4.1.8.1.9.2.2  Blue-Green Deployment Strategy
Use the current blue-green deployment of Multitarget applications.
## Prerequisites
<!-- image -->
##  Restriction
Blue-green deployment is supported only for Cloud Foundry applications. It is not supported for bound services, such as service instances and their configuration, workflow content, and HTML5 repository content, among others. Live and idle applications are bound to the same service instances.
- You have a previously deployed MTA, with functional productive applications and routes:
- You have ensured that the changes in the new version of the application are compatible with the old version. This includes changes in the database tables, UAA configurations, and so on.
<!-- image -->
## Context
If you have already executed successful deployments using the Legacy Blue-Green Deployment [page 706] method (' cf bg-deploy '), you should have no problems when executing deployments with the blue-green deployment strategy (' cf deploy --strategy blue-green '). However, this does not apply the other way around and it is generally not recommended to go back to the legacy blue-green deployment method.
##  Caution
Do not begin a blue-green deployment using ' cf bg-deploy ' and continue with ' cf deploy -strategy blue-green ', or vice versa, as this might result in downtime.
## Procedure
1. Deploy your updated MTA in idle state by executing the command cf deploy &lt;your-mta-archivev2&gt; --strategy blue-green .
The first action is that all MTA services are updated.
This creates:
- new applications adding 'idle' to the original application names
##  Note
The new application version is launched on all instances defined in the MTA deployment descriptor. During the testing phase or when the deployment is paused for user verification, the application temporarily requires double the usual resources (instances). This is because both the old and the new versions of the application are running concurrently. If the testing phase is skipped or if the deployment continues without delay, the resource usage will be optimized sooner.
If you are looking for a more resource-efficient deployment approach, see (Experimental) Incremental Blue-Green Deployment Strategy [page 711]. However, keep in mind that this approach requires more time than the standard blue-green deployment strategy.
- temporary routes to the idle applications
- an interrupt to the process showing a message similar to the following:
<!-- image -->
##  Output Code
Process has entered testing phase. After testing your new deployment you can resume or abort the process.
Use "cf deploy -i 7e6233b9-6001-11ea-8959-eeee0a98a87d -a abort" to abort the process.
Use "cf deploy -i 7e6233b9-6001-11ea-8959-eeee0a98a87d -a resume" to resume the process.
Hint: Use the '--skip-testing-phase' option of the deploy command to skip this phase
2. Optionally, test the idle version of the application using the temporary routes.
##  Note
You can skip this step by using one of the following command line options:
- --skip-testing-phase - you have to use it when starting the process.
- --skip-idle-start - this option will also skip the start of the newly deployed applications on idle routes.
3. If you do not want to make the 'idle' version available, abort the process using cf deploy -i &lt;operation ID&gt; -a abort .
##  Note
This action does not perform a rollback and the state of apps, routes and services remains unchanged. Depending on your needs, you might want to remove the new app versions and the temporary routes.
4. If you want to make the 'idle' version productive, manually resume the process, using cf deploy -i &lt;operation ID&gt; -a resume .
This does the following:
- maps the productive routes to your idle versions
- deletes the temporary routes
- restarts 'idle' apps with productive route configurations
- deletes the 'live' applications, which were productive before
<!-- image -->
## Results
For more detailed information and example results of the blue-green deployment process, see Blue-Green Deployment .
## Related Information
Blue-Green Deployment of Multitarget Applications [page 705]
Legacy Blue-Green Deployment [page 706] (Experimental) Incremental Blue-Green Deployment Strategy [page 711] Multitarget Application Commands for the Cloud Foundry Environment [page 2554]