CDM Infrastructure Automation & Configuration Management — Questions and Answers
Question 1: What is infrastructure automation?
- Manual server setup
- Managing infrastructure automatically (Correct answer)
- Writing application code
- Ignoring infrastructure
Correct answer: Managing infrastructure automatically
Infrastructure automation involves using software and scripts to provision, configure, and manage IT infrastructure components like servers, networks, and databases, rather than performing these tasks manually. This approach ensures consistency, reduces human error, and significantly speeds up the deployment and scaling of environments. It is a cornerstone of modern DevOps practices, enabling environments to be treated as code.
Question 2: Which tool is commonly used for configuration management?
- Photoshop
- Ansible (Correct answer)
- Excel
- Notepad
Correct answer: Ansible
Ansible is a popular open-source automation engine widely used for configuration management, application deployment, and orchestration. It operates agentlessly, using SSH to connect to target machines, and uses simple YAML syntax for its playbooks, making it relatively easy to learn and implement. Other common tools include Puppet, Chef, and SaltStack.
Question 3: What does 'idempotency' mean in configuration management?
- Causing errors repeatedly
- Same result without side effects (Correct answer)
- Random changes
- Ignoring configuration
Correct answer: Same result without side effects
In configuration management, idempotency means that applying a configuration script or command multiple times will produce the exact same system state as applying it once, without causing unintended side effects or errors on subsequent runs. This property is crucial because it allows automation tools to be run repeatedly and safely, ensuring that systems consistently conform to their desired configuration regardless of their initial state. It prevents unnecessary changes and ensures reliability.
Question 4: Why is version control important in configuration management?
- Ignore changes
- Track and maintain configuration history (Correct answer)
- Delete previous versions
- Avoid documentation
Correct answer: Track and maintain configuration history
Version control is vital in configuration management because it allows teams to track every change made to configuration files and scripts over time. This provides a complete audit trail, enabling easy rollback to previous, stable configurations if a new change introduces issues. It also facilitates collaboration among team members on infrastructure definitions and ensures consistency across different environments.
Question 5: What is 'infrastructure as code' (IaC)?
- Manual configuration
- Infrastructure managed as code (Correct answer)
- Writing application code
- Physical hardware setup
Correct answer: Infrastructure managed as code
Infrastructure as Code (IaC) is a practice where infrastructure (networks, virtual machines, databases, etc.) is provisioned and managed using machine-readable definition files, rather than through manual processes or interactive tools. These definition files are versioned, tested, and deployed just like application code. IaC brings the benefits of software development practices, such as version control, automated testing, and continuous integration, to infrastructure management, ensuring consistency and repeatability.
Question 6: Which benefit does configuration management provide?
- Random environment changes
- Consistency and repeatability (Correct answer)
- Manual error increase
- Lack of documentation
Correct answer: Consistency and repeatability
Configuration management ensures that all systems and environments are configured identically and consistently according to defined standards. This eliminates configuration drift and 'snowflake' servers, making environments predictable and reliable. The ability to repeatedly deploy the same configuration across multiple servers or environments significantly reduces errors and simplifies troubleshooting.
Question 7: What is a common language for writing IaC templates?
- HTML
- YAML (Correct answer)
- CSS
- JavaScript
Correct answer: YAML
YAML (YAML Ain't Markup Language) is a human-friendly data serialization standard often used for configuration files and in applications where data is being stored or transmitted. Its readability and hierarchical structure make it a popular choice for defining Infrastructure as Code templates in tools like Ansible, Kubernetes, and AWS CloudFormation. While JSON is also used, YAML is frequently preferred for its cleaner syntax.
Question 8: Why is automation important in configuration management?
- Increase manual workload
- Reduce errors and speed deployments (Correct answer)
- Complicate processes
- Ignore consistency
Correct answer: Reduce errors and speed deployments
Automation in configuration management eliminates manual intervention, which is a common source of human error. By automating tasks like provisioning, configuring, and updating systems, organizations can ensure consistency, reduce the likelihood of misconfigurations, and significantly accelerate the speed at which infrastructure changes and deployments can be executed. This leads to more reliable and efficient operations.
Question 9: What is 'drift' in configuration management?
- Perfect configuration
- Deviation from desired state (Correct answer)
- Immediate deployment
- Consistent systems
Correct answer: Deviation from desired state
In configuration management, 'drift' refers to the phenomenon where the actual configuration of a system or environment deviates from its intended or desired state, as defined by the configuration management system. This often occurs due to manual changes, ad-hoc updates, or unmanaged processes. Configuration drift can lead to inconsistencies, instability, and security vulnerabilities across systems.
What is infrastructure automation?