DevOps Exercises

repository·master·Indexed 11 days ago

https://github.com/bregman-arie/devops-exercises

A collection of over 2,600 technical questions and exercises for interview preparation and learning across DevOps, SRE, and software engineering. Covers domains including Kubernetes, Terraform, AWS, Azure, GCP, Linux, Networking, CI/CD, Observability (Prometheus, Grafana), and System Design.

Tokens
190.6K
Snippets
433
Records
1.2K
Agent score
97%

What's inside DevOps Exercises

  1. What is the Elastic Stack?

    master

    The Elastic Stack (often referred to as the ELK stack when using Elasticsearch, Logstash, and Kibana) is a collection of tools for data ingestion, search, and visualization.

    Core components include:

    • Elasticsearch: A distributed document store for JSON documents.
    • Kibana: An analytics and visualization platform to interact with Elasticsearch data.
    • Logstash: An ETL (Extract, Transform, Load) pipeline for collecting, enriching, and transporting data.
    • Beats: Lightweight data shippers (e.g., Filebeat, Metricbeat, Auditbeat) installed on clients to ship data.
    • Elastic Hadoop and APM Server.
  2. What is Prometheus and its core features?

    master

    Prometheus is an open-source systems monitoring and alerting toolkit designed for collecting and storing time-series data. It is optimized for cloud-native applications and microservices.

    Key Features:

    • Data Model: Uses a flexible model with labels to identify dimensions (e.g., source, environment).
    • Pull-based Architecture: The Prometheus server actively scrapes metrics from targets at regular intervals.
    • Time-series Database: Optimized for write-heavy workloads and time-range queries.
    • Alerting: A built-in system to define rules and trigger notifications via email, chat, etc.
    • Visualization: Supports custom dashboards (e.g., via PromDash).
  3. Overview of AWS DevOps Exercises

    master

    This repository provides a collection of hands-on exercises and theoretical questions focused on AWS services to help developers learn DevOps practices.

    Important Notes

    • Cost Warning: Some exercises may incur AWS costs and cannot be performed within the AWS Free Tier. Use caution when provisioning resources.
    • Recommended Approach: While the provided solutions use the AWS Management Console, it is highly recommended to solve these exercises using Infrastructure as Code (IaC) technologies such as Terraform or Pulumi to align with DevOps best practices.
  4. What is Prometheus and its key features

    master

    Prometheus is an open-source monitoring and alerting toolkit designed for collecting and storing time-series data. It is commonly used for cloud-native applications, microservices, and modern infrastructure.

    Key Features:

    • Data Model: Uses a flexible multidimensional data model with labels to organize time-series data.
    • Pull-based Architecture: The Prometheus server actively scrapes (pulls) metrics from targets at regular intervals.
    • Time-series Database: Optimized for high-volume writes and low-latency queries over time intervals.
    • Alerting: A built-in system to define rules based on metrics and trigger notifications via email, chat, etc.
    • Visualization: Supports visualization through tools like PromDash (integrated graphing/dashboarding).
  5. Overview of DevOps Exercises repository

    master

    The devops-exercises repository is a collection of over 2,600 technical questions and exercises designed to help developers prepare for technical interviews and learn concepts related to DevOps and Site Reliability Engineering (SRE).

    Key Information:

    • Purpose: Interview preparation and conceptual learning.
    • Scope: Covers a vast range of topics including DevOps, Git, Kubernetes, Cloud (AWS, Azure, GCP), Linux, Networking, Databases, CI/CD, Observability, and more.
    • Disclaimer: While useful for interview prep, the exercises may not always represent actual interview questions. Learning all topics mentioned is not a requirement for a DevOps career.
    • Contributions: Users can add new exercises by submitting pull requests following the contribution guidelines.
  6. Git Exercises Overview

    master

    This section provides a collection of hands-on Git exercises designed to build proficiency in version control. Exercises are categorized by topic (e.g., Commit, Branch) and include specific objectives, instructions, and corresponding solutions to verify your work.

    Available exercises in this segment include:

    • My first Commit: Focuses on basic commit operations.
    • Time to Branch: Focuses on branch creation and management.
    • Squashing Commits: Focuses on cleaning up commit history.
    | Name | Topic | Objective & Instructions | Solution |
    | ----------------- | ------ | -------------------------------- | ------------------------------------------- |
    | My first Commit | Commit | [Exercise](commit_01.md) | [Solution](solutions/commit_01_solution.md) |
    | Time to Branch | Branch | [Exercise](branch_01.md) | [Solution](solutions/branch_01_solution.md) |
    | Squashing Commits | Commit | [Exercise](squashing_commits.md) | [Solution](solutions/squashing_commits.md) |
  7. Practice Kubernetes with exercises and questions

    master

    This repository provides two main ways to learn Kubernetes:

    1. Practical Exercises: Hands-on tasks covering core concepts like Pods, Services, ReplicaSets, Labels, Selectors, Schedulers, and Kustomize.
    2. Theoretical and Practical Questions: A comprehensive list of questions covering topics from Kubernetes 101 to advanced subjects like Istio, Operators, and Security.
  8. AWS Service Quick Reference

    master

    A summary of common AWS services and their primary use cases for quick identification:

    • Data & Analytics:
      • AWS Athena: Run SQL queries interactively on S3.
      • AWS Glue: Prepare and combine data for analytics or ML.
      • Kinesis: Data or events streaming.
      • ElastiCache: Low-latency access to frequently used data.
    • Security & Compliance:
      • Amazon GuardDuty: Monitor malicious activity and unauthorized behavior.
      • AWS WAF: Web application protection.
      • AWS Inspector: Security assessment.
      • AWS Shield: Managed DDoS protection.
      • AWS Organizations: Centralized billing, access control, and security across multiple accounts.
      • AWS Cognito: Add access control (sign-up/sign-in) to web/mobile apps.
    • Storage & Messaging:
      • Amazon S3 Transfer Acceleration: Transfer files over long distances to S3.
      • Storage Gateway: On-premises storage access to AWS storage.
      • Simple Queue Service (SQS): Decouple applications via messaging queues.
    • Compute & Networking:
      • Lambda: Serverless functions.
      • API Gateway: Define URL triggers for functions (e.g., Lambda).
      • Route 53: DNS web service.
      • CloudWatch: Resource monitoring.
      • Amazon DocumentDB: Fully managed document database.
  9. Benefits of using CircleCI

    master

    CircleCI provides several features to optimize DevOps workflows:

    • Debugging: SSH into any job to debug build issues.
    • Speed: Set up parallelism in your .circleci/config.yml to run jobs faster.
    • Caching: Use two simple keys to reuse data from previous jobs.
    • Extensibility: Use Orbs (reusable configuration packages) to integrate with third-party services.
    • Custom Infrastructure: Configure self-hosted runners or access Arm resources for the machine executor.
    • Tooling: Use the API to retrieve job/workflow information and the CLI for advanced local tools.
    • Observability: Access test insights for flaky test detection.
    • Pre-built Environments: Use pre-built Docker images for various languages.
  10. Shell Scripting Exercises Overview

    master

    This repository provides a structured list of shell scripting exercises categorized by topic and difficulty. You can use these to practice specific skills like variables, arithmetic, loops, and conditionals.

    Available Exercises

    NameTopicObjective
    Hello WorldVariablesBasic
    Basic dateVariablesBasic
    Great DayVariablesBasic
    FactorsArithmeticBasic
    Argument CheckConditionalsBasic
    Files SizeFor LoopsBasic
    Count CharsInput + While LoopsBasic
    SumFunctionsBasic
    Number of ArgumentsCase StatementBasic
    Empty FilesMiscBasic
    Directories ComparisonMiscBasic
    It's alive!MiscIntermediate
  11. Explore Container Exercises

    master

    This repository provides a structured set of exercises to learn container technology, categorized by topic and difficulty. Exercises are divided into three main areas:

    Running Containers

    Focuses on the basics of container execution, including:

    • Basic container operations
    • Containerizing web servers
    • Containerizing databases
    • Implementing persistent storage for databases

    Images

    Focuses on image management and creation, including:

    • Working with existing images
    • Sharing images without a registry
    • Creating images using commit commands
    • Writing and running Containerfiles

    Misc

    Advanced topics and best practices, including:

    • Restart policies
    • Understanding image layers
    • Containerizing applications
    • Implementing multi-stage builds
  12. Kubernetes: Core Concepts and Tools

    master

    The following concepts are fundamental to working with Kubernetes:

    • kubectl: The command-line tool used to interact with Kubernetes clusters.
    • kubconfig: The configuration file used to manage access and authentication to Kubernetes clusters.
    • Users: Managing user creation and understanding where user information is stored within the cluster.