Practice Quiz: Automation at Scale

  • Total points: 5
  • Score: 100%

Question 1

What is IaC (Infrastructure as Code)?

  • Writing a program from the outside in
  • Programs for industrial use
  • Hardware-based programming with FPGAs
  • Using a version control system to deploy and manage node configurations

IaC goes hand in hand with continuous delivery.

Question 2

What is the principle called when you think of networked machines as interchangeable resources instead of individual machines?

  • “Flexible deployment”
  • The “Borg” principle
  • Treating computers like “cattle instead of pets”
  • The principle of “group operation”

This means no node is irreplaceable and configuration is automated.

Question 3

What benefits can we gain by using automation to manage our configuration? (Check all that apply)

  • Consistency
  • Simplicity
  • Reliability
  • Scalability

When a configuration or process doesn’t depend on a human remembering to follow all the necessary steps, the result will always be the same.

Because automation breeds consistency, when we know a particular process that has been automated works, we can count on it working every time as long as everything remains the same.

A scalable system is a flexible system that can handle extra tasks or integrate extra resources easily.

Question 4

Puppet is a commonly used configuration management system. Which of the following applications are also used for configuration management?

  • Valgrind
  • Chef
  • Ansible
  • CFEngine

Chef is a configuration management system that treats configuration as code.

Ansible is an open source IT Configuration Management, Deployment & Orchestration tool which aims to provide a wide variety of automation challenges with huge productivity gains.

CFEngine is an open-source configuration management program that offers automated configuration and maintenance of large-scale computing networks, including centralized cloud, desktop, consumer and industrial application control, embedded networked applications, handheld smartphones, and tablet computers.

Question 5

A network administrator is accustomed to manually configuring the 5 nodes on the network he manages. However, the company he works for is quickly growing, and there are plans to expand the network to 200 nodes. What is the most reasonable course of action for the network administrator?

  • Prepare to manually configure 200 nodes
  • Hire more network techs
  • Ask for a reduction in planned nodes to simplify configuration
  • Prepare scripts or download software for automated configuration

We can write automation scripts ourselves or we can use some sort of configuration management software to make our network scalable by pushing changes from a control server.

Practice Quiz: Introduction to Puppet

  • Total points: 5
  • Score: 100%

Question 1

A Puppet agent inspects /etc/conf.d, determines the OS to be Gentoo Linux, then activates the Portage package manager. What is the provider in this scenario?

  • /etc/conf.d
  • Portage
  • Gentoo Linux
  • The Puppet agent

The Portage package manager used by Gentoo Linux is the provider called by the Puppet agent.

Question 2

Which of the following examples show proper Puppet syntax?

class AutoConfig {
  package { 'Executable':
    ensure => latest,
  }
  file { 'executable.cfg':
    source => 'puppet:///modules/executable/Autoconfig/executable.cfg'
    replace => true,
  }
  service { 'executable.exe':
    enable  => true,
    ensure  => running,
  }
}

The AutoConfig class has all its resources grouped together using proper Puppet syntax.

Question 3

What is the benefit of grouping resources into classes when using Puppet?

  • Providers can be specified
  • Configuration management is simplified
  • The title is changeable
  • Packages are not required

Grouping a collection of related resources into a single class simplifies configuration management by, for one example, allowing us to apply a single class to each host rather than having to specify every resource for each host separately and possibly missing some.

Question 4

What defines which provider will be used for a particular resource?

  • Puppet assigns providers based on the resource type and data collected from the system.
  • A menu allows you to choose providers on a case-by-case basis.
  • The user is required to define providers in a config file.
  • Puppet uses an internet database to decide which provider to use.

Puppet assigns providers according to predefined rules for the resource type and data collected from the system such as the family of the underlying operating system.

Question 5

In Puppet’s file resource type, which attribute overwrites content that already exists?

  • Purge
  • Overwrite
  • Replace
  • Save

Puppet has many useful attributes. “Replace” set to True tells Puppet to replace files or symlinks that already exist on the local system but whose content doesn’t match what the source or content attribute specifies.

Practice Quiz: The Building Blocks of Configuration Management

  • Total points: 5
  • Score: 100%

Question 1

