Module 2: Basics - DevOps Core
Module Overview
- Learn Python fundamentals, common development tools, and Git basics.
- Gain Linux essentials, common tools, and bash scripting skills.
- Cover Docker and containers fundamentals.
- Implement the progressive hands-on project, HiveBox phase 2.
- Focus areas: Code (40%), Operating System (40%), Containers (20%).
2.1 Code - Python Fundamentals
tip
If you come from a development background, you can use any language you know. Python or Golang are still recommended.
Audience
What you need to know
- As a start, you need to learn a real programming langauge.
- Python is a good start, and it's one of the most popular programming languages nowadays.
- Learn the basics like data types, control flow, loops, and functions.
- Yet, the idea is not just learning the syntax but also adapting the developer mindset (i.e., don't write Python code like you write your Bash scripts!).
- More advanced topics will be covered in the next modules.
Resources
- Learn Python - Codecademy: Interactive learning step by step to acquire the essential Python knowledge (the course is for Python 2, but it's fine).
- Python Track - Exercism: More than 130 exercises grouped into 16 Python concepts with code analysis (finish only the
Learning Exercise
).
2.2 Code - Common Development Tools
Audience
What you need to know
- When you are writing code, you don't just use a text editor but code editor (maybe also IDE).
- Development tools enhance productivity, streamline the development process, increase code quality.
- Common features of development tools are syntax highlighting, code completion, code navigation, and debugging.
- Through this roadmap, you will get more tools to help you in your daily work.
Resources
- Visual Studio Code: The main code editor will be used in this roadmap.
- Getting Started with Python in VS Code: How to use VS Code as a development tool for Python.
- Python extension for Visual Studio Code: VS Code extension that provide essential features for Python like auto-completion, syntax checking, etc.
2.3 Code - Git Basics
Audience
What you need to know
- When you create the code, you need to store it in a safe place using a Source Code Management (SCM) system.
- One of the known SCMs is Git, which's widely used now via many platforms like GitHub and GitLab.
- You need to understand the Git basics like repository, branch, pull, push, commit, and so on because you will use them almost every day.
- Understanding Git is not important just for development, but also many workflows depend on it as a Source of Truth like
GitOps
(that will be covered in the next modules).
Resources
- Git, The simple guide: Step-by-step visual guide for getting started with Git.
- Git cheat sheet: Quick reference for Git commands.
- Getting Git right - Atlassian: Detailed guide to Git with many tutorials and tips.
2.4 Operating System - Linux Fundamentals
Audience
What you need to know
- In the servers world, Linux dominates the market. So it's necessary to learn and use Linux OS as a DevOps Engineer.
- As a DevOps engineer, it's less likely to make it without good knowledge on Linux.
- Linux mainly has two family groups: Debian/Ubuntu and Red Hat/CentOS, it's better to stick to one of them at the beginning.
- Start using a user-friendly Linux distribution like Ubuntu on your laptop/desktop.
- Even it's still possible as a user to do a lot using the UI, but
The Terminal Is Your Friend
! - As a starting point, you need at least to know
Directory Structure
,Permissions
, andCommand Line Operations
.
Resources
- Introduction to Linux - LinuxFoundationX: A good starting point to get familiar with Linux OS (this course was promoted by Linus Torvalds, the founder of the Linux kernel).
- Introduction to Linux - Chapters 1-6 - freeCodeCamp: A great resource to learn all Linux fundamentals.
2.5 Operating System - Common Tools and Commands
Audience
What you need to know
- As mentioned, the terminal is your friend! The power of Linux is in the Terminal and you need to be used to it be because you will use it on a daily basis.
- Get familiar with the GUI tool of the system you have, like Ubuntu.
- There are a couple of tools you need to master them like
echo
,vim
,grep
,find
,top
,cut
,sort
,uniq
,less
,head
, andtail
. - You don't need to memorize all tools or their args, just think "what tool could help me to do that?" then you can always read its documentation.
Resources
- Introduction to Linux - Chapter 7 - freeCodeCamp: This chapter focuses on the command line operations and the most common tools.
- Top 50+ Linux Commands You MUST Know - DigitalOcean: Top Linux commands that everyone should know (but not memorize!).
- 20 Linux commands every sysadmin should know - Opensource.com: Another post about handy CLI tools.
2.6 Operating System - Bash Scripting Basics
Audience
What you need to know
- Now you know a dozen of individual CLI commands, but Linux allows you to automate many tasks by simply chaining a series of commands together.
- In shell scripts you can use all CLI commands plus a syntax similar to a programming language for if conditions, loops, and other helpers.
- Even you know some programming language like Python, you still will need and use shell scripts frequently.
- There are many shells and each one slightly different syntax, but
Bash
is one of the most popular ones.
Resources
- Bash Track - Exercism: More than 90 exercises in different levels (finish only the easy and medium tasks).
- Bash Scripting Tutorial – Linux Shell Script and Command Line for Beginners - freeCodeCamp: Pretty good and structured guide to start with Bash scripting.
- How to Write a Bash Script - A Simple Bash Scripting Tutorial - DataCamp: A simple getting started guide with integrated AI to explain the code.
2.7 Containers - Docker Fundamentals
Audience
What you need to know
- The container revolution can be traced back to the introduction of Docker in 2013 when Docker debuted for the first time at PyCon.
- Container adoption has been mainstream for a whole now, in fact, containers are the new norm!
- That means, containerizing your application is not an option, it's a must from day one!
- First, you need to understand why containers have been invented and what are the problems that technology solves.
- You also need to understand the relation between containers and Kubernetes (which will be covered in the next modules).
- Docker is not the only tool for containers nowadays, but we will stick with it in this roadmap.
- It's important to understand the difference between Dockerfile, Docker image, and Docker container.
Resources
- Get started guide - Docker Docs: The official getting started guide for Docker.
- Learn Docker in 2 Hours - KodeKloud: A crash course covers a full overview of all the Docker fundamentals.
2.8 Containers - Docker CLI Basics
Audience
What you need to know
- There are a couple of GUIs for Docker, but you are a DevOps engineer, get yourself familiar with the Docker CLI!
- You needed to know how to create, run, stop, and delete Docker containers from the CLI.
- We are not going to cover Docker Compose in this roadmap because Kubernetes will be our focus as an orchestration platform. However, if you needed to use Docker Compose, then use V2, which is now embedded in the Docker CLI
docker compose
.
Resources
- Use the Docker command line - Docker Docs: The official documentation for Docker CLI. It's pretty useful and straightforward.
- CLI Cheat Sheet - Docker Docs: One-page cheat sheet for Docker CLI commands.
- 21 Essential Commands Every Docker User Should Know - Linux Handbook: Another good list of common Docker CLI commands.
Quiz
Hands-on
Follow the instructions in the HiveBox project phase 2.
Interview Questions
Review the interview questions related to Module 2.