COURSE 5 – CONFIGURATION MANAGEMENT AND THE CLOUD

Module 3: Configuration Management and Monitoring

GOOGLE IT AUTOMATION WITH PYTHON PROFESSIONAL CERTIFICATE

Complete Coursera Study Guide

Last updated:

INTRODUCTION – Configuration management and monitoring

This module delves into cloud services, elucidating the various types such as SaaS, PaaS, and IaaS, along with their functionalities. You’ll explore scaling in the cloud, encompassing horizontal and vertical scaling, and delve into automatic versus manual scaling techniques. Moreover, you’ll assess the degree of control offered by SaaS, PaaS, and IaaS models, helping you determine the most suitable option for your business needs.

Moving forward, you’ll examine migration strategies to transition your business to the cloud, including lift and shift methodologies. The subsequent lesson guides you through instance management in the cloud, covering essential aspects like region selection, machine types, and customization options for virtual machines to facilitate scalable deployments. Lastly, the module explores automating cloud deployments, discussing load balancers for request distribution, autoscaling for efficient resource utilization, and the distinction between orchestration and automation. Additionally, you’ll delve into infrastructure as code (IaC), emphasizing the significance of machine-readable configuration files in automating configuration management processes.

Learning Objectives

  • Understand and define SaaS, PaaS, and IaaS
  • Understand the concept of scaling in the cloud and the different ways of scaling
  • Explain what lift and shift means when migrating to the cloud
  • Deploy an instance in the cloud
  • Understand the difference between auto scaling and load balancing
  • Differentiate between orchestration and automation
  • Define the concept of Infrastructure as Code (IaC)

PRACTICE QUIZ: AUTOMATION AT SCALE

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 (CORRECT)

IaC goes hand in hand with continuous delivery.

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” (CORRECT)
  • The principle of “group operation”

This means no node is irreplaceable and configuration is automated.

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

  • Consistency (CORRECT)
  • Simplicity
  • Reliability (CORRECT)
  • Scalability (CORRECT)

Way to go! 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.

Right on! 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.

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

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

  • Valgrind
  • Chef (CORRECT)
  • Ansible (CORRECT)
  • CFEngine (CORRECT)

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.

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 (CORRECT)

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

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 (CORRECT)
  • Gentoo Linux 
  • The Puppet agent 

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

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,
  }
} 
(CORRECT)
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,
class AutoConfig {
  package { 'Executable':
    ensure == latest,
  }
  file { 'executable.cfg':
    source == 'puppet:///modules/executable/Autoconfig/executable.cfg'
    replace == yes,
  }
  service { 'executable.exe':
    enable  == yes,
    ensure  == true,
  }
}
class AutoConfig {
  package { 'Executable':
    assure=> latest,
  }
  file { 'executable.cfg':
    origin=> 'puppet:///modules/executable/Autoconfig/executable.cfg'
    substitute=> true,
  }
  program{ 'executable.exe':
    activate => true,
    assure => running,
  }
}

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

  • Providers can be specified
  • Configuration management is simplified (CORRECT)
  • 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.

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. (CORRECT)
  • 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.

Awesome! 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.

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

  • Purge
  • Overwrite
  • Replace (CORRECT)
  • 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.

6. What is the most basic unit for modeling in Puppet?

  • package
  • title
  • resource (CORRECT)
  • file

The most basic unit in Puppet is a resource, such as user, group, file, service or package

7. What is the advantage of grouping related resources into a single class?

  • To ensure efficiency and convenience for future changes (CORRECT)
  • It is required by Puppet
  • To keep computer clocks synchronized
  • To prevent errors

By grouping related resources together, we can more easily understand the configuration and make changes in the future.

PRACTICE QUIZ: THE BUILDING BLOCKS OF CONFIGURATION MANAGEMENT

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. (CORRECT)
  • 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.

Right on! 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.

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?

  • @
  • #
  • $ (CORRECT)
  • &

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

3. What does it mean when we say 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 record of previous interactions. (CORRECT)
  • Actions are taken only when they are necessary to achieve a goal.

Awesome! Each interaction request has to be handled based entirely on information that comes with it.

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. (CORRECT)

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

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

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

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

