devops_class1 (1)
devops_class1 (1)
A package manager: This constitutes the storage space of the packages generated by CI
and recovered by CD. These managers must support feeds, versioning, and
different types of packages. There are several on the market, such as Nexus, ProGet,
Continuous Deployment:
Definition: IaC is the practice of managing infrastructure using code rather than manual
configurations.
consistent manner.
Why IaC?:
4. Benefits of IaC
IaC also allows the creation of self-service, ephemeral environments that will give developers
and testers more flexibility to test new features in isolation and independently of other
environments.
5. IaC languages and tools - The languages and tools that are used to write the configuration of the
infrastructure can be of different types; that is, scripting, declarative, and programmatic.
a. Scripting types - Bash, PowerShell, or others that use the different clients (SDKs)
provided by the cloud provider; Azure CLI or Azure PowerShell(Azure Infrastructure). Eg
Azure CLI - az group create --location westeurope --resource-group
MyAppResourcegroup
The problem with these languages and tools is that they require a lot of lines of code.
These languages and tools can be very useful for tasks that automate repetitive
actions to be performed on a list of resources (selection and query).
b. Declarative types – These are languages in which it is sufficient to write
the state of the desired system or infrastructure in the form of
configuration and properties. example, for Terraform and Vagrant from
HashiCorp, Ansible, Azure ARM template, Azure Bicep. For example, the
following Terraform code allows you to define the desired configuration
of an Azure resource group:
resource "azurerm_resource_group" "myrg" {
name = "MyAppResourceGroup"
location = "West Europe"
tags = {
environment = "Bookdemo"
}
}
c. Programmatic types - This is done to create more union between
developers and operations so that we see the emergence of IaC tools
that are based more on languages known by developers, such as
TypeScript, Java, Python, and C#. example – Pulumi and Terraform
CDK
Terraform CDK example,
GitOps is a new DevOps approach where Git is the single source of truth for infrastructure
and applications.
The GitOps workflow, which is commonly applied to Kubernetes, consists of using Git as the
only source of truth; that is, the Git repository contains the code of the infrastructure state,
as well as the code of the application to be deployed.
A controller will oversee retrieval of the Git source during a code commit, executing the
tests, and redeploying the application.
Conclusion
Adopting CI/CD and IaC practices leads to smoother and more automated deployments.