Course Taxonomy: DevOps

Ansible Configuration Management Boot Camp

Part 1: Introduction

  1. Why configuration management is a critical part of any DevOps team
  2. Strengths and weaknesses of Ansible
  3. Web-scale
    1. How Ansible is different from other CM tools like Chef and Puppet
    2. Getting started with Ansible terminology
    3. Ansible and YML for describing your environments

Part 2: Getting set up

  1. Some prerequisites
  2. Getting set up on a Mac
  3. Getting set up on Linux
  4. Getting set up on Windows
  5. Testing with Vagrant
  6. Using SSH keys to connect to your target nodes
  7. Hands-on Practice Lab: Install Ansible and test connectivity to your test nodes.

Part 3: Inventory

  1. Basic inventory example
  2. Hosts and groups
  3. Hands-on Practice Lab: Create an inventory file that defines four hosts, two web servers and two database servers, and assign these hosts to groups that describe their function.

Part 4: Ansible Playbooks

  1. A useful directory structure to keep your Ansible code organized
  2. Using git to manage your Ansible code
  3. A first look at a playbook to install and configure NTP time synchronization
  4. Hands-on Practice Lab: Create a playbook to install and configure OpenSSH-server on all nodes and make sure it is running.

Part 5: Provisioners

  1. Connecting Ansible to your preferred cloud provider (we'll use DigitalOcean)
  2. Creating a new server instance
  3. Dynamic inventory
  4. Dynamic inventory on Amazon AWS
  5. Mixing static and dynamic inventory
  6. Hands-on Practice Lab: Refactor your inventory so that your staging environment is local using Vagrant, and your production environment is built on DigitalOcean.

Part 6: Highly available infrastructure with Ansible

  1. Spec up our inventory and host groups
  2. Using roles
  3. Configure our database backend
  4. Configure our web server front-end
  5. Configure a replicated filesystem
  6. Configure centralized logging
  7. Hands-on Practice Lab: Build the sample infrastructure on your local Vagrant environment.

Part 7: Application deployments with Ansible

  1. Deploying our app from SCM to our local Vagrant environment
  2. How we would deploy that code to production once tested by QA
  3. Updating our application
  4. How Ansible compares to alternatives such as Capistrano
  5. Hands-on Practice Lab: Proceed with deploying our application on your local Vagrant environment.

Part 8: Docker containers with Ansible

  1. A brief intro to Docker
  2. The synergy of containerization and automation
  3. Using Ansible to build Docker containers
  4. MySQL containers
  5. Web application containers
  6. Data storage containers
  7. Hands-on Practice Lab: Adapt your infrastructure to deploy our sample app using Docker.

Part 9: Testing and continuous integration

  1. Unit, integration, and functional testing
  2. Automating your testing using GitHub and Travis CI
  3. Hands-on Practice Lab: Create some tests for our SSH playbook to make sure there are no syntax errors and that Ansible is configuring nodes as expected.

Part 10: Preparing for Ansible back at work

  1. Real-world use case: Using Ansible to automate CM and application pipelines through continuous integration, release, deployment, and operations
  2. We'll review your own environments and processes and evaluate how to best integrate Ansible's configuration management for your own needs
  3. Exercise: Your to-do list

Test-Driven Development with Java

Part 1: Agile Overview

Test Driven Development is a key component of the Agile Software Development Methodology and of the overall DevOps movement. So it is helpful to have at a minimum a high-level understanding of Agile practices and scrum ceremonies and TDD fits into the overall Agile, Scrum and DevOps landscape. Part 1 serves as a leveling exercise to ensure that team member is speaking the same language during upcoming labs and discussions.

  1. What is Agile Software Development
    • DevOps Overview
    • The Agile Manifesto
    • Scrum vs Agile
  2. Components of Agile
    • User Stories
    • Tasks
    • Bugs
    • Automated Builds
    • Automated Tests
    • Continuous Inspection
  3. The Role of TDD in Agile Development
    • Automated Unit Tests
    • Automated Acceptance Tests

Lab: Explore the Board of an Agile Project

  • Kanban Board
  • User Stories
  • Tasks
  • Bugs
  • Work in Progress
  • Burndown Chart

Part 2: Unit Testing

Unit Testing is a critical component of Test Driven Development (TDD). Small units of code are tested throughout the development process, which isolates functionality to ensure that individual parts work correctly.

  1. Unit Test Fundamentals
    • Reason to do Unit Testing
    • What to Test: Right BICEP
    • CORRECT Boundary Conditions
    • Properties of Good Tests
  2. Frameworks
    • What is JUnit
    • JUnit Building Blocks
    • Test Cases
    • Test Suites
    • Examples
  3. Agile Testing Strategy
    • Agile Testing Quadrant
    • Automation Pyramid
    • Assertions
  4. Test Attributes
    • Setup / TearDown
    • JUnit Lifecycle
    • System Under Test
    • Test Design Strategy
    • Naming our Tests
    • Exceptions

Lab: Introduction to Unit Testing

  • IDE and Project Setup
  • Running our first Unit Test
  • Explore Junit framework
  • Test Attributes
  • Assert Statements

Part 3: Test Driven Development

Essential TDD techniques require developers write programs in short development cycles, and there are critical steps that must be taken. Tests are created before the code is written. Once the code passes testing, it is refactored to adhere to the most effective and acceptable standards.

  1. TDD Rhythm
    • TDD Overview
    • Red, Green, Refactor
    • TDD Benefits
  2. Sustainable TDD
    • Development without TD
    • Test Last
    • Test Last in Parallel
    • Test Driven Development
  3. Supporting Practices
    • Collective Ownership
    • Continuous Integration
  4. Eight Wastes of Software Development
    • Ripple effect of defects
    • Partially Done Work
    • Extra Features
    • Relearning
    • Handoffs
    • Task Switching
    • Delays
    • Defects
  5. Test Automation
    • Automate, Automate, Automate
    • Automate Early and Often
    • Additional Topics Identified

Lab: Test Driven Development

  • Start Test Driven Development on our example App
  • Write unit test cases
  • Experience RED, Green, Refactor Process

Part 4: Principles of Agile Development

TDD is directly influenced by design, so it will be a priority to take this into context during implementation. Considering design principles will enable teams to experiment with different approaches, and gear towards more functional programming.

  1. Design Principles Overview
  2. Coding Principles
  3. isolation of the SUT
  4. Developing independently testable units
  5. Test doubles
    • Introducing test doubles
    • Stubs
    • Fakes
    • Mocks

Lab: Continue development on example App

  • Setting up Test doubles for our example app
  • Discuss and implement test dummy and test stubs

Part 5: Refactoring

Refactoring is another essential technique of TDD, and most software development teams are most likely doing some form of refactoring regularly. Refactoring can be used in a number of different workflows which will be explored in this Part.

  1. Why Refactor?
    • Red, Green, Refactor
    • Benefits
    • Development without TDD
  2. Refactoring Methods
  3. Refactoring Cycle
    • Reduce Local Variable Scope
    • Replace Temp with Query
    • Remove Dead Code
    • Extract Method
    • Remove Unnecessary Code

Lab: Continue our example project

  • Implement new test cases
  • TDD Cycle
  • Discuss and implement Refactoring Needs

Part 6: Pair Programming

Pair Programming is an effective way to improve code quality. In this Part, we will discuss pairing and how it leads to better software design, and a lower cost of development.

  1. Pair Programming
    • Pairing Setup
    • Results: Time
    • Results: Defects
    • How it works
  2. Advantages of Pairing
    • Both Halves of the Brain
    • Focus
    • Reduce Interruptions
    • Reduce Resource Constraints
    • Multiple Monitors
    • Challenges
  3. Pairing Techniques
    • Pair Rotation
    • Ping Pong Pairing
    • Promiscuous Pairs
    • Pair Stairs
    • Cross-Functional Pairing

Lab- Experience pair programming and continue developing our example app

Part 7: Acceptance Test Driven Development (ATDD) & Behavior-Driven Development (BDD)

Acceptance Tests are an important form of functional specification, and Behavior Driven Development dictates what happens as an effect of these tests being run. In this Part, we will cover the difference between them, and how they are closely related.

  1. Acceptance Testing
    • Acceptance Tests
    • Why Acceptance Tests?
    • Acceptance Test Execution
    • Who Writes Acceptance Tests
    • Pair Test Writing
  2. Best Practices for Effective Testing
    • Keys to Good Acceptance Tests
    • Writing Acceptance Criteria
    • Acceptance Test Example
    • Acceptance Test-Driven Development (ATDD)
  3. BDD vs. ATDD
    • Specification by Example
    • BDD Frameworks
    • BDD Examples

Lab: Experience ATDD and BDD

  • Experience ATDD or BDD and discuss the impact to TDD

Part 8: Advanced TDD

In order to implement Unit Tests efficiently, it is critical that developers understand their properties.

Lab: Demonstration for Mocking/doubles with our example App

  1. TDD Solutions
    • Continuous Unit Testing
    • Collective Ownership
  2. Advanced Unit Testing
    • Unit Testing Legacy Applications
    • Techniques for Legacy Code
    • External Dependencies
    • Mocking frameworks
    • Unit Testing the Database
  3. Outside In vs Inside Out
    • Working with database
    • Working with mocking frameworks
  4. Test Strategy
    • Continues Integration
    • Batch Execution of TestCases
  5. Unit Test Examples
    • More Tests
    • Algorithm
  6. Advanced Refactoring

Lab: Demonstration for Mocking/doubles with our example App

  • Working with database
  • Working with mocking frameworks

Part 9: Simulation

Experience Agile development with test driven development and pair programming

Test Automation Boot Camp (ICP-ATA)

Part 1: Introducing Test Automation

  1. Watch an Automated Test
  2. Requirements
    1. Exercise: Identify different requirement types
    2. Exercise: Make requirements testable
  3. Testing Types
    1. Black-box vs. white-box
    2. System testing vs. integration testing vs. unit testing vs. acceptance testing
  4. Application Types
    1. Process-driven or data-driven: no "one size fits all"
    2. Exercise: Define different kinds of tests for different application types
  5. The Alphabet Soup of Tools and Methods
    1. Selenium. Gherkin. Cucumber. HPQC. Jira—you hear all of these. What do they mean? How do they fit together? Which do you need and which can you safely ignore?
    2. Exercise: Testing facts and fallacies

Part 2: Preparing for Test Automation

  1. Effective Partitioning Schemes
    1. Exercise: Structure a system into processes (actor goals), activities, actions
  2. Use Cases and Test Cases
    1. Exercise: Create a test case for a single activity from a written use case (happy path)
  3. Behavior-Driven Languages
    1. Exercise: Write a test case as a Gherkin scenario
  4. Modeling and Diagramming Techniques
    1. Exercise: Construct a UI navigation map for normal and alternate flows
  5. Equivalence Partitioning and Boundary Value Analysis
    1. Exercise: Define input value choices and use TAME to construct test alternatives

Part 3: Recording Automated Tests

  1. Automated Test Steps:
    1. Pre-checks, Inputs, Events, and Post-Checks
    2. Exercise: Write the steps of an automated test
  2. Record and playback a single test
    1. Exercise: Record and play back a test in Selenium WebDriver

Part 4: Dissecting Automated Tests

  1. Recorded Test Steps
    1. Exercise: Examine recorded steps in Selenium
  2. UI Element Repositories
    1. Exercise: Examine the components of a UI page
    2. Exercise: Create path expressions to locate page elements

Part 5: Assembling Automated Tests from Modules

  1. Test Suites, Test Cases, and Modules
    1. Exercise: Partition a recorded test into reusable modules
  2. Modular Test Development
    1. Exercise: Construct test cases from existing modules
    2. Exercise: Construct new modules for alternate behaviors

Part 6: Coding Automated Tests

  1. Code always, Code sometimes, or Code never
  2. The Skills Pyramid
  3. Open-source and commercial tools
    1. Exercise: Compare tools and team capabilities

Part 7: Exploiting Automated Testing

  1. Test-driven development: test cases as specifications
  2. Data-driven tests
    1. Exercise: Define data tables for equivalence partitions and boundary value analysis
  3. Multi-platform and cross-browser testing
    1. Exercise: Run test cases on multiple web browsers

Part 8: Enabling Continuous Integration with Test Automation

  1. Regression test suites
  2. Development events trigger test runs
  3. Configure test subsets
    1. Exercise: Define a minimal "smoke test" and contrast with a full regression suite
  4. Report test results
    1. Exercise: Design a dashboard for quick reporting of test results

Part 9: Course Summary

  1. Quiz: Testing facts and fallacies
  2. Exercise: Plan your own test automation strategy

Git & GitHub Boot Camp

Part 1: Git – Basic and Advanced Commands

1. Getting started with Git & GitHub

  • Why Git?
  • Installing Git on Windows
  • Installing Git on Mac
  • Installing Git on Linux
  • Signing up to GitHub
  • HTTPS
  • SSH
  • Understanding Git

2. Basic Git Commands

  • Configuration
  • Initializing a repository
  • Adding commits
  • Adding a remote
  • Pushing to the remote
  • Fetching from the remote
  • Pulling from the remote
  • Creating a branch
  • Merging
  • Cloning
  • Reset
  • Revert

3. Advanced Git Commands

  • Amending commits
  • Rebasing
  • Interactive rebasing
  • Cherry-picking
  • Bisect
  • Aliases
  • Hooks
    • Git hooks allow you to run scripts before or after certain Git actions (e.g., modify the commit message prior to committing).

Part 2: GitHub – Team and Enterprise Applications

1. Getting started with GitHub

  • Two-factor authentication
  • Searching GitHub
  • Starring repositories
  • Following people
  • Watching repositories
  • Commit email addresses
  • Notifications

2. Options for teams

  • Organization accounts
    • Organization accounts allow you to combine multiple GitHub users into an organization. A single GitHub user can be a member of several organizations. A repository can also be owned by an organization instead of a single user.
  • Teams
    • Organization accounts allow you to combine multiple GitHub users into an organization. A single GitHub user can be a member of several organizations. A repository can also be owned by an organization instead of a single user.
  • Paid plans
    • GitHub offers a lot of functionality for free. But companies often need more. The paid plans allow things like private repositories, fine-grained access control, extra support, etc.

3. Working in teams

  • GitHub Flow
    • GitHub Flow is an easy branching strategy. It starts from a master branch and creates only feature branches from there. The feature branches only get merged into the master branch when approved and ready for release. This allows a team to have a rapid cadence of releases, but it also creates some requirements that need to be addressed. For example, you will need a good CI/CD pipeline, a business that accepts rapid releases, possibly a good feature toggle system, etc.
  • Git Flow
    • GitFlow is a more complex branching strategy but allows for a more secure development and deployment pace. It's often more fit for larger enterprises. Luckily, there are CLI plugins and GUI tools that support GitFlow and make it easy to work with. This way, developers don't have to remember the specific commands and branching flows.
  • Documentation
  • Issues
  • Projects
    • GitHub projects give teams a Kanban board to organize and visualize their work. It's a step up from GitHub Issues.
  • Releases
    • Git allows developers to create tags in their repositories. In GitHub, you can easily link these tags to "Releases." A release can contain release notes, providing a nice overview of what changed over time.

Introduction to Kubernetes

Part 1: Prerequisites – Kubernetes Foundations

  1. Containers
  2. Linux Kernel Features
  3. Container User Experience
  4. New Container Capabilities
  5. Gaps using Containers in Production
  6. Microservices
  7. DevOps

Part 2: Core Concepts of Kubernetes

  1. Cluster Orchestration
  2. Looking at K8S Origination at Google
  3. Open Source
  4. Benefits
  5. Design Principles

Part 3: Navigating Kubernetes Architecture

  1. Master/Node
  2. Kubectl
  3. Replication Controller
  4. Kubelet
  5. Kube-Proxy
  6. Persistent Volumes
  7. Etcd
  8. High Availability

Part 4: Using Kubernetes Features

  1. Pods
  2. Labels
  3. Services
  4. Namespaces
  5. Resource Quota

Part 5: Security and Kubernetes

  1. Goals
  2. Roles
  3. Attribute-Based Access Control
  4. Policies
  5. Service Accounts
  6. Secrets

Part 6: Networking and Kubernetes

  1. Docker Networking
  2. Kubernetes Networking
  3. Pod to Pod
  4. Exposing Services
  5. IP Per Pod
  6. Inter Pod Communication
  7. Intra Pod Communication

Part 7: Cluster Add-ons

  1. Cluster DNS
  2. Logging with Elasticsearch and Fluentd
  3. Container Level Monitoring
  4. cAdvisor
  5. InfluxDB
  6. Prometheus

Part 8: Practical Kubernetes Examples

  1. Hello World
  2. WordPress         
  3. Guestbook
  4. 3 Tier App
  5. Http/Https Load Balancing

Part 9: Continuous Integration with Kubernetes

  1. Canary Release
  2. Blue Green Deployment
  3. A/B Testing
  4. Rolling Update
  5. Jenkins Plugin

Part 10: Roadmap/Beta

  1. Ingress
  2. Deployments
  3. Autoscaling
  4. Jobs
  5. DaemonSets
  6. Network Plugins
  7. DNS

Part 11: Class conclusion – Implementation, Q and A, Next Steps

  1. Discussion: What can you apply?
  2. How can Kubernetes help your situation
  3. Expert Q and A

Microservices Engineering Boot Camp

Part 1: Intro to Microservices

  1. Optimize for speed, not efficiency
  2. Case Study: General Electric
    1. Throughput
    2. Waste
  3. Amazon Web Services Case Study (SOA/Microservices)
    1. Problem: Scaling the Organization and the ‘Big ball of mud’
    2. Conway’s Law
    3. Service Oriented Architecture
    4. Forced Self Service Mandate
    5. Result: Amazon dominance of cloud
    6. Result: High velocity at scale
  4. Intro to Containers (encapsulation)
    1. What is Docker
    2. Exercise: Install Docker
    3. Exercise: Docker Hello World
    4. Docker ecosystem
    5. Docker concepts
    6. Container encapsulation/ideal use cases
      1. Encapsulation
      2. Speed
      3. Increased utilization of computing resources
    7. Benefits
      1. Configure once, run everywhere
    8. VM’s vs Container use cases
      1. Databases & stateless workloads
    9. Docker Architecture
    10. Exercise: Docker 101 – Web App
    11. Docker File System
    12. Docker Images
    13. Exercise: Stateless Web App
    14. Local Registry
    15. Data Volumes
    16. Exercise: Docker 201 – Compose Multi-tier app
    17. Continuous integration patterns
    18. Docker Security
    19. Continuous Integration
      1. Canary Release
      2. Blue Green Deployment
      3. A/B Testing
      4. Rolling Update
      5. Jenkins Plugin
  5. Microservice challenge: Continuous Integration Service
    1. On-Premise
      1. Jenkins
    2. SaaS Service
      1. Shippable
      2. Jenkins
      3. TravisCI
    3. Exercise: Trigger build/tests from change

Part 2: Microservices in Development

  1. Uber Case Study
    1. 2000 services, 1000 engineers
    2. Tradeoffs
      1. Plus – overall development speed
      2. Cons – technical challenges
  2. Box Case Study
    1. Traditional service deployment with bare metal
    2. 10x faster workflow with DevOps practices
  3. Microservice challenge: Image repository
    1. Docker repository development instance
    2. On-Premise Service
      1. Quay by CoreOS
    3. SaaS solution
      1. Docker Hub
      2. JFrog
    4. Exercise: Submit image to service
    5. Exercise: Pull image from service
  4. Intro to Kubernetes (Containers at Google)
    1. Prerequisites
    2. Containers
    3. Linux Kernel Features
    4. Container User Experience
    5. New Container Capabilities
    6. Gaps using Containers in Production
  5. Exercise: Kubernetes 100: Hello World
  6. Core Concepts
    1. Cluster Orchestration
    2. Originated at Google
    3. Open Source
    4. Benefits
    5. Design Principles
  7. Architecture
    1. Master/Node
    2. Kubectl
    3. Replication Controller
    4. Kubelet
    5. Kube-Proxy
    6. Persistent Volumes
    7. Etcd
    8. High Availability
    9. Exercise: Kubernetes 101: Stateless web app
  8. Kubernetes Features
    1. Pods
    2. Labels
    3. Services
    4. Namespaces
    5. Resource Quota
  9. Exercise: Kubernetes 201: Guestbook app

Part 3: Microservices in Production

  1. Spotify Case Study
    1. 810 Services, 477 engineers
  2. Microservice challenge: Service discovery
    1. Skydns
    2. Consul
  3. Exercise: Resolve service with DNS
  4. Security
    1. Goals
    2. Roles
    3. Attribute Based Access Control
    4. Policies
    5. Service Accounts
    6. Secrets
  5. Forth Microservice challenge: Secrets
    1. Vault
    2. Kubernetes Secrets API
  6. Exercise: Kubernetes – Store database credentials in cluster
  7. Cluster Add-ons
    1. Cluster DNS
    2. Logging with Elasticsearch and Fluentd
    3. Container Level Monitoring
    4. cAdvisor
    5. InfluxDB
    6. Prometheus
  8. Exercise: WordPress on Kubernetes
  9. Managing state with disposable architectures
    1. Tradeoffs, standalone vs containerized databases
    2. CAP Theorem
    3. SQL Databases
    4. NOSQL Databases
  10. Exercise: Cassandra on Kubernetes
  11. Practicing Failure
    1. Optimize MTTR
  12. Netflix Case Study
    1. Simian Army
    2. Graceful handling of failure

Part 4: Putting it all together

  1. Why Microservices?
    1. Scale an organization
    2. Tradeoffs
    3. Fault Tolerance
    4. Throughput
    5. Waste
  2. Kubernetes Alpha Features
    1. Multi-Datacenter Control Plane
    2. RBAC/Multi-tenancy
  3. Openshift/Mesos/Other PaaS platforms
  4. Exercise: Customize Microservice App
  5. Exercise: Scale app for simulated demand
  6. Review of Microservice Challenges
    1. Secure Images
    2. Highly available application
    3. Secrets
    4. Continuous Integration
    5. DNS Name resolution
  7. Summary