How is a declarative language different from a procedural language?

  • A declarative language defines the goal; a procedural language defines the steps to achieve a goal.
  • Declarative languages are object-based; procedural languages aren’t.
  • Declarative languages aren’t stateless; procedural languages are stateless.
  • A declarative language defines each step required to reach the goal state.
    Correct

In a declarative language, it’s important to correctly define the end state we want to be in, without explicitly programming steps for how to achieve that state.

Question 2

Puppet facts are stored in hashes. If we wanted to use a conditional statement to perform a specific action based on a fact value, what symbol must precede the facts variable for the Puppet DSL to recognize it?

  • @
  • #
  • $
  • &

All variable names are preceded by a dollar sign in Puppet’s DSL.

Question 3

What does it mean that Puppet is stateless?

  • Puppet retains information between uses.
  • An action can be performed repeatedly without changing the system after the first run.
  • There is no state being kept between runs of the agent.
  • Actions are taken only when they are necessary to achieve a goal.

Stateless means there is no record of previous interactions, and each interaction request has to be handled based entirely on information that comes with it.

Question 4

What does the “test and repair” paradigm mean in practice?

  • There is no state being kept between runs of the agent.
  • We should plan to repeatedly fix issues.
  • We need to test before and after implementing a fix.
  • We should only take actions when testing determines they need to be done to reach the requested state

By checking to see if a resource requires modification first, we can avoid wasting precious time.

Question 5

Where, in Puppet syntax, are the attributes of a resource found?

  • Inside the curly braces after the resource type
  • In brackets after the if statement
  • After ensure =>
  • After the dollar sign ($)

We specify the package contents inside the curly braces, placed after the package title.

Peer Graded Assessment

Click here to view

2. Deploying Puppet

Practice Quiz: Deploying Puppet Locally

  • Total points: 5
  • Score: 100%

Question 1

Puppet evaluates all functions, conditionals, and variables for each individual system, and generates a list of rules for that specific system. What are these individual lists of rules called?

  • Manifests
  • Dictionaries
  • Catalogs
  • Modules

The catalog is the list of rules for each individual system generated once the server has evaluated all variables, conditionals, and functionals in the manifest and then compared them with facts for each system.

Question 2

After we install new modules that were made and shared by others, which folder in the module’s directory will contain the new functions and facts?

  • files
  • manifests
  • lib
  • templates

New functions added after installing a new module can be found in the lib folder in the directory of the new module.

Question 3

What file extension do manifest files use?

  • .cfg
  • .exe
  • .pp
  • .man

Manifest files for Puppet will end in the extension .pp.

Question 4

What is contained in the metadata.json file of a Puppet module?

  • Manifest files
  • Additional data about the module
  • Configuration information
  • Pre-processed data

Metadata is data about data, and in this case, often takes the form of installation and compatibility information.

Question 5

What does Puppet syntax dictate we do when referring to another resource attribute?

  • Enter the package title before curly braces
  • Follow the attribute with a semicolon
  • Capitalize the attribute
  • Type the attribute in lowercase

When defining resource types, we write them in lowercase, then capitalize them when referring to them from another resource attribute.

Practice Quiz: Deploying Puppet to Clients

  • Total points: 5
  • Score: 100%

Question 1

When defining nodes, how do we identify a specific node that we want to set rules for?

  • By using the machine’s MAC address
  • By specifying the node’s Fully Qualified Domain Names (FQDNs)
  • User-defined names
  • Using XML tags

A FQDN is a complete domain name for a specific machine that contains both the hostname and the domain name.

Question 2

When a Puppet agent evaluates the state of each component in the manifest, it uses gathered facts about the system to decide which rules to apply. What tool can these facts be “plugged into” in order to simplify management of the content of our Puppet configuration files?

  • Node definitions
  • Certificates
  • Templates
  • Modules

Templates are documents that combine code, system facts, and text to render a configuration output fitting predefined rules.

Question 3

What is the first thing that happens after a node connects to the Puppet master for the first time?

  • The node identifies an open port.
  • The Puppet-master requests third-party authentication.
  • The node requests a certificate.
  • The user can immediately add modules.

After receiving a certificate, the node will reuse it for subsequent logins.

Question 4

What does FQDN stand for, and what is it?

  • Feedback Query Download Noise, which is extraneous data in feedback queries
  • Far Quantum Data Node, which is a server node utilizing quantum entanglement
  • Fairly Quantized Directory Network, which is a network consisting of equitable counted folders
  • Fully Qualified Domain Name, which is the full address for a node

