Automating Infrastructure Flashcards

1
Q

What are the three stages to go through when you starting out automation on the network, and give an example of each one

A

RUN: read-only operations, list vlans, obtain inventory
WALK: Automate on-boarding, automate day to day tasks
FLY: Proactively manage users, complex automation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why do we need automation?

A

Speed and agility

Scale operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Risks of manually deployed managed networks (4)

A

Manual process time consuming
Subject to human error
Financial costs due to outages
Dependency on small components and many contributors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Infrastructure automation benefits (3)

A

Speed
Repeatability
Work at scale with reduced risk

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Benefits of full-stack automation (4)

A

Self-Service
Scale on demand
Observability
Automated problem mitigation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

As part of Automated problem mitigation, what should apps be engineered to do? (3)

A

Minimize blast radius - recognize issues quickly and re-route traffic
Self-heal - automatically re-deploy failed components
Monitor events - this allows fixes to be implemented

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Benefits of cloud in automation

A

Self Service - quickly stand up whats needed
Close specifications, consistency, repeatability
Platform abstraction - the ability to containerize

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Challenges of using cloud

A

Cloud platforms design, security may add new demands to applications
Permissions could be challenging
Unforeseen costs - resource on demand or “still running unused resource”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How should large scale app manage traffic, storage and compute

A

Provide good user experience
Be resilient, highly available and protect user data
Grow and shrink as per demand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Benefits of microservices

A

Scalability - can be scaled and load balanced across many servers
Infrastructure automation tools - EG Kubernetes can automate scaling

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Challenges of microservices

A

Increased complexity - lots of moving parts

Automation is required - manual method is not realistic for coping

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Whats the difference between Dev and Ops

A

Dev - were the developers that created apps

Ops - were the IT staff to make the apps work for users

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Name some legacy bottlenecks

A

Project resourcing could take months
Limited resource
Setup and tear down not simple

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

When Dev and Ops fused, what did they need to do? (2)

A

Make coders responsible for deployment and maintenance

Treat virtualisation as code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What were the 3 key defining moments for DevOps evolution?

A

1: SRE
2: Debois - Agile infrastructure
3: Allspaw and Hammond - Best practice

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the SRE approach based on? (6)

A
Shared responsibility
Embrace of risk
Acknowledgment of failure as normal
Use automation to reduce toil
Measurement of everything
Qualifying success in terms of meeting quantitative service-level objectives
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Name 3 best practice that Allspaw and Hammond presented

A

Automated infrastructure.
Shared version control.
Single-step builds and deployments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Name 3 best practice for DevOps

A

Automation - reduce cost and reduce toil
Failure is normal - this should drive to build better systesm
Re-frame availability - SLO/SLI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Name two basic tools for scripting?

A

Bash

Python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Name 4 ways to make a script efficient

A

Standardising parameters, flags and errors
Create hierarchy and logically
Create high-level scripts for entire deployments and low-level for phases
Make code generic and re-usable as possible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is idempotency

A

Any script to lead to the desired state regardless of what the state was.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Principles of idempotency

A

Look before you leap: if it aint broke don’t fix it
Get a good known state before making changes
Test for idempotency: ensure there are no side effects of automation
One bad apple spoils the bunch: all parts of the code need to be idempotent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What benefit do you get out of automation tools? (6)

A
Simplify and Standardise
Accelerate development with out the box features
Facilitate reusability
Perform discovery and manage inventory
Handle Scale
Engage community
24
Q

Procedure or declarative: Ansible

A

Declarative

25
Procedure or declarative: Puppet
Declarative
26
Procedure or declarative: Chef
Procedural
27
Define Procedure vs declarative
- Procedure code can achieve idempotency | - Declarative - static model that represents the desired model
28
Describe the differences between. | Provisioning; configuration; deployment; orchestration
Provisioning - getting things ready Configuration - installing base applications and enable testing Deployment - building, arranging, integrating multi component apps, eg DB cluster Orchestration - some form of automation
29
In terms of Orchestration what is the difference between Concretely and Abstractly
Concretely - autoscaling or self-healing | Abstractly - process workflows like self-service
30
Define the difference between stateless and not stateless in terms of app and server relation
Not stateless: an app saves important info in local files | Stateless: an app saves to remote files/database and requires no memory of state between invocations
31
Name 3 popular automation tools
Ansible, Puppet, Chef
32
What characteristics to automation tools share
Easy to learn Open source Adapters available for a given platform, eg AWS, UCS
33
What architecture does Ansible have?
Control nodes
34
What can a control node do in Ansible?
- Run shell commands on remote targets via Rest interface - Inject python scripts on targets - Install python on targets
35
What data structure does Ansible use?
YAMl
36
Describe the Ansible folder structure (5)
Inventory file (hostfiles) - organises your inventory of resources Variable files - variables relating to hosts Library and utilities - contain modules to interact with hosts/resources eg ACI Main playbook file - YAML may reference other low level roles Role folder and files - These are like submodules, each role folder contains task folders with main.yml in each. It also contains handler task files
37
What software is available to control multiple Ansible nodes
Red Hat Ansible Tower | AWX
38
Ansible define Module
Code to perform an action on a managed device. Often written in Python.
39
Ansible define Task
An action pointing to a given module. Can accept argument and actions.
40
Ansible define Play
A set of Tasks to a host or group of hosts.
41
Ansible define Playbook
A set of Plays, written in a YAML file.
42
Ansible define Role
A set of Playbooks that can repeatedly execute a standard configuration. You can assign multiple roles to a single host.
43
Ansible define Inventory
A set of devices on which you run playbooks.
44
Describe puppet architecture
Server for Master; Facter and PuppetDB Client called Puppet Agent Modules for non-agent able devices Proxy agent to manage non-agent devices
45
How many hosts can a puppet server handle
4000
46
Name Chef components (4)
Chef Workstation: a standalone operator workstation Chef Infra Client (host agent): runs on hosts; Cookbooks enable control on non chef clients, eg ios Chef Infra Server: Replies to clients and responds to configuration updates
47
Chef workstation components (5)
CLI tools for authoring cookbooks and applying to hosts Interacting with server to bootstrap new servers Test Kitchen - for testing ChefSpec - simulates code before implementing InSpec - security/compliance auditing
48
What Chef community provides Cookbooks
Chef Supermarket
49
How many hosts can a Chef server handle
10000
50
What is GitOps?
Treating infrastructure as code and single source of truth. It makes deploying a server quicker and standarised
51
Benefits of having infrastructure as code
Rapid reconvergence to a desired state, eg device replacement Portability - network config moves with server/application Version control
52
What is pyAts?
Network device test and validate solution written in Python
53
pyAts features
Modules available to use in Python Testing modules available, Aetest, Easypy CLI for test and interrogation of devices
54
How do you obtain doc/help on an ansible module
ansible-doc mod_name
55
Command to execute a playbook called site.yml and inventory called inv.txt
ansible-playbook -i inv.txt site.yml
56
What sources of data can pyAts consume?
JSON, excel as YANG Models