SlideShare uma empresa Scribd logo
1 de 43
Infrastructure as
Code (IaC)
Naseath Saly
System and Server Engineer (not a developer)
naseath.saly@dynamo-tech.com
About me:
- System and Server Engineer @Dynamo-tech
- A husband and a father of two daughters
- A Ping Pong Player
- A morning jogger
- Basic skill Volleyball player
- From: Kampong Cham Province, Kang Meas
District, Angkor Ban Village
How IT infrastructure has historically been provisioned
Infrastructure as code is a method
to provision and manage IT
infrastructure through the use of
source code, rather than through
standard operating procedures and
manual processes.
Infrastructure as code is a method
to provision and manage IT
infrastructure through the use of
source code, rather than through
standard operating procedures and
manual processes.
What “infrastructure”?
Application Configuration
Operating System and Host Configuration
Provision Cloud resource such as AWS, GOOGLE,
Assure and so on ...
Configuration Orchestration
vs
Configuration Management
Configuration Orchestration
Configuration orchestration tools, which include
Terraform and AWS CloudFormation, are designed
to automate the deployment of servers and other
infrastructure.
Configuration Management
Configuration management tools like Chef, Puppet,
Ansible and the others help configure the software
and systems on this infrastructure that has already
been provisioned.
AllOfAbove == $ code
WHY ?
Why the Sea is Salty ?
Why Infrastructure as Code (IaC)?
● Speed and simplicity
● Configuration consistency
● Minimization of risk
● Increased efficiency in software development
● Cost savings
Speed and simplicity
Configuration consistency
Minimization of risk
What if the guy who have all the secrets to your
infrastructure setup leave the company and he did
not leave any related documents
Increased efficiency in software
development
Cost savings
OK COOLS
BUT HOW ?
Tools
Infrastructure as Code tools
HashiCorp Terraform
Chef
AWS CloudFormation
Puppet
Azure Resource Manager
Saltstack
Google Cloud Deployment Manager Ansible
Juju
Pallet
Demonstration
Just press Enter
Just press Enter again
VIP1: 10.10.10.35 = demo.iac
VIP2: 10.10.10.36 = demo.iac
Virtual IP
Active
Active
Load Balancer
haproxy0001.iac
Load Balancer
haproxy0002.iac
app0001.iac
app0002.iac
db0001.iac
Health check
10.10.10.33
10.10.10.34
10.10.10.21
10.10.10.22
10.10.10.31
Health check
Health check
Thing to remember
Just tools are not enough
You need to change
behavior too.
Old way: make changes
directly and manually
New way: make changes
indirectly and automatically
Learning these takes time
More time than making a
change directly ...
Learning these takes time
More time than making a
change directly ...
If you make changes manually,
The code will not reflect reality.
And the next person to try to
use it will get errors
So then they’ll fall back and
make manual changes
But making manual changes
does not scale
This does
Key takeaway: tools are not enough.
You also need to change behavior.
Thanks you
for your attention
?

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Terraform on Azure
Terraform on AzureTerraform on Azure
Terraform on Azure
 
DevOps Monitoring and Alerting
DevOps Monitoring and AlertingDevOps Monitoring and Alerting
DevOps Monitoring and Alerting
 
Ingress overview
Ingress overviewIngress overview
Ingress overview
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
Infrastructure as Code for Azure: ARM or Terraform?
Infrastructure as Code for Azure: ARM or Terraform?Infrastructure as Code for Azure: ARM or Terraform?
Infrastructure as Code for Azure: ARM or Terraform?
 
Kubernetes Security
Kubernetes SecurityKubernetes Security
Kubernetes Security
 
Docker Registry V2
Docker Registry V2Docker Registry V2
Docker Registry V2
 
Terraform in deployment pipeline
Terraform in deployment pipelineTerraform in deployment pipeline
Terraform in deployment pipeline
 
Best Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with TerraformBest Practices of Infrastructure as Code with Terraform
Best Practices of Infrastructure as Code with Terraform
 
Cloud Native Apps with GitOps
Cloud Native Apps with GitOps Cloud Native Apps with GitOps
Cloud Native Apps with GitOps
 
Dos and Don'ts of DevSecOps
Dos and Don'ts of DevSecOpsDos and Don'ts of DevSecOps
Dos and Don'ts of DevSecOps
 
GitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfGitOps 101 Presentation.pdf
GitOps 101 Presentation.pdf
 
Infrastructure as Code with Terraform and Ansible
Infrastructure as Code with Terraform and AnsibleInfrastructure as Code with Terraform and Ansible
Infrastructure as Code with Terraform and Ansible
 
Terraform Basics
Terraform BasicsTerraform Basics
Terraform Basics
 
DevSecOps: Key Controls for Modern Security Success
DevSecOps: Key Controls for Modern Security SuccessDevSecOps: Key Controls for Modern Security Success
DevSecOps: Key Controls for Modern Security Success
 
Dockers and kubernetes
Dockers and kubernetesDockers and kubernetes
Dockers and kubernetes
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Terraform on Azure
Terraform on AzureTerraform on Azure
Terraform on Azure
 
Terraform
TerraformTerraform
Terraform
 
Meetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOpsMeetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOps
 

Semelhante a Infrastructure as code

Mukesh_Thakur_Wintel and VMware Admin
Mukesh_Thakur_Wintel and VMware AdminMukesh_Thakur_Wintel and VMware Admin
Mukesh_Thakur_Wintel and VMware Admin
Mukesh Thakur
 
Why Your Start Up Needs An Automated Infrastructure Presentation
Why Your Start Up Needs An Automated Infrastructure PresentationWhy Your Start Up Needs An Automated Infrastructure Presentation
Why Your Start Up Needs An Automated Infrastructure Presentation
elliando dias
 

Semelhante a Infrastructure as code (20)

Securing Infrastructure as a Code - DevFest 2022 Presentation
Securing Infrastructure as a Code - DevFest 2022 PresentationSecuring Infrastructure as a Code - DevFest 2022 Presentation
Securing Infrastructure as a Code - DevFest 2022 Presentation
 
Infrastructure as Code with Terraform on AWS
Infrastructure as Code with Terraform on AWSInfrastructure as Code with Terraform on AWS
Infrastructure as Code with Terraform on AWS
 
Life as a SRE at Instana
Life as a SRE at InstanaLife as a SRE at Instana
Life as a SRE at Instana
 
Cloud(Ansible, Kubernete)
Cloud(Ansible, Kubernete)Cloud(Ansible, Kubernete)
Cloud(Ansible, Kubernete)
 
Infrastructure as Code & its Impact on DevOps
Infrastructure as Code & its Impact on DevOps Infrastructure as Code & its Impact on DevOps
Infrastructure as Code & its Impact on DevOps
 
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as CodeConfoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
 
Top 3 Useful Tools for DevOps Automation -
Top 3 Useful Tools for DevOps Automation -Top 3 Useful Tools for DevOps Automation -
Top 3 Useful Tools for DevOps Automation -
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
 
Mukesh_Thakur_Wintel and VMware Admin
Mukesh_Thakur_Wintel and VMware AdminMukesh_Thakur_Wintel and VMware Admin
Mukesh_Thakur_Wintel and VMware Admin
 
What DevOps Isn't
What DevOps Isn'tWhat DevOps Isn't
What DevOps Isn't
 
NIST_Ignyte_OSCALWorkshop_2022.pdf
NIST_Ignyte_OSCALWorkshop_2022.pdfNIST_Ignyte_OSCALWorkshop_2022.pdf
NIST_Ignyte_OSCALWorkshop_2022.pdf
 
Red Hat Summit - What are your digital foundations?
Red Hat Summit - What are your digital foundations?Red Hat Summit - What are your digital foundations?
Red Hat Summit - What are your digital foundations?
 
Policy as Code: IT Governance With HashiCorp Sentinel
Policy as Code: IT Governance With HashiCorp SentinelPolicy as Code: IT Governance With HashiCorp Sentinel
Policy as Code: IT Governance With HashiCorp Sentinel
 
Why Startups Need Automated Infrastructures
Why Startups Need Automated InfrastructuresWhy Startups Need Automated Infrastructures
Why Startups Need Automated Infrastructures
 
(SEC312) Taking a DevOps Approach to Security | AWS re:Invent 2014
(SEC312) Taking a DevOps Approach to Security | AWS re:Invent 2014(SEC312) Taking a DevOps Approach to Security | AWS re:Invent 2014
(SEC312) Taking a DevOps Approach to Security | AWS re:Invent 2014
 