A fully qualified domain name (FQDN) is the unabbreviated name for a particular computer, or server. There are two elements of the FQDN: the hostname and the domain name.

Question 5

What type of cryptographic security framework does Puppet use to authenticate individual nodes?

  • Single Sign On (SSO)
  • Public Key Infrastructure (PKI)
  • Fully Qualified Domain Name (FQDN)
  • Token authentication

Puppet uses an Secure Sockets Layer (SSL) Public Key Infrastructure to authenticate both nodes and masters.

Practice Quiz: Updating Deployments

  • Total points: 5
  • Score: 100%

Question 1

What is a production environment in Puppet?

  • The software used for software development such as IDEs.
  • The parts of the infrastructure where a service is executed, and served to its users.
  • A cloud service for commercial production.
  • A Virtual Machine reserved for beta software.

Environments in Puppet are used to isolate software in development from software being served to end users.

Question 2

What is the –noop parameter used for?

  • Passing a variable called noop to Puppet
  • Adding conditional rules to manifests
  • Defining what operations not to perform in a manifest
  • Simulating manifest evaluation without taking any actions

No Operations mode makes Puppet simulate what it would do without actually doing it.

Question 3

What do rspec tests do?

  • Checks that nodes can connect to the puppet master correctly
  • Check the specification of the current node
  • Check the manifests for specific content
  • Checks that the node is running the correct operating system

We can test our manifests automatically by using rspec tests. In these tests, we can verify resources exist and have attributes set to specific values.

Question 4

How are canary environments used in testing?

  • To store unused code
  • As a test environment to detect problems before they reach the production environment
  • As a repository for alternative coding methods for a particular problem
  • As a test environment for final software versions

If we can identify a problem before it reaches all the machines in the production environment, we’ll be able to keep the problem isolated.

Question 5

What are efficient ways to check the syntax of the manifest? (Check all that apply)

  • Run full No Operations simulations
  • Run rspec tests
  • Test manually
  • puppet parser validate

In order to perform No Operations simulations, we must use the –noop parameter when running the rules.

To test automatically, we need to run rspec tests, and fix any errors in the manifest until the RSpec tests pass.

Using the puppet parser validate command is the simplest way to check that the syntax of the manifest is correct.

Graded Assessment

Click here to view

SRC

Click here to view

3. Automation in the Cloud

Practice Quiz: Automating Cloud Deployments

  • Total points: 5
  • Score: 100%

Question 1

In order to detect and correct errors before end users are affected, what technique(s) should we set up?

  • Monitoring and alerting
  • Orchestration
  • Autoscaling
  • Infrastructure as Code

Monitoring and alerting allows us to monitor and correct incidents or failures before they reach the end user.

Question 2

When accessing a website, your web browser retrieves the IP address of a specific node in order to load the site. What is this node called?

  • Gate node
  • Entry point
  • Access machine
  • Front line

When you connect to a website via the Internet, the web browser first receives an IP address. This IP address identifies a particular computer: the entry point of the website.

Question 3

What simple load-balancing technique just assigns to each node one request at a time?

  • Random
  • Round Robin
  • Least connections
  • Source IP

Round-robin load balancing is a basic way of spreading client requests across a server group. In turn, a client request will be forwarded to each server. The load balancer is directed by the algorithm to go back to the top of the list and repeat again.

Question 4

Which cloud automation technique spins up more VMs into instance groups when demand increases, and shuts down VMs when demand decreases?

  • Infrastructure as Code
  • Autoscaling
  • Load Balancing
  • Orchestration

Autoscaling helps us save costs by matching resources with demand automatically.

Question 5

Which of the following are examples of orchestration tools used to manage cloud resources as code? (Check all that apply)

  • Terraform
  • CloudFormation
  • Azure Resource Manager
  • CloudFlare

Like Puppet, Terraform uses its own domain specific language (DSL), and manages configuration resources as code.

CloudFormation is a service provided by Amazon to assist in modeling and managing AWS resources.

Azure Resource Manager is the deployment and management service for Azure. It provides a management layer that enables you to create, update, and delete resources.

Practice Quiz: Cloud Computing

  • Total points: 5
  • Score: 100%

Question 1

