0% found this document useful (0 votes)
10 views7 pages

devops_class1 (1)

The document discusses the DevOps culture, emphasizing collaboration between development and operations teams to achieve faster software delivery and automation. It covers core practices such as Continuous Integration, Continuous Delivery, and Infrastructure as Code, highlighting their benefits like consistency, scalability, and efficiency. Additionally, it introduces GitOps as a modern approach to managing infrastructure and applications through Git, enhancing collaboration and security.

Uploaded by

ilakiyasibi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views7 pages

devops_class1 (1)

The document discusses the DevOps culture, emphasizing collaboration between development and operations teams to achieve faster software delivery and automation. It covers core practices such as Continuous Integration, Continuous Delivery, and Infrastructure as Code, highlighting their benefits like consistency, scalability, and efficiency. Additionally, it introduces GitOps as a modern approach to managing infrastructure and applications through Git, enhancing collaboration and security.

Uploaded by

ilakiyasibi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Learning DevOps - Mikael Krief

Chapter 1: The DevOps Culture and Infrastructure as Code Practices:

1. Introduction to DevOps Culture

 Definition: DevOps is a cultural and professional movement that improves collaboration


between development and operations teams.

 Main Goals: Faster software delivery, automation, and improved efficiency.

 Challenges in Traditional IT:

o Siloed teams lead to slow software releases.

o Manual infrastructure changes cause inconsistencies and errors.


2. Core DevOps Practices

 Continuous Integration (CI):

o Developers frequently merge code changes into a shared repository.

o Automated testing helps catch errors early.

 Continuous Delivery (CD):

o Ensures software is always in a deployable state.

o Automates deployment to staging environments.

o tools that are set up for CI/CD

 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,

Artifactory, and Azure Artifacts.

 A configuration manager: This allows you to manage configuration changes during


CD; most CD tools include a configuration mechanism with a system of variables.

 staging environment is triggered as follows:


o It can be triggered automatically, following a successful execution in a previous
environment. For example, we can imagine a case where the deployment in the
pre-production environment is automatically triggered when the integration tests
have been successfully performed in a dedicated environment.
o It can be triggered manually, for sensitive environments such as the production
environment, following manual approval by the person responsible for validating
the proper functionality of the application in an environment.

 Continuous Deployment:

o Extends CD by automating deployment directly to production.

 rarely implemented in enterprises because it requires a variety of tests

(unit, functional, integration, performance, and so on)

 it also allows you to automatically deploy to a production environment


without any approval action required
 1st technique – this can be implemented by using and implementing feature
toggle techniques (or feature flags), which involves encapsulating the
application's functionalities in features and activating its features on
demand, directly in production, without having to redeploy the code of the
application.
 2nd technique - this use a blue-green production infrastructure, which
consists of two production environments, one blue and one green. First, we
deploy to the blue environment, then to the green one; this will ensure that
no downtime is required.

o Requires strong testing and rollback strategies.


3. Understanding Infrastructure as Code (IaC)

 Definition: IaC is the practice of managing infrastructure using code rather than manual
configurations.

 It is a process of writing the code of the provisioning and configuration steps of

infrastructure components which helps automate its deployment in a repeatable and

consistent manner.

 Why IaC?:

o Automates provisioning, reducing human error.

o Enables version control and repeatable deployments.

o Enhances scalability by quickly spinning up or modifying infrastructure.

4. Benefits of IaC

 Consistency: Eliminates configuration drift across environments.

 Scalability: Enables rapid infrastructure changes as needed.

 Efficiency: Reduces manual work and speeds up provisioning.

 Security & Compliance: Enforces security policies through code.

 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,

6. The IaC topology


In a cloud infrastructure, IaC is divided into several typologies:
• Deploying and provisioning the infrastructure
• Server configuration and templating
• Containerization
• Configuration and deployment in Kubernetes
 Deploying and provisioning the infrastructure - Provisioning is the act
of instantiating the resources that make up the They can be of the
Platform-as-a-Service (PaaS) and serverless resource types, such as
a web app, Azure function, or Event Hub,
 the entire network part that is managed, such as VNet, subnets,
routing tables, or Azure Firewall.
 For virtual machine resources, the provisioning step only creates or
updates the VM cloud resource, but not its content.
 provisioning tools we can use for this, such as Terraform, the ARM
template, AWS Cloud training, the Azure CLI, Azure PowerShell, and
also Google Cloud Deployment Manager
 Server configuration - This step concerns configuring virtual machines,
such as the hardening, directories, disk mounting, network
configuration (firewall, proxy, and so on), and middleware installation.
 There are different configuration tools, such as Ansible, PowerShell
DSC, Chef, Puppet, and SaltStack
 Immutable infrastructure with containers - Containerization consists of
deploying applications in containers instead of deploying them in VMs.
 container technology to be used is Docker and that a Docker image is
configured with code in a Dockerfile. This file contains the declaration
ofthe base image, which represents the operating system to be used,
additional middleware to be installed on the image, only the files and
binaries necessary for the application, and the network configuration of
the ports.
 Unlike VMs, containers are said to be immutable; the configuration of a
container cannot be modified during its execution.

 Configuration and deployment in Kubernetes - Kubernetes is a


container orchestrator – it is the technology that most embodies IaC (in
my opinion) because of the way it deploys containers, the network
architecture (load balancer, ports, and so on), and volume
management, as well as how it protects sensitive information, all of
which are described in the YAML specification files.
7. DevOps Evolution – GitOps

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

 Benefits: Faster rollbacks, better collaboration, and improved security.

Conclusion

 DevOps promotes faster, automated, and reliable software development.

 IaC ensures consistency, efficiency, and scalability in infrastructure management.

 Adopting CI/CD and IaC practices leads to smoother and more automated deployments.

Would you like details on any specific section?

You might also like