Odin
  • Introduction
  • Why Odin?
  • Key Concepts
    • Environment
      • Environment Type
    • Provisioning
      • Provisioning Config for Component Types
    • Component
      • Available Component Types
      • Component Type reference
        • Optimus Components
          • Aerospike [6.3.0.7-1.0.0]
    • Service
      • Know Your Service Definition
    • Versioning
      • Clearing the Confusion: A Simplified Guide to Artifact, Component, and Service Versions
    • Service Sets
    • Labels
  • Reference
    • CLI reference
  • Onboard Your Service
    • Installation
    • Configure
    • Odin -h
    • Getting Started
    • Create Environment
      • Operations on Environment
    • Service Definition
    • Provisioning Config
    • Deploy Service
    • Release Service
    • Optimus Datastore Operations
      • How to use Optimus Datastore in my service?
      • RDS Operations
      • Aerospike Operations
      • Kafka Operations
    • Operating Service & Components
      • Redeploy
        • In Place Deployment
        • Blue Green Deployment
      • Rolling Restart
      • Adding & removing components
      • Revert a deployment for application component
      • Downscaling a Passive Stack
      • Updating the no. of stacks of application component
    • Dev <> QA iteration
    • Frequently Asked Questions
    • Deploy Concrete Service
    • Undeploy Service
    • Delete Environment
    • Appendix
  • How To
    • Define error threshold for canary deployment
    • Add or Remove a component in an already deployed service
    • Integrate mono-repo(cronjobs) with Odin
    • Deploy crontab with Odin
    • Integrate Data pipeline with Odin
    • Push logs to log central
    • Build artifacts for multi module applications
    • Load test with Odin
    • Track Deployments against Commit Ids
    • Deploy Service on Production - Dream11
    • How and when images are created
    • Check logs for deployed infrastructure - Dream11
    • Onboard Stepfunction as a component
    • Onboard Serverless as a component
    • Login to Kubernetes clusters
  • Release Notes
    • 1.2.0-beta.2 - 11 August, 2022
    • Odin October Release
    • Odin 1.2.0 - Nov 9th 2022
    • Odin February Release
Powered by GitBook
On this page
Export as PDF
  1. Onboard Your Service
  2. Operating Service & Components
  3. Redeploy

In Place Deployment

PreviousRedeployNextBlue Green Deployment

Last updated 1 year ago

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.

This deployment strategy is not recommended for production and hence disabled as of now.

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 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.

If a user deploys a snapshot version at a specific time (say, t), and a different user publishes a new version of the same service after some time (say, t+x); the new instances of the ASG will have the later version.

To avoid the above occurence, user must redeploy with the later version (published at t+x).

Blue Green Deployment Strategy
Refer to Example
Refer to Example
Refer to Example