When we use cloud services provided to the general consumer, such as Google Suite or Gmail, what cloud deployment model are we using?

  • Hybrid cloud
  • Private cloud
  • Public cloud
  • Multi-cloud

A public cloud offers services to the general public, often as SaaS (Software as a Service) offerings.

Question 2

What is a container?

  • A cloud deployment model that is a combination of public and private clouds
  • A synonym for virtual machine
  • A public file server
  • A virtualized environment containing applications and configurations that can run quickly and reliably on any computing environment

A container is an OS- and hardware-independent environment that allows for easy migration and compatibility.

Question 3

Select the examples of Managed Web Application Platforms. (Check all that apply)

  • Google App Engine.
  • Amazon Elastic Beanstalk
  • Microsoft App Service.
  • Dropbox

Google App Engine is a Platform as a Service (PaaS) product that offers access to Google’s flexible hosting and Tier 1 Internet service for Web app developers and enterprises.

AWS Elastic Beanstalk is an easy-to-use PaaS service for deploying and scaling web applications.

Microsoft Azure App Service enables you to build and host web apps, mobile back ends, and RESTful APIs in the programming language of your choice without having to manage infrastructure.

Question 4

When a company solely owns and manages its own cloud infrastructure, what type of cloud deployment model are they using?

  • Public cloud
  • Hybrid cloud
  • Private cloud
  • Multi-cloud

A private cloud deployment is one that is fully owned and operated by a single company or entity.

Question 5

Which “direction” are we scaling when we add RAM or CPU resources to individual nodes?

  • Down
  • Horizontal
  • Up
  • Vertical

Vertical scaling is a form of upscaling, but upscaling can also be horizontal.

Practice Quiz: Managing Instances in the Cloud

  • Total points: 5
  • Score: 100%

Question 1

What is templating?

  • The process of capturing the entire system configuration to enable us to reproduce virtual machines
  • The process of copying virtual machines
  • The process of creating a new virtual machine instance
  • The process of testing configurations against known-working settings

Effective templating software allows you to capture an entire virtual machine configuration and use it to create new ones.

Question 2

Why is it important to consider the region and zone for your cloud service?

  • To follow local laws and regulations
  • To avoid time zone discrepancy
  • To avoid language barriers
  • To ensure bandwidth and reliability for users

Generally, you’re going to want to choose a region that is close to your users so that you can deliver better performance.

Question 3

What option is used to determine which OS will run on the VM?

  • Machine type
  • Boot disk
  • Region
  • Template

The boot disk from which the VM boots will determine what operating system runs on the VM.

Question 4

When setting up a new series of VMs using a reference image, what are some possible options for upgrading services running on our VM at scale?

  • Manually updating files via the command line
  • Create a new reference image each update
  • Editing parameters and uploading files individually through the web interface
  • Use a configuration management system like Puppet

One way of updating VM services at scale is to simply spin them up again with an updated reference image.

Puppet or other configuration management systems provide a streamlined way to deploy service updates at scale.

Question 5

When using gcloud to manage VMs, what two parameters tell gcloud that a) we want to manage our VM resources and b) that we want to deal with individual VMs? (Check two)

  • compute
  • init
  • instances
  • Template

The compute parameter tells gcloud that we are managing Compute Engine resources.

The instances parameter that follows the compute parameter tells gcloud that we want to manage our VMs on the instance level.

Graded Assessment

Click here to view

4. Managing Cloud Instances at cloud

Practice Quiz: Building Software for the Cloud

  • Total points: 5
  • Score: 100%

Question 1

What is latency in terms of Cloud storage?

  • The measure of how many reads or writes you can do in one second, no matter how much data you’re accessing.
  • The amount of data that you can read, and write in a given amount of time.
  • The amount of time it takes to complete a read or write operation.
  • The time delay between an input and output.

Latency is the amount of time it takes to complete a read or write operation.

Question 2

Which of the following statements about sticky sessions are true? (Select all that apply.)

  • All requests from the same client always go to the same backend server.
  • Sticky sessions maintain an even load.
  • They should only be used when needed.
  • They can cause problems during migration.

Sticky sessions route requests for a particular session to the same machine that first served the request for that session.

Because sticky sessions can cause uneven load distribution as well as migration problems, they should only be used when absolutely necessary.

Sticky sessions can cause unexpected results during migration, updating, or upgrading, so it’s best to use them only when absolutely necessary.

