Automation Tools & Infrastructure as Code Flashcards
9 cards from real SRE practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 9 Automation Tools & Infrastructure as Code flashcards as text
What is the primary purpose of using Infrastructure as Code (IaC)?
Answer: To automate infrastructure setup and ensure consistent environments
Infrastructure as Code (IaC) is the practice of managing and provisioning infrastructure through machine-readable definition files, rather than manual configuration. Its primary purpose is to automate the entire infrastructure lifecycle, ensuring that environments are consistently provisioned, easily reproducible, and free from manual configuration drift. This leads to faster deployments, fewer errors, and greater operational efficiency.
Which tool is commonly used for configuration management in SRE practices?
Answer: Ansible
Ansible is a popular open-source automation engine widely used for configuration management, application deployment, and orchestration in SRE practices. It allows SRE teams to define desired system states in YAML files and automates the process of bringing systems to that state. Its agentless architecture and simplicity make it a preferred choice for managing infrastructure and applications consistently across many servers.
How does Terraform support IaC practices?
Answer: By allowing declarative infrastructure provisioning as code
Terraform is an Infrastructure as Code (IaC) tool that enables users to define and provision data center infrastructure using a declarative configuration language. It allows SREs to describe the desired end-state of their infrastructure (e.g., servers, databases, networks) in code. Terraform then handles the creation, modification, and destruction of resources across various cloud providers and on-premise environments, ensuring consistent and repeatable provisioning.
Which of the following is a benefit of automation in infrastructure?
Answer: Reduces deployment time and human errors
Automation in infrastructure management significantly streamlines repetitive tasks, leading to much faster provisioning and deployment cycles. By replacing manual steps with automated scripts and tools, it drastically reduces the likelihood of human errors, ensuring greater consistency and reliability across environments. This frees up SREs to focus on more complex problem-solving and strategic initiatives rather than repetitive manual work.
What role do CI/CD pipelines play in automation?
Answer: They automate and streamline code build, test, and deployment processes
CI/CD (Continuous Integration/Continuous Delivery) pipelines are automated workflows that facilitate the rapid and reliable delivery of software. They automate the entire software release process, from building and testing code changes to deploying them to various environments. This continuous automation ensures faster feedback, quicker releases, and a more robust deployment process, streamlining the path from code commit to production.
Which of the following best describes Infrastructure as Code?
Answer: Infrastructure managed using scripts and configuration files
Infrastructure as Code (IaC) fundamentally means defining and managing infrastructure resources (like servers, networks, and databases) using code, typically in scripts or declarative configuration files. This approach allows infrastructure to be treated like application code, enabling version control, automated testing, and consistent deployment across environments. It moves away from manual, GUI-based configuration to a programmatic and repeatable approach.
Why is version control important in Infrastructure as Code?
Answer: It tracks changes and enables rollback if needed
Version control systems (like Git) are crucial for Infrastructure as Code because they track every change made to the infrastructure definition files. This provides a complete history of modifications, allowing teams to easily review who changed what and when. More importantly, it enables quick and reliable rollbacks to previous stable configurations if a new change introduces issues, significantly reducing risk and improving recovery time.
Which of the following helps validate infrastructure code before deployment?
Answer: IaC validation tools like `terraform plan`
Tools like `terraform plan` are essential for validating infrastructure code before actual deployment. `terraform plan` specifically generates an execution plan, showing exactly what actions Terraform will take to achieve the desired state without actually making any changes. This allows SREs to review potential impacts, catch errors, and ensure the changes are as intended before applying them to the live infrastructure, preventing unexpected issues.
What is a common drawback of not using automation in infrastructure management?
Answer: Increased human errors and inconsistent environments
Without automation, infrastructure management relies heavily on manual processes, which are prone to human error, such as typos or missed steps. This often leads to 'configuration drift,' where environments that should be identical become inconsistent over time. Such inconsistencies make troubleshooting difficult, increase deployment times, and reduce overall system reliability, leading to increased operational burden and instability.