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
Q

Procedure or declarative: Puppet

A

Declarative

26
Q

Procedure or declarative: Chef

A

Procedural

27
Q

Define Procedure vs declarative

A
  • Procedure code can achieve idempotency

- Declarative - static model that represents the desired model

28
Q

Describe the differences between.

Provisioning; configuration; deployment; orchestration

A

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
Q

In terms of Orchestration what is the difference between Concretely and Abstractly

A

Concretely - autoscaling or self-healing

Abstractly - process workflows like self-service

30
Q

Define the difference between stateless and not stateless in terms of app and server relation

A

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
Q

Name 3 popular automation tools

A

Ansible, Puppet, Chef

32
Q

What characteristics to automation tools share

A

Easy to learn
Open source
Adapters available for a given platform, eg AWS, UCS

33
Q

What architecture does Ansible have?

A

Control nodes

34
Q

What can a control node do in Ansible?

A
  • Run shell commands on remote targets via Rest interface
  • Inject python scripts on targets
  • Install python on targets
35
Q

What data structure does Ansible use?

A

YAMl

36
Q

Describe the Ansible folder structure (5)

A

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
Q

What software is available to control multiple Ansible nodes

A

Red Hat Ansible Tower

AWX

38
Q

Ansible define Module

A

Code to perform an action on a managed device. Often written in Python.

39
Q

Ansible define Task

A

An action pointing to a given module. Can accept argument and actions.

40
Q

Ansible define Play

A

A set of Tasks to a host or group of hosts.

41
Q

Ansible define Playbook

A

A set of Plays, written in a YAML file.

42
Q

Ansible define Role

A

A set of Playbooks that can repeatedly execute a standard configuration. You can assign multiple roles to a single host.

43
Q

Ansible define Inventory

A

A set of devices on which you run playbooks.

44
Q

Describe puppet architecture

A

Server for Master; Facter and PuppetDB
Client called Puppet Agent
Modules for non-agent able devices
Proxy agent to manage non-agent devices

45
Q

How many hosts can a puppet server handle

A

4000

46
Q

Name Chef components (4)

A

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
Q

Chef workstation components (5)

A

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
Q

What Chef community provides Cookbooks

A

Chef Supermarket

49
Q

How many hosts can a Chef server handle

A

10000

50
Q

What is GitOps?

A

Treating infrastructure as code and single source of truth. It makes deploying a server quicker and standarised

51
Q

Benefits of having infrastructure as code

A

Rapid reconvergence to a desired state, eg device replacement
Portability - network config moves with server/application
Version control

52
Q

What is pyAts?

A

Network device test and validate solution written in Python

53
Q

pyAts features

A

Modules available to use in Python
Testing modules available, Aetest, Easypy
CLI for test and interrogation of devices

54
Q

How do you obtain doc/help on an ansible module

A

ansible-doc mod_name

55
Q

Command to execute a playbook called site.yml and inventory called inv.txt

A

ansible-playbook -i inv.txt site.yml

56
Q

What sources of data can pyAts consume?

A

JSON, excel as YANG Models