Overcoming Security Challenges in DevOps
Overcoming Security Challenges in DevOpsOvercoming Security Challenges in DevOps
Overcoming Security Challenges in DevOps
 
Jon shende fbcs citp q&a
Jon shende fbcs citp q&aJon shende fbcs citp q&a
Jon shende fbcs citp q&a
 
GDG DevFest Medan 2022
GDG DevFest Medan 2022GDG DevFest Medan 2022
GDG DevFest Medan 2022
 
Path to continuous delivery
Path to continuous deliveryPath to continuous delivery
Path to continuous delivery
 
Why Your Start Up Needs An Automated Infrastructure Presentation
Why Your Start Up Needs An Automated Infrastructure PresentationWhy Your Start Up Needs An Automated Infrastructure Presentation
Why Your Start Up Needs An Automated Infrastructure Presentation
 

Último

Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 

Último (20)

Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 

Infrastructure as code

Notas do Editor

  1. Before we go forward Let go back to the history In the past, setting up IT infrastructure has been a very manual process. Humans have to physically rack and stack servers. Then this hardware has to be manually configured to the requirements and settings of the operating system used and application that’s being hosted. Finally, the application has to be deployed to the hardware. Only then can your application be launched. There are many drawbacks to this manual process. First, it can take a long time to acquire the necessary hardware. You’re at the mercy of the hardware manufacturer’s production and delivery schedules. And if you need products customized for specific requirements, it could take months to receive your order. Next, people have to be hired to perform the tedious setup work. You’ll need network engineers to set up physical network infrastructure, storage engineers to maintain physical drives, and many others to maintain all of this hardware. That leads to more overhead, management, and costs. Real estate has to be acquired to build data centers to house all of this hardware. On top of that, you’ll have to maintain these data centers, which means paying maintenance and security employees, HVAC and electricity expenses, and many other costs. Achieving high availability of your applications is big problem as well. You would have to build a backup data center, which could double your real estate and other costs mentioned above.
  2. It is also a practice in which infrastructure is provisioned and manage using code and software development techniques, such as version control and continuous integration and delivery.
  3. - Application Installation - Application Configuration - Database Credentials - Manage permission - Manage file owner - Update application versions - Apply security fix - Windows Registry - Linux Networking - Open SSH - Ldap - Deployment Agent - Host Monitoring - Amazon Virtual Private Cloud (VPC) - Amazone Elastic Compute Cloud (EC2) - AWS Identity and Access Management (IAM) - Amazone Relational Database Service (RDS) - Amazon Simple Storage Service (S3) - Amazon Elastic Load Balancers (ELB)
  4. IaC allows you to spin up an entire infrastructure architecture by running a script. Not only can you deploy virtual servers, but you can also launch pre-configured databases, network infrastructure, storage systems, load balancers, and any other cloud service that you may need. You can do this quickly and easily for development, staging, and production environments, which can make your software development process much more efficient (more about this later). Also, you can easily deploy standard infrastructure environments in other regions where your cloud provider operates so they can be used for backup and disaster recovery. You can do all this by writing and running code.
  5. Production = Stagin = Development => One source of truth :-) Standard operating procedures can help maintain some consistency in the infrastructure deployment process. But human error will always rear its ugly head, which may leave you with subtle differences in configurations that may be difficult to debug. IaC completely standardizes the setup of infrastructure so there is reduced possibility of any errors or deviations. This will decrease the chances of any incompatibility issues with your infrastructure and help your applications run more smoothly.
  6. Imagine having a lead engineer be the only one who knows the ins and outs of your infrastructure setup. Now imagine that engineering guy leaving your company. What would you do then? There’d be a bunch of questions, some fear and panic, and many attempts at reverse engineering. Not only does IaC automate the process, but it also serves as a form of documentation of the proper way to instantiate infrastructure and insurance in the case where employees leave your company with institutional knowledge. Configurations are bound to change to accommodate new features, additional integrations, and other edits to the application’s source code. If an engineer edits the deployment protocol, it can be difficult to pin down exactly what adjustments were made and who was responsible. Because code can be version-controlled, IaC allows every change to your server configuration to be documented, logged, and tracked. And these configurations can be tested, just like code. So if there is an issue with the new setup configuration, it can be pinpointed and corrected much more easily, minimizing risk of issues or failure.
  7. Developer productivity drastically increases with the use of IaC. Cloud architectures can be easily deployed in multiple stages to make the software development life cycle much more efficient. Developers can launch their own sandbox environments to develop in. QA can have a copy of production that they can thoroughly test. Security and user acceptance testing can occur in separate staging environments. And then the application code and infrastructure can be deployed to production in one move. Infrastructure as Code allows your company to use Continuous Integration and Continuous Deployment techniques while minimizing the introduction of human errors after the development stage. You can also include in your IaC script the spinning down of environments when they’re not in use. This will shut down all the resources that your script created, so you won’t end up with a bunch of orphan cloud components that everyone is too afraid to delete. This will further increase the productivity of your engineering staff by having a clean and organized cloud account.
  8. Automating the infrastructure deployment process allows engineers to spend less time performing manual work, and more time executing higher-value tasks. Because of this increased productivity, your company can save money on hiring costs and engineers’ salaries. As mentioned earlier, your IaC script can automatically spin down environments when they’re not in use, which will further save on cloud computing costs.
  9. To enable IaC we need tools and there are so many tools so we need to choose just few tools that best for our need Before we go deeper let me clarify some difference between “Configuration Orchestration VS Configuration Management” Because there are some tools use only for “Configuration Orchestration” and other tools use only for “Configuration Management” Where there also some tools that use for both
  10. To enable IaC we need tools and there are so many tools so we need to choose just few tools that best for our need Before we go deeper let me clarify some difference between “Configuration Orchestration VS Configuration Management” Because there are some tools use only for “Configuration Orchestration” and other tools use only for “Configuration Management” Where there also some tools that use for both
  11. As talked above there so many tools and we need to choose some of them that best for our need Why ? Because most important things is never about learning how to use tools, So what is the most important things is ? It is always about how solve the problems and then we could pick the best tools that can really solve the problem in a really efficient ways Tools are not enough. You much behavior too.
  12. So here is the important note We had picked the tools that was best for our use case or maybe for your use case you will use some other tools
  13. You can do whatever tools you want in the world it could be the most incredible piece of technology out there But if you don’t change the behavior of your team it’s not actually gonna help you very much
  14. and here’s why … So if you think about it before you start using infrastructure as code, the way that your team is used to working is.. If you need to make a change you do it directly You SSH to the servers And you run some commands you connect to the database and you run some query and so on ...
  15. And now you are saying I want to change this so now there’s this level of indirection This layer of indirection you need to go change some code there Might be code reviews there might be some test then you go to run a tools and that thing gonna apply the actual change
  16. And that’s great there ‘s a lot of good reasons to do that but these pieces in middle day take time to learn and understand and use properly and if you don’t invest that time you’re gonna have the following scenario
  17. Something gonna break and your OPS person gonna have two choices they can either do what they already know how to do You know make a change directly five minutes
  18. Or they can spend two weeks learning that stuff
  19. It’s a rational person every time they gonna choose to make the change manually
  20. But if they do that now, your code whatever tool you chose that code is not going to accurately reflect reality.
  21. And so the next time somebody tries to use the code they gonna get an error They’re not gonna trust that code right I tried to run Ansible I got a weir error
  22. Never mind they’re gonna go and make a change manually So then the next person gonna be even more screwed and the next person and within few weeks that incredible tool that you spent all that time working on is basically useless because people are changing things by hand
  23. The problem with that of course is that doesn’t scale Making changes manually if you have a few people a few pieces of infrastructure fine But as your infrastructure grows as your team grows this does not grow with it very nicely
  24. Where this does and so the key takeaway here is
  25. You need to change behavior if you gonna be adopting Ansible or cheff or terraform or AWS Cloud formation or any of these tools you have to give people the time to learn these things, the resource to learn these things you know, do training go to conference or meetup like this, go read blog posts and you have to make sure that they’re bought into it right The last thing you want to do is have an ops person who just like “I hate Ansible thing” I’m never gonna use it like that’s not gonna work Ansible is not gonna help you so you got to change behavior that’s really the takeaway here