Infrastructure and automation Flashcards
What are three benefits of Infrastructure automation
Speed
Repeatability
The ability to work at scale, with reduced risk
What is an imperative procedure
an ordered sequence of commands aimed at achieving a goal. The sequence may include flow-control, conditions, functional structure, classes, and more.
What is provisioning
refers to obtaining compute, storage, and network infrastructure (real or virtual), enabling communications, putting it into service, and making it ready for use by operators and developers (e.g., by installing an operating system, machine-level metrics, ssh keys, and the lowest level of operations tooling).
What is configuration
means installing base applications and services and performing the operations, tasks, and tests required to prepare a low-level platform to deploy applications or a higher-level platform.
What does Deployment mean
involves building, arranging, integrating, and preparing multi-component applications (such as database clusters) or higher-level platforms (like Kubernetes clusters), often across multiple nodes.
What is Orchestration
may refer to several things. When meant concretely, it usually refers to user-built or platform-inherent automation aimed at managing workload lifecycles and reacting dynamically to changing conditions (e.g., by autoscaling or self-healing), particularly in container environments. When meant abstractly, it may refer simply to processes or workflows that link automation tasks to deliver business benefits, like self-service.
What is provisioning
refers to obtaining compute, storage, and network infrastructure (real or virtual), enabling communications, putting it into service, and making it ready for use by operators and developers (e.g., by installing an operating system, machine-level metrics, ssh keys, and the lowest level of operations tooling)
What is Configuration
means installing base applications and services and performing the operations, tasks, and tests required to prepare a low-level platform to deploy applications or a higher-level platform.
What is deployment
involves building, arranging, integrating, and preparing multi-component applications (such as database clusters) or higher-level platforms (like Kubernetes clusters), often across multiple nodes.
What is Orchestration
may refer to several things. When meant concretely, it usually refers to user-built or platform-inherent automation aimed at managing workload lifecycles and reacting dynamically to changing conditions (e.g., by autoscaling or self-healing), particularly in container environments. When meant abstractly, it may refer simply to processes or workflows that link automation tasks to deliver business benefits, like self-service.
Describe a stateless / No state to store application
This app requires only atomic/synchronous interactions between client and server: each request from client to server returns a result wholly independent of prior and subsequent requests. An example of this application is a public web server that returns an HTML page, image, or other data on request from a browser. The application can be scaled by duplicating servers and data behind a simple load balancer.
Describe Stateless / State stored on database app
User state is stored in a database accessible to any webserver in the middle tier. An example of this application is a web server that needs to be aware of the correspondence between a user ID and user cookie. New webservers and copies of the website can be added freely without disrupting user sessions in progress and without requiring that each request from a given user be routed to the specific server that maintains their session.
Describe Stateful /State stored on server app
A record of user state must be maintained across a series of transactions. An example of this application is a website that requires authentication: the app isn’t allowed to serve pages to a user who is not logged in. User state is typically persisted by giving the client an identifying cookie that is returned to the server with each new request and used to match an ID stored there. This application can’t be scaled just by adding servers: if a logged-in user is routed to a server that hasn’t stored an ID matching the user’s cookie, that server won’t recognize them as being logged in, and will refuse their request.
What is a playbook in Ansible
lists of tasks that automatically execute against hosts
Explain the basic workflow for Ansible using playbooks
Engineers create Ansible playbooks in YAML that describe a workflow or the configuration of infrastructure.
Ansible playbooks are deployed to an Ansible control station.
When the control station runs the Ansible playbooks, they typically copy modules written
in Python to remote hosts.
Finally, Ansible runs the modules on the remote hosts to perform the work described in playbooks
What is procedural automation
be used to capture and share corporate knowledge including best practices, and to minimize errors with resulting decrease in incidents, improved safety and higher throughput.
What is the goal of any script
to achieve a desired state in a system regardless of starting conditions
What is idempotency
means that the result of a successfully performed request is independent of the number of times it is executed
What is the meaning of the idempotency principle “Look before you leap”
Also known as “If it ain’t broke, don’t fix it” and “First, do no harm”. Ensure the change you want to make hasn’t already been made. Doing nothing is almost always a better choice than doing something wrong and possibly unrecoverable.
What is the meaning of the idempotency principle “Get to a known-good state, if possible, before making changes”
Secure a functional state before you go and change it
What is the meaning of the idempotency principle “Test for idempotency “
Be scrupulous about building automation free from side effects
What is the meaning of the idempotency principle “One bad apple spoils the bunch”
Only if all components of a procedure are known to be idempotent can the procedure as a whole be idempotent.
What are the methods to configure a remote system
You can store scripts locally, transmit them to target machines with a shell utility like scp, then log into the remote machine using ssh and execute them.
You can pipe scripts to a remote machine using cat | ssh and execute them in sequence with other commands, capturing and returning results to your terminal, all in one command.
You can install a general-purpose secure file-transfer client like SFTP, then use that utility to connect to the remote machine, transfer, set appropriate permissions, then execute your script file.
You can store scripts on a webserver, log into the remote machine and retrieve them with wget, curl, or other utilities, or store the scripts in a Git repository — installing git on the remote machine, cloning the repo to it, checking out a branch, and executing the scripts found there.
You can install a full remote-operations solution like VNC or NoMachine locally, install its server on the target (this usually requires also installing a graphical desktop environment), transmit/copy and then execute scripts.
If your target devices are provisioned on a cloud framework (for example, UCS, AWS, Azure, GCP), there’s usually a way to inject a configuration script via the same CLI command or WebUI action that manifests the platform.
What do automation tools do
“wrap” operating system utilities and API functions to simplify and standardize access