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

Redeploy

What happens internally ? Containers:

  • Deletes the old pod and create a new pod

EC2:

  • It follows a blue-green deployment strategy, and as part of that, two LBs, two weighted Route53s (blue and green), for each stack will get created

  • Shifts traffic gradually from the currently active stack to the passive stack

Example:

odin operate component --name my_application --service auth --operation redeploy --options='{"artifact_version":"1.1.7", "imdsv2":"required"}' --env dev-0001

The above command redeploys the my_application component for service auth in environment dev-0001 with new artifact_version as 1.2.0

Options for redploy

Option
Type
Description
Example

instance_pool

array

instance type pool for application autoscaling

--options='{"instance_pool": ["c5.xlarge", "c6a.2xlarge"]}'

lcu.external_lb

integer

The number of Load Balancer Capacity Units (LCU) for external LB

--options='{"lcu": {"external_lb": 6}}'

lcu.internal_lb

integer

The number of Load Balancer Capacity Units (LCU) for internal LB

--options='{"lcu": {"internal_lb": 6}}'

env_variables

json object

This field can be used to export environment variables to the application process

--options='{"env_variables": {"KEY_1": "VALUE_1"}}'

artifact_name

string

Name of application artifact

--options='{"artifact_name": "ARTIFACT_NAME"}'

build_type

string

Base image type on which the application runs

--options='{"build_type": "java"}'

build_version

string

Base image version on which the application runs

--options='{"build_version": "11"}'

add_legacy_tags

boolean

If this field is set to true, legacy tags such as master_service etc. will be applied on created infra

--options='{"add_legacy_tags": "true"}'

max_instances

integer

Maximum number of instances an ASG can have

--options='{"max_instances": 10}'

autoscaling

json object

Set autoscaling policy

--options='{"autoscaling": {"enabled":true, "policies": {"cpu_threshold":65}}}'

artifact_version

string

Application artefact version you want to deploy.

--options='{"artifact_version":"1.0.17"}'

imdsv2

String

Set the value of this field to "required" if you want to use imdsv2 for your component

--options '{ "imdsv2":"required"}'

logs

json object

If this field is enabled, logs will be pushed to datadog from mentioned log path.

--options='{ "logs": {"path": "", "enabled": true/false} }'

capacity_type

Enum - "ON_DEMAND", "SPOT"

Based on the provided values, deployment will be done on the spot or on-demand instance types.

--options='{"capacity_type": "ON_DEMAND"}'

num_instances

integer

Number of instances to be created.

--options='{ "num_instances" : 50}'

on_demand_base_capacity

integer

Number of instances you want to keep as on-demand. capacity_type should be ON_DEMAND to use this. Let's assume num_instances is set to 50, and on_demand_base_capacity is set to 10. Then on successful deployment, there will be 10 ON_DEMAND instances and 40 SPOT instances.

--options='{ "on_demand_base_capacity" : 10}'

config_namespace

string

Config manager branch name/tag to be used in the deployment.

--options='{ "config_namespace" : "feat/abc"}'

passive_downscale

boolean

If this field is set to true, the passive stack will be downscaled once the deployment is successful.

--options='{ "passive_downscale" : true}'

auto_routing

boolean

If this field is set to true, On the successful deployment, the traffic will be routed from the old active stack(old version) to the new active stack (new deployment version). And if this field is set to false, odin will not route traffic to the new deployment. Users will have to shift the traffic manually.

--options='{ "auto_routing" : true}'

canary

boolean

If this field is set to true, On the successful deployment, the traffic routing will be done in a canary fashion. Canary works in multiple phases,

Phase 1: 20% of traffic will be shifted to the new deployment, and odin will check for the 5XX errors if no errors are recorded, it will move to the next phase.

Phase 2: 100% of the traffic will be shifted to the new deployment, and odin will check for the 5XX errors if no errors are recorded, it will move to the next phase.

--options='{ "canary" : true}'

PreviousOperating Service & ComponentsNextIn Place Deployment

Last updated 4 days ago