In Place Deployment

What is in-place deployment strategy?

An in-place deployment is a deployment strategy that updates the application version without replacing any infrastructure components. In an in-place deployment, the previous version of the application on each compute resource is stopped, the latest application is installed, and the new version of the application is started and validated. This allows application deployments to proceed with minimal disturbance to underlying infrastructure.

Performing in-place deployment using Odin will not change the stack. If your current active deployment is on green stack (or blue stack), the in-place deployment will be performed on the same stack.

Example of in-place deployment using operate command:

odin operate component --name my_application --service odindemo --operation redeploy --options='{"artifact_version": "1.0.0", "strategy": {"name": "in-place", "mode": "FORCEKILL", "batch_size_percentage": 25}}' --env inPlc

The above command deploys the my_application component for service odindemo in environment inPlc while deploying 25% of the instances in one single batch till all the instances are deployed. The mode of deploy is "FORCEKILL" in this example. Please refer to the below table for the options and their significance.

Options specific to in-place deployment

Option
Type
Description
Example

strategy

string

This field denotes the strategy you want to follow for a specific operation. Following are the available options:

  1. in-place: Used for in-place deployment strategy.

  2. blue-green: Refer to the Blue Green Deployment Strategy for the same.

batch_size_percentage

int

This field states the percentage of the batch at once you want to deploy. The value of this field can be any integer ranging from 1 to 100. This value can vary based on your requirement. If you want to perform a full restart at once, the value of this field will be 100.

mode

string

This field states the way you want to perform the deployment. There are two options:

  1. FORCEKILL: Forceful mode deploys your application without taking in-flight request in account. It is a faster way of performing the deploy and mostly recommended if you have an application that is not functioning in a desired manner. This mode of deployment will kill the in-flight requests, hence returning an error for such users. This method deploys your application and performs a health check before registering the same.

  2. GRACEFUL: Graceful mode provides you a window of 15-sec to complete your in-flight requests. It is a longer but graceful way of performing the deployment and mostly recommended in case you want to update some config without impacting the user experience. This method deployes your application followed by a health check before registering after the same.

If user does not pass any deployment strategy explicitly, by default, blue-green deployment strategy will be used for the operation.

Last updated