Question 3

If you run into limitations such as rate limits or utilization limits, you should contact the Cloud provider and ask for a _.

  • Beta version
  • Quota increase
  • A/B test
  • Blob storage solution

Our cloud provider can increase our limits that we have set, though it will cost more money.

Question 4

What is the term referring to everything needed to run a service?

  • Environment
  • Provisions
  • Utilization limits
  • Continuous integration

Everything used to run the service is referred to as the environment. This includes the machines and networks used for running the service, the deployed code, the configuration management, the application configurations, and the customer data.

Question 5

What is the term referring to a network of hosts spread in different geographical locations, allowing ISPs to be as close as possible to content?

  • Domain Name Service
  • Continuous Deployment
  • Platform as a Service
  • Content delivery network

CDNs allow an ISP to select the closest server for the content it is requesting.

Practice Quiz: Monitoring & Alerting

  • Total points: 5
  • Score: 100%

Question 1

What is a Service Level Agreement?

  • An agreement between the user and developer.
  • A strict commitment between a provider and a client.
  • An agreement between service providers.
  • A guarantee of service quality.

A service-level agreement is an arrangement between two or more parties, one being the client and the other being service providers.

Question 2

What is the most important aspect of an alert?

  • It must be actionable.
  • It must require a human to be notified.
  • It must require immediate action.
  • It must precisely describe the cause of the issue.

If an alert notification is not actionable, it should not be an alert at all.

Question 3

Which part of an HTTP message from a web server is useful for tracking the overall status of the response and can be monitored and logged?

  • A triggered alert
  • The data pushed back to the client
  • Metrics sent from the server
  • The response code in the server’s message

We can log and monitor these response codes, and even use them to set alert conditions.

Question 4

To set up a new alert, we have to configure the _ that triggers the alert.

  • Condition
  • Metric
  • Incident
  • Service Level Objective (SLO)

We must define what occurence or metric threshold will serve as a conditional trigger for our alert.

Question 5

When we collect metrics from inside a system, this is known as __ monitoring.

  • White-box
  • Black-box
  • Network
  • Log

A white-box monitoring system is one that collects metrics internally, from within the system being monitored.

Practice Quiz: Troubleshooting & Debugging

  • Total points: 5
  • Score: 100%

Question 1

Which of the following are valid strategies for recovery after encountering service failure? (Select all that apply.)

  • Switching to a secondary instance.
  • Setting up monitoring and alerts.
  • Restoring from backup.
  • Performing a rollback to a previous version.

A quick way to recover is to have a secondary instance of the VM running your service that you can quickly switch to.

As long as you’ve been keeping frequent backups, restoring a previous VM image will often get you where you need to be.

If the problem is related to recent changes or updates, rolling back to a previous working version of the service or supporting software will give the time to investigate further.

Question 2

Which of the following concepts provide redundancy? (Select all that apply.)

  • Having a secondary instance of a VM.
  • Having a secondary Cloud vendor.
  • Having automatic backups configured.
  • Performing a rollback.

If your primary VM instance running your service fails, having a secondary instance running in the background ready to take over can provide instant failover.

Having a secondary Cloud service provider on hand with your data in case of the first provider having large-scale outages can provide redundancy for a worst-case scenario.

Question 3

If you operate a service that stores any kind of data, what are some critical steps to ensure disaster recovery? (Select all that apply)

  • Implement automated backups
  • Use redundant systems wherever possible
  • Test backups by restoring
  • Never delete old backups

As long as we have viable backup images, we can restore the VM running our service.
It’s important to know that our backup process is working correctly. It would not do to be in a recovery situation and not have backups.

Question 4

What is the correct term for packaged applications that are shipped with all needed libraries and dependencies, and allows the application to run in isolation?

  • Rollback
  • Secondary instance
  • Containers
  • Disk Image

Containerization ensures that our software runs the same way every time.

Question 5

Using a large variety of containerized applications can get complicated and messy. What are some important tips for solving problems when using containers? (Select all that apply)

  • Use extensive logging in all parts
  • Reduce the number of containers
  • Reuse container configurations
  • Use test instances

As long as we have the right logs in the right places, we can tell where our problems are.

We should take every opportunity to test and retest that our configuration is working properly.

Graded Assessment

Click here to view