Chef Jenkins DevOps Pipeline

Pipeline Workflow:

Github-Chef-Jenkins-Artifactory-Docker

Summary

This 3-day class will enable DevOps teams to master a truly practical and useful End-to-End DevOps Pipeline to create, test and deploy Chef, Java and Docker code through Continuous Integration / Continuous Deployment using Jenkins. This instructor-led, hands-on technical class will give DevOps Engineers, System Operations and Code Developers the ability to:

  • Automate an entire End-To-End CI/CD (Continuous Integration/Continuous Deployment) Pipeline using Github, Chef, Jenkins & Docker
  • Maintain code using Git and Github
  • Create, test and deploy Chef cookbooks through a Jenkins CI/CD pipeline, including Unit Testing with ChefSpec, and Integration Testing with Inspec and Test Kitchen
  • Compile, test, package and permanently store Java applications using Maven
  • Create, store and run Docker images and containers
  • Store artifacts in JFrog Artifactory
  • Send notifications automatically to update your team about a pipeline’s status with Slack and SMTP Email

Description

This three-day course is offered as a virtual class over Zoom or on-site at your location

Topics covered:

  • Course Introduction
    • Github-Chef-Jenkins-Docker: A DevOps Pipeline
    • Course Purpose
    • Agenda
    • Introductions
    • Lab Environments
  • Technology Overview
    • Git – Source Control Management
    • Chef – Configuration Management
    • ChefSpec and Inspec – Cookbook Testing
    • Jenkins – Continuous Integration
    • Docker – Containerization
    • An End-To-End CI/CD (Continuous Integration/Continuous Deployment) Pipeline
  • Git
    • Purpose and overview of Git
    • Use cases for Git
    • Git flow
    • Quick look at Github
    • Other Git providers
    • Installation and configuration
    • Finding help on Git
    • Creating Local Git Repositories
    • Basic Commands – add, commit, status, log
    • Comparing commits: git diff
    • Using a Repository – git push
    • Branching and Merging
    • Using SSH keys with Git private repositories
  • Chef
    • Chef Architecture and call flow
    • Chef use cases
    • Resources
      • Resource overview
      • Structure of a resource
      • Idempotence
      • Example resources
    • Recipes
      • Recipe overview
      • Creating an Apache recipe
      • Converging with chef-client
    • Cookbooks
      • Cookbook overview
      • Creating cookbooks – the chef generate command
      • Key cookbook directories and files
      • Chef-client – converging a chef-managed node
      • Include_recipe, guards, notifications
    • Chef Policyfiles
    • Windows resources
    • Writing an IIS cookbook
    • Unit Testing
      • Unit test purpose and overview
      • ChefSpec structure
      • View available tests
      • Writing unit tests for Apache and IIS cookbooks
    • Integration Testing
      • Integration test purpose and overview
      • Test Kitchen overview
        • Create, Converge, Verify, Destroy, Test
        • Managing the .kitchen.yml file
        • View available tests
      • Writing integration tests for Apache and IIS cookbooks
    • Chef Server
      • Purpose and call flow
      • Create a user and an organization on Chef Server (manage.chef.io)
      • Downloading a Chef starter kit
      • Using a local Chef repository
    • Uploading cookbooks to Chef Server
    • Bootstrapping Linux and Windows Chef-managed nodes
    • Ohai, Attributes and the Node Object
    • Attribute precedence
  • Jenkins
    • Jenkins Overview, Use Cases and History
    • Plugin Architecture
      • Key plugins
    • Initializing a Jenkins server
    • Projects / Jobs
    • Freestyle Jobs
    • Writing a Declarative Pipeline Project – CI/CD as Code
    • Distributing builds using Master and Agent Nodes
    • Views and Folders
    • Managing Credentials
    • Integrating with Git – Source Control Management
    • Triggers: Webhooks and Polling
    • Storing artifacts – JFrog Artifactory
    • Notifications: Slack and SMTP Email
    • Testing Chef Cookbooks with Test Kitchen in Jenkins
    • Multibranch Pipelines – reading entire repositories
    • Using Variables in Declarative code
    • Implementing Conditional Logic
    • Using Maven to Compile, Test, Package Java Applications
    • Storing artifacts in JFrog Artifactory
    • Deploying Chef cookbooks with Jenkins
      • Using credentials from the Chef Starter Kit
      • Uploading cookbooks to Chef Server
      • Initiating Chef-managed node convergence from Jenkins
  • Docker
    • Container Use cases: what problems Docker solves
    • Docker Concepts
      • Containers
      • Images
      • Dockerfiles
      • Repositories
    • Common Docker Commands
    • Storing Docker images in AWS ECR
    • Docker Compose
      • Launching microservices using Docker
    • Building a Docker Image using Jenkins
      • Build the image
      • Store the image
      • Run the image on an Agent
    • Deploying a Docker container using Chef
  • Finally, we’ll put everything together into a complete End-To-End Pipeline
    • Write a Chef cookbook
    • Write Inspec tests for our cookbook
    • Push the cookbook to a branch within a Git repo
    • Configure Github and Jenkins so that upon receiving the cookbook, Github will automatically trigger Jenkins to download the cookbook, using a multibranch-pipeline type project
    • Jenkins will automatically initiate testing the cookbook using Test Kitchen
    • If the cookbook passes its tests, merge the cookbook from a feature-branch to the master branch.
    • If anything fails, Jenkins will send notifications to the class participant who wrote the code so it can be fixed and tested again
    • Once everything passes all tests, Jenkins will ask permission to continue, requiring human intervention.  Upon human approval, Jenkins will upload the cookbook to the Chef Server, and create a Docker container image to store in AWS ECR (Elastic Container Registry).
    • Jenkins will automatically trigger the Chef managed webservers, running on Linux and Windows nodes in AWS, to converge, download the cookbooks from the Chef Server and deploy the Docker container
    • Jenkins will send notifications over email regarding failures or the successful deployment of the cookbook

Student Requirements:

  • You need familiarity and comfort with the following:
  • Writing code (of just about any flavor) in a text editor
  • Working on the command line
  • An understanding of basic system administration tasks – installing packages, configuring those packages & starting a service

Duration

3 Days