GithubHelp home page GithubHelp logo

kolosovpetro / blue-green-deployment Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 23 KB

Example of how to implement blue-green deployment using Linux VMs and Azure Load Balancer (L4)

License: GNU General Public License v2.0

HCL 80.52% PowerShell 12.07% Shell 7.41%
blue-green blue-green-deployment blue-green-deployments

blue-green-deployment's Introduction

Blue-green deployment

Example of how to implement blue-green deployment using Linux VMs and Azure Load Balancer (L4)

Pre-commit configuration

  • Install python3 via windows store
  • pip install --upgrade pip
  • pip install pre-commit
  • Update PATH variable
  • pre-commit install

Install terraform docs

  • choco install terraform-docs

Install tflint

  • choco install tflint

Documentation

Storage account configuration file

storage_account_name = "storage_account_name"
container_name       = "container_name"
key                  = "terraform.tfstate"
sas_token            = "sas_token"

Deploy storage account for terraform state

Module documentation

Requirements

Name Version
azurerm =3.71.0

Providers

Name Version
azurerm 3.71.0

Modules

Name Source Version
blue_slot_ubuntu ./modules/ubuntu-vm-public-key-auth n/a
green_slot_ubuntu ./modules/ubuntu-vm-public-key-auth n/a
lb ./modules/load_balancer n/a
network ./modules/network n/a

Resources

Name Type
azurerm_lb_nat_rule.blue_ssh_nat resource
azurerm_lb_nat_rule.green_ssh_nat resource
azurerm_lb_probe.http_probe resource
azurerm_lb_rule.http_rule_blue resource
azurerm_network_interface_backend_address_pool_association.blue_slot_lb_association resource
azurerm_network_interface_backend_address_pool_association.green_slot_lb_association resource
azurerm_network_interface_nat_rule_association.blue_ssh_association resource
azurerm_network_interface_nat_rule_association.green_ssh_association resource
azurerm_resource_group.public resource
azurerm_client_config.current data source

Inputs

Name Description Type Default Required
ip_configuration_name Name of the IP configuration string n/a yes
network_interface_name Name of the network interface string n/a yes
nsg_name Name of the network security group string n/a yes
os_profile_admin_public_key_path Specifies the public key of the administrator account. string n/a yes
os_profile_admin_username Specifies the name of the administrator account. string n/a yes
os_profile_computer_name Specifies the host OS name of the virtual machine. string n/a yes
prefix Resources name prefix string n/a yes
resource_group_location Location of the resource group. string n/a yes
resource_group_name Resource group name string n/a yes
storage_image_reference_offer Specifies the offer of the platform image or marketplace image used to create the virtual machine. string n/a yes
storage_image_reference_publisher The publisher of the image used to create the virtual machine. string n/a yes
storage_image_reference_sku Specifies the SKU of the platform image or marketplace image used to create the virtual machine. string n/a yes
storage_image_reference_version Specifies the version of the platform image or marketplace image used to create the virtual machine. string n/a yes
storage_os_disk_caching Specifies the caching requirements for the OS disk. string n/a yes
storage_os_disk_create_option Specifies how the virtual machine should be created. string n/a yes
storage_os_disk_managed_disk_type Specifies the storage account type for the managed disk. string n/a yes
storage_os_disk_name The name of the OS disk. string n/a yes
subnet_name Name of the subnet string n/a yes
vm_name Name of the virtual machine string n/a yes
vm_size The size of the virtual machine. string n/a yes
vnet_name Name of the virtual network string n/a yes

Outputs

Name Description
lb_public_ip n/a

blue-green-deployment's People

Contributors

kolosovpetro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.