Immutable Infrastructure
- Changes in the Infra are not allowed directly.
- Any changes required have to be done by provisioning i.e. create a new image for VMSS (Azure)/ASG (AWS)

- The creation of Images in cloud is manual so far (what we have learn).
- If we automate the Image creation and if it is triggered by ci/cd pipeline, then we can use this for deployments
- Creating VM Images is specific to Cloud, hashicorp released a tool called as
Packerwhich is used for image creations is various virtual environments - The ideal workflow could be

Packer
- Refer Here for the official documentation.
- Packer can be configured in json/HCL (Hashicorp configuration language)
- Terminology:
- Builder: This is where you want to create image
- Provisioning: This is where we install the necessary applications which should be part of vm. Here Shell/Powershell/Ansible/Chef etc are supported.
- Installation:
- Download the packer Refer Here
- unzip and add the folder to the environment variable PATH

Scenario 1: Create a hello-world image
- Json template Refer Here
- To build a image in AWS we need to figure out builder Refer Here
- Refer Here for ebs
- Generally for builders authentication needs to be setup
- Refer Here for the changeset containing azure and aws image creation
- Using Variables in template: Refer Here
- Exercise: Complete the script to create php info image with variable version. Refer Here
- Azure: Refer Here for the documentation from microsoft to use azure
Load Balancer
- The OSI Model

- Layer wise functionality

- Transport Layer => Level 4:
- Ip address
- port
- TCP/UDP
-
Application Layer => Level 7:
- http:
- paths in urls => Routes
- headers
- ssl
- Ip address
- port
- TCP/UDP


- http:
- Layer 4 LB in Azure => Azure Load Balancer
- Layer 4 LB in AWS => Network Load Balancer
-
Path Based Routing in Layer 7
- Header based routing in Layer 7