6. What is a fact in Puppet?

  • A variable representing characteristics of a system (CORRECT)
  • A type of parameter
  • A type of resource
  • A variable representing packages

Nicely done! A fact is a hash that stores information about the details of a particular system.

7. What does idempotent mean?

  • There is no state being kept between runs of the agent
  • We declare the state we want to achieve before running
  • An action is performed a new way each time
  • An action can be performed repeatedly without changing the system after the first run (CORRECT)

Way to go! We can use an attribute like onlyif to make sure a file is changed only if it exists.

PRACTICE QUIZ: DEPLOYING PUPPET LOCALLY

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 (CORRECT)
  • Modules 

Right on! 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. 

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 (CORRECT)
  • templates 

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

3. What file extension do manifest files use?

  • .cfg
  • .exe
  • .pp (CORRECT)
  • .man

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

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

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

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

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 (CORRECT)
  • Type the attribute in lowercase

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

6. Which of the following file extensions does the manifest file need to end with in Puppet?

  • .cfg
  • .pp (CORRECT)
  • .db
  • .mf

Awesome! Manifest files are where we store the rules to be applied.

7. When we declare a resource type, how do we differentiate between the original resource type and the name of a resource relationship being referenced in another resource?

  • Use “==” in place of “=>”.
  • Assign it a variable name.
  • Use $ before the resource type.
  • Use lowercase for the original, and capitalize the resource name when referencing a relationship. (CORRECT)

Nice job! When declaring resources initially, we type the resource type in lowercase. When we reference a resource relationship from another file, we capitalize the resource name being referenced.

8. What do we call a collection of manifests, and folders containing associated data?

  • Libraries
  • Module (CORRECT)
  • Template
  • Metadata

Great work! A module is an easy way to organize our configuration management tools.

PRACTICE QUIZ: DEPLOYING PUPPET TO CLIENTS

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) (CORRECT)
  • User-defined names 
  • Using XML tags 

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

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 (CORRECT)
  • Modules 

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

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. (CORRECT)
  • The user can immediately add modules.

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

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 (CORRECT)

Awesome! 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.

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

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

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

6. In Puppet, what can we use to categorize in order to apply different rules to different systems?

  • Node definitions (CORRECT)
  • Manifest file
  • Array configuration
  • Template

Nice job! Different kinds of nodes are defined, allowing different sets of rule catalogs to apply to different types of machines.

7. What is the purpose of the Certificate Authority (CA)?

  • To test rules in the manifest
  • To manage templates
  • To validate the identity of each machine (CORRECT)
  • To handle push/pull requests

Awesome! The CA either queues a certificate request for manual validation, or uses pre-shared data to verify before sending the certificate to the agent.

8. What kind of security encryption is used when the Puppet Certificate Authority validates the identity of a node?

  • Secure Sockets Layer (SSL) (CORRECT)
  • Secure Shell (SSH)
  • Pretty Good Privacy (PGP)
  • Transport Layer Security (TLS)

Great work! The Certificate Authority creates an SSL key for the agent machine and creates a certificate request.

PRACTICE QUIZ: UPDATING DEPLOYMENTS

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. (CORRECT)
  • A cloud service for commercial production.
  • A Virtual Machine reserved for beta software.

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

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 (CORRECT)

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

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 (CORRECT)
  • Checks that the node is running the correct operating system

Right on! 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.

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 (CORRECT)
  • As a repository for alternative coding methods for a particular problem
  • As a test environment for final software versions

Woohoo! 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.

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

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

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

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

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

6. What does the puppet parser validate command do?

  • Checks the syntax of the manifest. (CORRECT)
  • Runs full No Operations simulations.
  • Tests automatically using facts we set to evaluate the resulting catalog.
  • Forcibly applies manifests locally.

Great work! The puppet parser validate command checks the syntax of the manifest to make sure it’s correct.

7. What is the purpose of using multiple environments?

  • To fully isolate the configurations that agents see. (CORRECT)
  • To automate testing.
  • To add variety.
  • To detect potential issues before they reach the other computers.

Right on! By creating separate directories for different purposes, such as testing and production, we can ensure changes don’t affect end users.

