mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
course development on chapter 1 and 2
This commit is contained in:
parent
d45d70638f
commit
77af9a7db2
@ -8,7 +8,7 @@ This course is my ultimate guide to DevOps,SRE & platform engineering for beginn
|
|||||||
|
|
||||||
In my many years working in the field, I have noticed a range of challenges and problems that people face when trying to start a DevOps, SRE, platform or cloud engineering career. </br>
|
In my many years working in the field, I have noticed a range of challenges and problems that people face when trying to start a DevOps, SRE, platform or cloud engineering career. </br>
|
||||||
|
|
||||||
## 🔴The challenges - <i>where to start ?</i>
|
## 🔴The current challenges of careers in Tech - <i>where to start ?</i>
|
||||||
|
|
||||||
<b>DevOps has its challenges:</b>
|
<b>DevOps has its challenges:</b>
|
||||||
* There is no simple starting point to start learning about DevOps
|
* There is no simple starting point to start learning about DevOps
|
||||||
@ -29,7 +29,7 @@ In my many years working in the field, I have noticed a range of challenges and
|
|||||||
* Miss out on powerful open source skills
|
* Miss out on powerful open source skills
|
||||||
* Vendor locking
|
* Vendor locking
|
||||||
|
|
||||||
## 🎯 The solution: Goals & Expectations
|
## 🎯 Course Goals & Expectations
|
||||||
|
|
||||||
This course provides a practical hands-on roadmap into the world of DevOps, SRE and platform engineering. </br>
|
This course provides a practical hands-on roadmap into the world of DevOps, SRE and platform engineering. </br>
|
||||||
It will set you up with all the fundamentals required for successful future learning. </br>
|
It will set you up with all the fundamentals required for successful future learning. </br>
|
||||||
@ -74,8 +74,10 @@ You will build the ultimate foundation and be equipped to make more informed dec
|
|||||||
|
|
||||||
## 📖 Where to find the full course
|
## 📖 Where to find the full course
|
||||||
|
|
||||||
The Youtube series will cover the course content so you can benefit from the course roadmap for free. </br>
|
The course will have a free summarised and editted version which touches on each topic for you to get started so you can benefit from the roadmap </br>
|
||||||
|
|
||||||
However, the YouTube videos are in shorter, edited, summarised form. So although you may benefit from the content, if you are a beginner, you may prefer the long form content where I elaborate, provider more in-depth explanations and cover more examples </br>
|
However, the YouTube videos are in shorter, edited, summarised form. So although you may benefit from the content, if you are a beginner, you may prefer the long form content where I elaborate, provider more in-depth explanations and cover more examples </br>
|
||||||
|
The paid course will also provide some bonus content </br>
|
||||||
|
|
||||||
If you are a beginner, I highly recommend you checkout the full course on your favourite platform below:
|
If you are a beginner, I highly recommend you checkout the full course on your favourite platform below:
|
||||||
|
|
||||||
|
62
course/chapters/chapter-2-operating-systems/README.md
Normal file
62
course/chapters/chapter-2-operating-systems/README.md
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# Chapter 2 : Operating Systems
|
||||||
|
|
||||||
|
Back to [Course Introduction](../../README.md)
|
||||||
|
|
||||||
|
### 🎬 [Module 1: Introduction Operating Systems for DevOps](../../content/operating-systems/intro/README.md)
|
||||||
|
|
||||||
|
#### In this module
|
||||||
|
|
||||||
|
* What is an Operating system
|
||||||
|
* Why Operating Systems are important for DevOps
|
||||||
|
* Operating System Key Functions
|
||||||
|
* Operating systems resources
|
||||||
|
* user management
|
||||||
|
* permission management
|
||||||
|
* hardware management & devices
|
||||||
|
* resource management
|
||||||
|
* CPU
|
||||||
|
* Memory
|
||||||
|
* Disk
|
||||||
|
* The Kernel
|
||||||
|
* Terminal & Command Line
|
||||||
|
|
||||||
|
### 🚧🎬 [Module 2: Introduction to Servers & Virtualisation](../../content/operating-systems/virtualization/README.md)
|
||||||
|
|
||||||
|
#### In this module
|
||||||
|
|
||||||
|
* What are servers
|
||||||
|
* Introduction to Virtualisation
|
||||||
|
* Virtualisation software
|
||||||
|
* Creating our first server
|
||||||
|
|
||||||
|
### 🚧🎬 [Module 3: Introduction to Linux for beginners](../../content/operating-systems/linux/README.md)
|
||||||
|
|
||||||
|
#### In this module
|
||||||
|
|
||||||
|
* What is Linux
|
||||||
|
* Installation and setup of a linux server
|
||||||
|
* Accessing servers
|
||||||
|
* Command line basics
|
||||||
|
* User accounts
|
||||||
|
* File management
|
||||||
|
|
||||||
|
### 🚧🎬 [Module 4: Understanding the command line](../../content/operating-systems/commandline/introduction/README.md)
|
||||||
|
|
||||||
|
#### In this module
|
||||||
|
|
||||||
|
* Benefits of using command line
|
||||||
|
* Why Command line is important for DevOps
|
||||||
|
* Command line structure
|
||||||
|
* Command line examples
|
||||||
|
* Navigating command usage
|
||||||
|
* Command line tools
|
||||||
|
|
||||||
|
### 🚧🎬 [Module 5: Bash scripting for beginners](../../content/operating-systems/scripting/bash/README.md)
|
||||||
|
|
||||||
|
#### In this module
|
||||||
|
|
||||||
|
* Benefits of writing bash scripts
|
||||||
|
* Basics of Automation
|
||||||
|
* Introduction to bash scripting
|
||||||
|
* Pro's and Con's of scripting
|
||||||
|
* Write our first bash script
|
214
course/content/operating-systems/intro/README.md
Normal file
214
course/content/operating-systems/intro/README.md
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
# 🎬 Introduction to Operating Systems for DevOps
|
||||||
|
|
||||||
|
## 💡 Preface
|
||||||
|
|
||||||
|
This module is part of a course on DevOps. </br>
|
||||||
|
Checkout the [course introduction](../../../README.md) for more information </br>
|
||||||
|
This module is part of [chapter 2](../../../chapters/chapter-2-operating-systems/README.md)
|
||||||
|
|
||||||
|
## What is an Operating System
|
||||||
|
|
||||||
|
An operating system is software that allows us to run programs and interface with the hardware. </br>
|
||||||
|
Users of a computer, and applications that are installed, do not have to interact with hardware directly. The operating system does this for us so it sits as a layer above the hardware </br>
|
||||||
|
|
||||||
|
All our programs, code, scripts, automation and "things" we do in DevOps will run on an Operating System</br>
|
||||||
|
```
|
||||||
|
┌──────────────────────────────────┐
|
||||||
|
│ USERS │
|
||||||
|
│ │
|
||||||
|
└───────────────┬──────────────────┘
|
||||||
|
┌───────────────▼──────────────────┐
|
||||||
|
│ APPLICATIONS │
|
||||||
|
│ │
|
||||||
|
└───────────────┬──────────────────┘
|
||||||
|
┌───────────────▼──────────────────┐
|
||||||
|
│ OPERATING SYSTEM │
|
||||||
|
│ │
|
||||||
|
└───────────────┬──────────────────┘
|
||||||
|
┌───────────────▼──────────────────┐
|
||||||
|
│ HARDWARE │
|
||||||
|
│ │
|
||||||
|
└──────────────────────────────────┘
|
||||||
|
|
||||||
|
```
|
||||||
|
For example, your Laptop, Mac, PC, iPhone or Android device all has an operating system. </br>
|
||||||
|
|
||||||
|
## Why is the Operating System important for DevOps
|
||||||
|
|
||||||
|
In DevOps, SRE and even cloud engineering, Operating systems will play a fundamentally important role in our day to day work. </br>
|
||||||
|
Your workstation or laptop, may be Microsoft Windows, or MacOS, or you may have Linux installed </br>
|
||||||
|
Therefore all the tools you may use will be dependant or compatible with either one for different operating systems </br>
|
||||||
|
|
||||||
|
In addition to that, production systems you may interact with will have an Operating system installed </br>
|
||||||
|
Therefore, scripts, automation and deployment pipelines, open-source tools, infrastructure as code and all the DevOps technologies we will use in this course, needs to cater for operating systems </br>
|
||||||
|
|
||||||
|
To support and monitor production systems in real world scenarios, you need to have an understanding of how to use different operating systems </br>
|
||||||
|
|
||||||
|
For example, a production web server could be using Linux and its currently malfunctioning because it has no disk space left </br>
|
||||||
|
We'll need to know how to :
|
||||||
|
* Access the production server
|
||||||
|
* Navigate and troubleshoot issues
|
||||||
|
* Solve the issue to return the server to normal operation
|
||||||
|
* Add preventative measures and improvement to prevent future outages
|
||||||
|
|
||||||
|
For the above, you may need basic understanding of Linux, command line tools like SSH to access the server, `df` and `du` which are tools to troubleshoot disk space and other problem solving skills we'll learn throughout this course </br>
|
||||||
|
|
||||||
|
## Operating System Key Functions
|
||||||
|
|
||||||
|
The operating system has many important key functions:
|
||||||
|
|
||||||
|
### User Management
|
||||||
|
|
||||||
|
You can have multiple users sign into the same device </br>
|
||||||
|
For example, you may be the administrator of your home computer. So you setup the printer, the internet access, WIFI etc </br>
|
||||||
|
|
||||||
|
Another family member has a different user account and password, when they sign in, they have permission to set their own profile, their own desktop wallpaper and manage their own files. </br>
|
||||||
|
However they cannot alter the internet and printer settings </br>
|
||||||
|
|
||||||
|
This is important in DevOps because we can run systems using unprivileged accounts </br>
|
||||||
|
We will discuss security throughout this course </br>
|
||||||
|
|
||||||
|
### Permission management
|
||||||
|
|
||||||
|
The operating system as shown above, allows us to set different permissions for different users or groups. </br>
|
||||||
|
Users like Grandma and Dad, may be part of the "Family" group and can manage their own profile, files, browse the web and have their own applications that they use. </br>
|
||||||
|
Members of the "Family" user group cannot change operating system settings like internet access, printers and network settings etc. </br>
|
||||||
|
You may be a member of the "Administrators" group, which allows you to manage the operating system. </br>
|
||||||
|
|
||||||
|
The above user and permission concepts are important, as we will face these throughout the remainder of this course. </br>
|
||||||
|
|
||||||
|
When we build our own applications or use applications for automation and scripting, we will need to think about security and what permission these automation processes have </br>
|
||||||
|
|
||||||
|
### Hardware management
|
||||||
|
|
||||||
|
When we use a computer, we don't work directly with the hardware. </br>
|
||||||
|
Our applications also do not directly communicate with the hardware. </br>
|
||||||
|
For example, our keyboard and mouse may be plugged in via USB cable into a USB port. </br>
|
||||||
|
The Operating System interfaces with the hardware and communicates with the USB device, so when you move the mouse, signals are sent to the USB port and the Operating system knows how to interpret these signals and makes the mouse pointer move on the screen </br>
|
||||||
|
|
||||||
|
Similarly, you have a screen or monitor plugged into your computer via a display port or HDMI port. Similarly the monitor sends display signals to that port and the Operating System knows how to interpret signals on the display port and allows you to see things on the screen. </br>
|
||||||
|
|
||||||
|
|
||||||
|
#### Device drivers
|
||||||
|
|
||||||
|
Operating Systems use device drivers to talk to the hardware. </br>
|
||||||
|
Device drivers are software that is specialised and specifically coded to be able to interpret and understand the hardware signals and functionality. </br>
|
||||||
|
In the examples of your mouse, keyboard and computer screens, your operating system has USB drivers as well as display drivers, so it knows how to use a mouse and keyboard as well as a screen. </br>
|
||||||
|
|
||||||
|
If the Operating System had to know about every device that exists in the world, it would become too large as it would need trillions of different device driver software installed </br>
|
||||||
|
|
||||||
|
To help with this , many devices use generic USB drivers, and technology like USB helps to keep things "generic" </br>
|
||||||
|
So many devices would prefer to use USB as its generic and most computers would understand it and it helps developers of devices not have to build custom driver software for devices. </br>
|
||||||
|
|
||||||
|
### Resource Management
|
||||||
|
|
||||||
|
For DevOps, resources is a very important topic, as it will impact almost everything you do in a real world production scenario </br>
|
||||||
|
The Operating System manages access to resources. For example, it will make disk space available to an application that wants to use it </br>
|
||||||
|
It also controls security to these resources, like which folders an application can access </br>
|
||||||
|
Some resources may be reserved for system use </br>
|
||||||
|
|
||||||
|
#### CPU
|
||||||
|
|
||||||
|
The CPU, or central processing unit is the heart of a computer. </br> It is the brain power that is responsible for all compute operations </br>
|
||||||
|
Any computation that occurs on a system involves the CPU. </br>
|
||||||
|
When you run a script, a program, some code, or a popular app that you like to use like the browser, the operating system will initiate the CPU to process it. </br>
|
||||||
|
|
||||||
|
CPU operates in "cycles". A CPU with a clock speed of 3.2 GHz executes 3.2 billion cycles per second.
|
||||||
|
The cycle of a CPU involves:
|
||||||
|
|
||||||
|
1) Fetching the instruction to execute
|
||||||
|
2) Decode the instruction
|
||||||
|
3) Read the address from memory
|
||||||
|
4) Execute the instruction
|
||||||
|
|
||||||
|
Without over complicating it, I'd suggest thinking of a processor as a bicycle. </br>
|
||||||
|
The operating system will throw "things to process" on the bicycle and the bicycle will "cycle" and execute these instructions </br>
|
||||||
|
One bicycle with one wheel can only execute 1 cycle at a time, so if there is an instruction that takes a long time to execute, other instructions may have to wait to get their turn on the bicycle. </br>
|
||||||
|
This execution time is often referred to CPU time </br>
|
||||||
|
|
||||||
|
A processor can have multiple cores which can be seen as multiple wheels on the bicycle. </br>
|
||||||
|
This allows the processor to perform multiple executions concurrently </br>
|
||||||
|
|
||||||
|
In this course, we will be taking a look at CPU monitoring when we start building applications and how to effectively monitor their CPU usage and overall system performance </br>
|
||||||
|
|
||||||
|
|
||||||
|
#### Memory
|
||||||
|
|
||||||
|
There are two high level storages in an Operating system. I would like to think of it as short term memory (RAM) and long term memory (Disk). </br>
|
||||||
|
Now Memory or RAM (Random access memory) is extremely fast storage non-persistent storage. </br>
|
||||||
|
Which means it does not persist, so when the computer is turned off, or looses power, the data in memory is lost </br>
|
||||||
|
It's like turning off your mobile phone suddenly and when you turn it back on, everything you had open is gone. </br>
|
||||||
|
Memory is usually limited in capacity, you may have 8GB , 16GB, 32GB or 64GB of memory, while your hard disk may be 500GB or even a Terabyte in size </br>
|
||||||
|
|
||||||
|
<b>Why would you have such small and volatile non-persistent storage and not just use a large disk ? </b>
|
||||||
|
|
||||||
|
This is because memory is extremely fast and operates at a much higher frequency speed than a disk would. </br>
|
||||||
|
The speed at which data is read and written to memory is typically in nanoseconds or faster, where as with Disk, it's in milliseconds </br>
|
||||||
|
|
||||||
|
From a DevOps perspective, it's important to know that whenever a CPU has to run something, it has to be loaded into memory. </br>
|
||||||
|
For example, if you double click a program to start it, or click a document to open it on your computer, the program and document has to be loaded into memory in order for the CPU to process and run the application. </br>
|
||||||
|
|
||||||
|
Therefore memory is the most active and important resource in junction with the CPU processor. </br>
|
||||||
|
|
||||||
|
Throughout this course, we will take a look at monitoring memory and what impacts memory has on software in the DevOps world </br>
|
||||||
|
|
||||||
|
#### Disk
|
||||||
|
|
||||||
|
Disk is the main persistent storage for the Operating system. It allows us to store data long term and the data is stored even when the computer is powered off </br>
|
||||||
|
|
||||||
|
You get different type of storage types:
|
||||||
|
* HDD = Hard disk drives
|
||||||
|
* SSD = Solid state drives
|
||||||
|
* Flash drives = USB type disk drives
|
||||||
|
|
||||||
|
Disk is storage that applications will use to write configuration and program data in order to persist it in times the application is no longer running. </br>
|
||||||
|
Think of a Database as an example. </br>
|
||||||
|
When a database process starts, CPU cycles start executing instructions, and first the database application is loaded into memory from disk, then configuration files are loaded into memory. </br>
|
||||||
|
The database program starts performing database operations which are CPU cycles, reading instructions from memory and loading database data from disk. </br> The data is loaded from disk and the database is then ready to be accessed. </br>
|
||||||
|
Every database is different, but hopefully you get the idea of the application lifecycle and why disk is important. </br>
|
||||||
|
|
||||||
|
When the database program is shut down unexpectedly, all data in memory is lost so there is a challenge to ensure all important data is committed to disk as often as possible to prevent data loss
|
||||||
|
|
||||||
|
## The Kernel
|
||||||
|
|
||||||
|
So far we've been talking about what the Operating system does, like device and resource management.
|
||||||
|
These operations are performed by part of the Operating system called the "Kernel" or core. </br>
|
||||||
|
|
||||||
|
The kernel is a piece of software that is part of the Operating system's core and controls everything in the system. </br>
|
||||||
|
The kernel is the interface that allows applications to access hardware
|
||||||
|
|
||||||
|
```
|
||||||
|
┌───────────────┐
|
||||||
|
│ │
|
||||||
|
│ APPLICATIONS │
|
||||||
|
│ │
|
||||||
|
└──────┬────────┘
|
||||||
|
│
|
||||||
|
┌──────▼────────┐
|
||||||
|
│ │
|
||||||
|
│ KERNEL │
|
||||||
|
│ │
|
||||||
|
└───┬─────┬─────┴───┐
|
||||||
|
│ │ │
|
||||||
|
│ │ │
|
||||||
|
┌───▼──┐┌─▼────┐ ┌──▼─────┐
|
||||||
|
│ CPU ││MEMORY│ │DEVICES │
|
||||||
|
│ ││ │ │ │
|
||||||
|
└──────┘└──────┘ └────────┘
|
||||||
|
```
|
||||||
|
Applications interface with the kernel through system calls. </br>
|
||||||
|
|
||||||
|
## Types of Operating Systems
|
||||||
|
|
||||||
|
There are two main operating systems that you will be dealing with as a DevOps, SRE or Platform engineer. </br>
|
||||||
|
<b>Windows</b> and <b>Linux</b> </br>
|
||||||
|
It is important to be proficient in both of these, however, experience is the key and the only way to get experience is through hands-on practical use and exposure. </br>
|
||||||
|
In this course, we will become exposed to both to some degree, but our main focus will be Linux </br>
|
||||||
|
|
||||||
|
## Terminal and Command line
|
||||||
|
|
||||||
|
Another way for us to interact with the Operating system is through the Terminal </br>
|
||||||
|
This forms another important part of this course as it will be one of the primary ways we will interact with systems in upcoming chapters </br>
|
||||||
|
|
||||||
|
In upcoming modules, we will learn about the command line and how to use a terminal. </br>
|
||||||
|
This will form the basis and foundation of our automation and scripting skills </br>
|
@ -32,6 +32,49 @@ Benefits:
|
|||||||
|
|
||||||
Let's head over to [github.com](https://github.com/) and Sign up. </br>
|
Let's head over to [github.com](https://github.com/) and Sign up. </br>
|
||||||
|
|
||||||
|
## Create a Personal Access token
|
||||||
|
|
||||||
|
### Important Notes about Authentication
|
||||||
|
|
||||||
|
When we authenticate with GIT for Windows, GIT may popup a browser window that asks you to sign in to Github. </br>
|
||||||
|
When you sign in this way, Github sets up authentication tokens for your account and GIT for Windows uses the Windows Credential manager
|
||||||
|
to store the credential. </br>
|
||||||
|
|
||||||
|
When you authenticate with GIT on Linux, you will get a prompt for username and password. </br>
|
||||||
|
Important to know that the password here is not your Github password, but rather a personal access token. </br>
|
||||||
|
|
||||||
|
Knowing how to create and manage personal access tokens (or PAT) is important because:
|
||||||
|
* These tokens have a shorter lifespan than your password making them more secure.
|
||||||
|
* They may have limited access, for example we may only use them to read repositories, or write, or both.
|
||||||
|
* We may use these tokens to login via scripts and automation pipelines
|
||||||
|
|
||||||
|
### GIT Credential Store
|
||||||
|
|
||||||
|
Another important note is that when we sign in using GIT for Windows, Windows may cache the credential so we don't have to login every time we access Github. </br>
|
||||||
|
|
||||||
|
For Linux, this is not done by default, and we may need to run a command once to set up credential caching. </br>
|
||||||
|
|
||||||
|
We can either cache our token for default 15 minutes, by running the below command:
|
||||||
|
|
||||||
|
```
|
||||||
|
git config --global credential.helper cache
|
||||||
|
|
||||||
|
```
|
||||||
|
Or we can specify a time in seconds if we wanted a shorter or longer time than 15 minutes
|
||||||
|
|
||||||
|
```
|
||||||
|
git config --global credential.helper 'cache --timeout=3600'
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Or we can store it in the credential store for Linux and store it forever
|
||||||
|
|
||||||
|
```
|
||||||
|
git config --global credential.helper store
|
||||||
|
```
|
||||||
|
|
||||||
|
You can choose the appropriate command above for you so you don't have to keep signing in to GitHub when using GIT.
|
||||||
|
|
||||||
## Create our first repository
|
## Create our first repository
|
||||||
|
|
||||||
On the [github.com](https://github.com/), top menu, you will find a `+` button where you can create a new repository </br>
|
On the [github.com](https://github.com/), top menu, you will find a `+` button where you can create a new repository </br>
|
||||||
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 1014 KiB After Width: | Height: | Size: 1014 KiB |
Loading…
x
Reference in New Issue
Block a user