Exams / CSCO-350-901 / D1 Infrastructure and Automation
D1.1
Infrastructure and Automation (part 1 of 4)
- Exam domain: Infrastructure and Automation
You are reading a free preview. The rest of the CSCO-350-901 course unlocks with an Exam pass or All access.See plans
Choosing the automation tool
| Need | Tool | Why |
|---|---|---|
| Create VMs/infrastructure on any cloud, recreatable, state in git | Terraform | Declarative IaC; "enables the management of any infrastructure ... by using Terraform providers" |
| Install/configure software on hosts, push device config | Ansible | Agentless playbooks; configuration management and application deployment |
| Buy-not-build, multi-vendor NETCONF/RESTCONF/YANG, config diff and rollback | Cisco NSO | Model-driven, NED-based, transactional |
| Image configures itself through cloud-init | Terraform only | Pass user_data/custom_data at VM creation; cloud-init runs on first boot |
- Cloud-init: "cloud-init is a widely used approach to customize a Linux VM as it boots for the first time", so no login after boot is needed.
- Ephemeral tooling VMs that must be rebuilt without manual commands: Terraform builds them, Ansible installs the tooling.
- Orchestration vs configuration: Terraform (and CI servers such as Jenkins) orchestrate; Ansible configures. Puppet is also a configuration tool.
Ansible for Cisco devices
| Item | Value to remember |
|---|---|
| Connection for IOS/IOS XE | ansible_connection=network_cli with ansible_network_os=ios |
| Config commands module | ios_config with lines: |
| Per-device variables | host_vars/ (shared: group_vars/) |
ios_vrf |
state: present + purge: yes removes VRFs not in the list |
ios_ntp |
state: present creates, state: absent removes (not boolean) |
| Play options | hosts: <group>, connection: local, gather_facts: no |
| NX-OS with enable mode | SSH (network_cli) via bastion + ansible_become |
uri module |
method: PUT; loop over result.results of a registered task |
YANG, NETCONF and RESTCONF
ietf-interfacesis the base;ietf-ipaugments it with IPv4;iana-if-typeonly defines type identities (ethernetCsmacd).- RESTCONF "object is not writable" means the URL points at a state tree (
routing-state); editietf-routing:routing/routing-instance=default.
CI/CD and containers
- Interpreted languages (Python, Ruby, JavaScript): no compile step; tests, container build and deployment remain.
- Deploy a manifest with
kubectl apply -f file.yml(-kis for a Kustomize directory). - Shell in a running container:
docker exec -it <ID> /bin/bash(attach joins PID 1; run creates a new container). - Build succeeds but the container fails in tests: suspect runtime context such as the working directory.
- Dependency checkers (OWASP Dependency-Check, dependency review): known vulnerabilities and licence conflicts, not style or test failures.
Architecture and operations
- Distributed load balancing is client-side (local); central balancing is network-side.
- Search → lowest latency endpoint; large uploads → highest throughput endpoint.
- Transit VPC: hub-and-spoke, CSRs in separate AZs with dynamic routing; a dedicated VPC keeps routing separate from shared services.
- Model-driven telemetry → time series database.
- Orchestrator restarts do not fix application errors: "Kubernetes can restart containers, but underlying application issues must be addressed separately", so add exception handling.
- "Connection refused" to MySQL: the server is down or not listening; authorization errors say access denied.
- Distributed log collectors offload the sources and buffer data during outages.
- Puppet: the resource title holds the name (
ios_interface { 'GigabitEthernet0/1': ... });ntp_serverwithsource_interface => 'Vlan 15'sets the NTP source.
Exam traps
- Cloud-init in the image means Terraform alone; do not add Ansible.
- NSO (commercial, diff/rollback) vs Ansible (open source, no built-in rollback).
state: absentremoves; question 103 asks "creates" but only offers absent, so expect the dump's answer A.host_vars(one host) vsgroup_vars(a group).kubectl execis not apply;-kis not-f.- Item 083 (Jenkins + Ansible) vs 032 (Terraform + Ansible): both pair one orchestrator with Ansible for configuration.
Docs
- https://learn.microsoft.com/en-us/azure/developer/terraform/overview
- https://learn.microsoft.com/en-us/azure/developer/ansible/overview
- https://learn.microsoft.com/en-us/azure/virtual-machines/linux/using-cloud-init
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html
- https://kubernetes.io/docs/reference/kubectl/generated/kubectl_apply/
- https://kubernetes.io/docs/concepts/architecture/self-healing/
- https://kubernetes.io/docs/tasks/debug/debug-application/get-shell-running-container/
- https://docs.aws.amazon.com/whitepapers/latest/aws-vpc-connectivity-options/transit-vpc-option.html
- https://docs.cloud.google.com/load-balancing/docs/https/http-load-balancing-best-practices
- https://docs.github.com/en/code-security/concepts/supply-chain-security/about-dependency-review
- https://www.cisco.com/c/en/us/products/collateral/cloud-systems-management/network-services-orchestrator/datasheet-c78-734576.html