Skip to content

Commit

Permalink
few modifications to schedule and projects
Browse files Browse the repository at this point in the history
  • Loading branch information
alonitac committed Aug 19, 2024
1 parent dab8ac3 commit e9977bd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 141 deletions.
39 changes: 14 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,50 +13,39 @@ TBD

## Getting Ready for Bootcamp

Please complete the course [Onboarding tutorial](tutorials/onboarding.md). Once done, you can move on to the studying guide below.
First, please complete the course [Onboarding tutorial](tutorials/onboarding.md).

Please make sure to thoroughly review the content, complete the multiple-choice questions (MCQs), and finish all exercises provided in the below table **before the bootcamp begins**.
Now review the 3 tutorials below about linux fundamentals and answer the corresponding quiz.
When done, please complete and submit the [Linux Mini Project](https://github.com/exit-zero-academy/LinuxMiniProject), **before the bootcamp begins**.


<table width="100%">
<tr><th>#</th><th>Topic</th><th>Tutorial</th><th colspan="3">&nbsp;&nbsp;&nbsp;Resources&nbsp;&nbsp;&nbsp;</th><th>Project</th></tr>

<tr><th>#</th><th>Tutorial</th><th>Quiz</th></tr>

<tr>
<td>1</td>
<td>Linux and Bash</td>
<td><a href="tutorials/linux_intro.md">Linux intro</a></td>
<td align="center"> </td>
<td align="center"><a target="_blank" href="https://alonitac.github.io/DevOpsTheHardWay/multichoice-questions/linux_intro.html"><img src="https://alonitac.github.io/DevOpsTheHardWay/img/qm.png" /></a></td>
<td align="center"><a href="tutorials/linux_intro.md#exercises"><img src="https://alonitac.github.io/DevOpsTheHardWay/img/pen.png" /></a></td>
<td align="center">&nbsp;</td>
</tr>

<tr>
<td>2</td>
<td>Linux and Bash</td>
<td><a href="tutorials/linux_file_management.md">Linux file management</a></td>
<td align="center">&nbsp;</td>
<td align="center"><a target="_blank" href="https://alonitac.github.io/DevOpsTheHardWay/multichoice-questions/linux_file_management.html"><img src="https://alonitac.github.io/DevOpsTheHardWay/img/qm.png" /></a></td>
<td align="center"><a href="tutorials/linux_file_management.md#exercises"><img src="https://alonitac.github.io/DevOpsTheHardWay/img/pen.png" /></a></td>
<td align="center">&nbsp;</td>
</tr>

<tr>
<td>3</td>
<td>Linux and Bash</td>
<td><a href="tutorials/linux_io_redirection.md">IO redirection</a></td>
<td align="center">&nbsp;</td>
<td align="center"><a target="_blank" href="https://alonitac.github.io/DevOpsTheHardWay/multichoice-questions/linux_io_redirection.html"><img src="https://alonitac.github.io/DevOpsTheHardWay/img/qm.png" /></a></td>
<td align="center"><a href="tutorials/linux_io_redirection.md#exercises"><img src="https://alonitac.github.io/DevOpsTheHardWay/img/pen.png" /></a></td>
<td align="center">&nbsp;</td>
</tr>

</table>

## Studying Guide

Participating the bootcamp will provide you a very solid baseline for fundamental topics in DevOps.
The below content will be covered throughout the bootcamp.
Participating in the bootcamp will provide you a very solid baseline for fundamental topics in DevOps.

Each tutorial is designed to be completed in approximately 1-1.5 hours of lesson time, followed by around 1-3 hours of exercises and job interview questions.

Expand All @@ -65,7 +54,7 @@ You are highly encouraged to complete the tutorials and projects by order, as ea
<table width="100%">
<tr><th>#</th><th>Topic</th><th>Tutorial</th><th colspan="3">&nbsp;&nbsp;&nbsp;Resources&nbsp;&nbsp;&nbsp;</th></tr>

<br><tr><td colspan="6" align="center"><br><b>Day 1 - Linux and bash alignment</b><br>In this day we will practice important concepts in Linux OS.<br><br></td></tr>
<br><tr><td colspan="6" align="center"><br><b>Linux and bash alignment</b><br>In this day we will practice important concepts in Linux OS.<br><br></td></tr>

<tr>
<td>1</td>
Expand Down Expand Up @@ -95,7 +84,7 @@ You are highly encouraged to complete the tutorials and projects by order, as ea
</tr>

<tr><td colspan="6" align="center">
<br><b>Day 2 - HTTP communication, APIs</b><br>
<br><b>HTTP communication, APIs</b><br>
We run and develop the Netflix Movie Catalog API - a simple Flask app which simulates the
Netflix Movie Catalog API.<br><br></td></tr>

Expand All @@ -118,7 +107,7 @@ Netflix Movie Catalog API.<br><br></td></tr>
</tr>

<tr><td colspan="6" align="center">
<br><b>Day 3 - SSH protocol and EC2 instances</b><br>
<br><b>SSH protocol and EC2 instances</b><br>
We manually deploy the NetflixMovieCatalog app in an EC2 instance and expose it via a real
domain name.<br><br></td></tr>

Expand Down Expand Up @@ -160,7 +149,7 @@ domain name.<br><br></td></tr>
</tr>

<tr><td colspan="6" align="center">
<br><b> Day 4 - Webservers</b><br>
<br><b> Webservers</b><br>
We deploy the NetflixMovieCatalog app in an EC2 instance behind an Nginx reverse proxy.
<br><br></td></tr>

Expand All @@ -174,7 +163,7 @@ We deploy the NetflixMovieCatalog app in an EC2 instance behind an Nginx reverse
</tr>

<tr><td colspan="6" align="center">
<br><b>Day 5 - Intro to CI/CD pipelines</b><br>
<br><b>Intro to CI/CD pipelines</b><br>
We build a simple CI/CD pipeline for both the NetflixMovieCatalog app, and the Nginx
configuration files.
<br><br></td></tr>
Expand Down Expand Up @@ -203,7 +192,7 @@ configuration files.
<br><br></td></tr>

<tr><td colspan="6" align="center">
<br><b>Day 6 - Docker containers</b><br>
<br><b>Docker containers</b><br>
We use containers to deploy a containerized “monitoring stack” to periodically monitor the
availability of the NetflixMovieCatalog app.
<br><br></td></tr>
Expand All @@ -227,7 +216,7 @@ availability of the NetflixMovieCatalog app.
</tr>

<tr><td colspan="6" align="center">
<br><b>Day 7 - Docker images I</b><br>
<br><b>Docker images I</b><br>
We containerize the NetflixMovieCatalog app and deploy it into the EC2 instance.
<br><br></td></tr>

Expand All @@ -251,7 +240,7 @@ We containerize the NetflixMovieCatalog app and deploy it into the EC2 instance.
</tr>

<tr><td colspan="6" align="center">
<br><b>Day 8 - Docker Volumes and Compose</b><br>
<br><b>Docker Volumes and Compose</b><br>
We introduce another service: the NetflixFrontend app, which is a Node.js web app (a Netflix
clone) that depends on the NetflixMovieCatalog API to serve content.
<br><br></td></tr>
Expand Down
50 changes: 0 additions & 50 deletions tutorials/linux_file_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,54 +212,4 @@ myuser@hostname:~$ ln myfile.txt my-hard-link
myuser@hostname:~$ ln -s myfile.txt my-soft-link
```

# Exercises

### :pencil2: Playing with permissions

1. Under `/etc/passwd` and `/etc/group` you'll find a list of all your users and groups on your system, respectively. `cat` those files and review your users and group.
2. Make sure that your user is a member of the group `sudo`.
3. Use the `ls -l` command to list the files in your home dir along with their permissions.
4. Why are all your directories having an execute (`x`) permission? Use the `chmod` command to remove the `x` permission of some directory, what happened?
5. Use the `chmod` command to modify the permissions of a file.
6. Create a file, write some text into it. Use `chmod` to remove all permissions of the file (`rwx` for all).
7. Use `sudo` to print the content of the file even though no one has permissions to do it.
8. Use the `chown` command to change the owner of a file or directory.

### :pencil2: Links

1. Create a file called `test1`.
1. Create a hard link called `test2` to `test1`.
1. Are the two files sharing the same inode?
1. Change `test1` content.
1. What does `test2` look like?
1. What happens when you copy `test2` to another directory? What happens when you move `test2` to another directory?
1. Create a symlink for `test1`.
1. Remove `test1`, what happened to the symlink you've just created?


### :pencil2: Wildcards

A good directory to play with is `/etc` which is a directory containing config files for the system. As a normal user you may view the files but you can't make any changes so we can't do any harm.

1. List files with only files that contain an extension.
2. List files with only a 3 letter extension.
3. List files whose name contains an uppercase letter.
4. List all python files (files with .py extension).
5. List files whose name is 4 characters long.


### :pencil2: Your neighbors home directory

By default, believe it or not, different linux users on the same OS can read each others' home directory.

Modify the permissions on your home directory to make it completely private. Create a new Linux user called `foreign` and login into it.
Check that `foreign` can't access your directory.
Put the permissions back to how they were.


### :pencil2: Files archive

Archive the contents of your home directory (including any subdirectories) using `tar`.
Now extract the contents into a `backup` directory.

[linux_links]: https://exit-zero-academy.github.io/DevOpsTheHardWayAssets/img/linux_links.png
24 changes: 0 additions & 24 deletions tutorials/linux_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,27 +289,3 @@ Here's what each stream does:
By default, these streams are connected to the terminal, but they can be redirected to files or other streams as well. This is a powerful feature of the Unix shell that allows programs to be combined and orchestrated in powerful ways.

Do you see how **"On a Linux system, everything is a file"**. Keep in mind this statement, it'll help you to understand linux's behavior.

# Exercises

### :pencil2: Know your system

Answer the below question only by `cat` the content of files.

Change directory to the `/proc` directory.

1. What CPU(s) is the system running on?
2. How much RAM does it currently use?
3. How much swap space do you have?
4. What drivers are loaded?
5. How many hours has the system been running?
6. Which filesystems are known by your system?

Change to `/etc`.

1. How long does the system keep the log file in which user logins are monitored?
2. How many users are defined on your system? Don't count them, let the computer do it for you using wc!
3. How many groups do you have?
4. Which version of bash is installed on this system?
5. Where is the time zone information kept?

42 changes: 0 additions & 42 deletions tutorials/linux_io_redirection.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,48 +130,6 @@ In the above `ls -l /dev` command, instead of printing the output to the screen
So `grep` is searching and filtering on the output of the `ls` command.
In this example we are filtering lines containing the text `stdin` or `stdout`, we do it by the `stdin\|stdout` regular expressions.

# Exercises

### :pencil2: IO redirection basics

1. Create a file called `fruits.txt` with the contents "apple banana cherry"
2. Use `>` to write the contents of `fruits.txt` to a new file called `output.txt`.
3. Use `>>` to append the contents of `fruits.txt` again to `output.txt`.
4. Use `|` to pipe the output of cat `output.txt` to grep banana. How many times does banana appear?
5. Use `grep` to search for APPLE (upper cases) in `output.txt`. Did the search succeed?
6. Use `grep` to display all lines in `output.txt` that don't contain banana.

### :pencil2: `grep` on file

Create the file `~/bashusers.txt`, which contains lines from the `/etc/passwd` file which contain the text “/bin/bash”.

### :pencil2: `grep` on file II

Create the file `~/rules.txt`, which contains every line from the `/etc/rsyslog.conf` file which contains the text “file”, using a case insensitive search.
(In other words, file, File, and files would all count as matches).


### :pencil2: `grep` with line number and pipe

Use the `grep` command and IO redirects only!

Create the file `~/mayhemnum.txt`, which contains only the line number of the word “mayhem” from the file `/usr/share/dict/words`.


### :pencil2: `grep` with regex

Find the number of words in `/usr/share/dict/words` that contain at least three “a”s. E.g. traumata, takeaways, salaam

### :pencil2: Regex

Create a file containing some lines that you think would match the regular expression: `(^[0-9]{1,5}[a-zA-Z ]+$)|none` and some lines that you think would not match.
Use `grep` to see if your intuition is correct.

### :pencil2: Regex II

Using `grep` command and regular expressions, list all files in your home directory that others can read or write to.




[linux_ioredirect]: https://exit-zero-academy.github.io/DevOpsTheHardWayAssets/img/linux_ioredirect.png

0 comments on commit e9977bd

Please sign in to comment.