PRACTICE QUIZ: MONITORING & ALERTING

1. What is a Service Level Agreement?

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

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

2. What is the most important aspect of an alert?

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

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

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 (CORRECT)

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

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

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

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

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

  • White-box (CORRECT)
  • Black-box
  • Network
  • Log

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

6. Which of the following monitoring models is being used if our monitoring system requires our service to actively send metrics?

  • Push model (CORRECT)
  • Pull model
  • Error monitoring
  • Resource monitoring

Awesome! When push monitoring is used, the service being monitored actively sends metrics to the monitoring system.

7. What do we call an alert that requires immediate attention?

  • Ticket
  • Page (CORRECT)
  • Cron job
  • Bug report

Nice job! Pages are alerts that need immediate human attention, and are often in the form of SMS or email.

8. If our service has a Service Level Objective (SLO) of four-nines, what is our error budget measured in downtime percentage?

  • .001%
  • 1%
  • .1%
  • .01% (CORRECT)

Nice job! If we have an SLO of 99.99%, that gives us an error budget of .01%.

9. What type of policy requires us to set up a condition which notifies us when it’s triggered?

  • Login Policy
  • Alerting Policy (CORRECT)
  • Security Policy
  • Bug Reporting Policy

Great work! An Alerting Policy specifies the conditions that trigger alerts, and the actions to be taken when these alerts are triggered, like sending an email address notification.

PRACTICE QUIZ: TROUBLESHOOTING & DEBUGGING

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

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

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

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

Woohoo! 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.

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

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

Right on! 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.

You nailed it! 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.

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 (CORRECT)
  • Use redundant systems wherever possible
  • Test backups by restoring (CORRECT)
  • Never delete old backups

Nice work! As long as we have viable backup images, we can restore the VM running our service.

Excellent! 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.

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 (CORRECT)
  • Disk Image

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

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 (CORRECT)
  • Reduce the number of containers
  • Reuse container configurations
  • Use test instances (CORRECT)

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

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

6. Which of the following is a valid method of troubleshooting a cloud service? (Select all that apply)

  • Physically inspect the machine’s connections.
  • Power cycle the hardware
  • Run a test VM in a test environment (CORRECT)
  • Call the service provider (CORRECT)

Nice job! Testing through software is always our best bet in the cloud.

Well done, you! Part of the beauty of running services in the Cloud is that you aren’t responsible for everything! Most Cloud providers are happy to provide various levels of support.

7. When troubleshooting, what is it called when an error or failure occurs, and the service is downgraded to a previous working version?

  • Reinstall
  • Rollback (CORRECT)
  • Restore
  • Redo

Great work! Rollback  is the process of restoring a database or program to a previously defined state, usually to recover from an error.

8. Which of the following are important aspects of disaster recovery? (Select all that apply)

  • Having multiple points of redundancy (CORRECT)
  • Having a well-documented disaster recovery plan (CORRECT)
  • Having automatic backups (CORRECT)
  • Eliminating failure in the first place

Nice job! Having several forms of redundancy, and failover reduces the impact when failure happens.

Awesome! In order to get things up and running as quickly as possible, we need to have a detailed plan.

Great work! Having automatic backups makes it easier to restore and recover.

CONCLUSION – Configuration management and monitoring

In conclusion, this module has provided a comprehensive overview of cloud services and their diverse functionalities, ranging from SaaS to PaaS and IaaS. You’ve gained insights into scaling techniques, understanding the nuances between horizontal and vertical scaling, as well as automatic versus manual scaling approaches. Additionally, you’ve explored the spectrum of control offered by different cloud service models, aiding in the selection of the most appropriate option for business requirements.

Furthermore, the module has equipped you with migration strategies for transitioning businesses to the cloud, including lift and shift methodologies. You’ve also learned essential skills for managing instances in the cloud, such as region selection and customization of virtual machines for scalable deployments. Lastly, you’ve delved into the automation of cloud deployments, covering load balancing, autoscaling, orchestration, and infrastructure as code (IaC) concepts.

As you move forward, armed with the knowledge and skills acquired in this module, you’ll be well-prepared to leverage cloud services effectively, driving scalability, efficiency, and automation in your business operations.