Skip to content

Commit 47aa28a

Browse files
author
Arie Bregman
authored
Add a couple of exercises (bregman-arie#214)
Also fixed the link for kubernetes exercises.
1 parent ab8e2eb commit 47aa28a

File tree

6 files changed

+388
-6
lines changed

6 files changed

+388
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
:information_source:  This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE
44

5-
:bar_chart:  There are currently **2138** exercises and questions
5+
:bar_chart:  There are currently **2292** exercises and questions
66

77
:books:  To learn more about DevOps and SRE, check the resources in [devops-resources](https://github.com/bregman-arie/devops-resources) repository
88

@@ -33,7 +33,7 @@
3333
<td align="center"><a href="#python"><img src="images/python.png" width="80px;" height="75px;" alt="Python"/><br /><b>Python</b></a></td>
3434
<td align="center"><a href="#go"><img src="images/Go.png" width="75px;" height="75px;" alt="go"/><br /><b>Go</b></a></td>
3535
<td align="center"><a href="exercises/shell/README.md"><img src="images/bash.png" width="70px;" height="75px;" alt="Bash"/><br /><b>Shell Scripting</b></a></td>
36-
<td align="center"><a href="#kubernetes"><img src="images/kubernetes.png" width="75px;" height="75px;" alt="kubernetes"/><br /><b>Kubernetes</b></a></td>
36+
<td align="center"><a href="exercises/kubernetes/README.md"><img src="images/kubernetes.png" width="75px;" height="75px;" alt="kubernetes"/><br /><b>Kubernetes</b></a></td>
3737
<td align="center"><a href="#prometheus"><img src="images/prometheus.png" width="75px;" height="75px;" alt="Prometheus"/><br /><b>Prometheus</b></a></td>
3838
</tr>
3939
<tr>

exercises/aws/ecs_task.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## AWS Containers - Run Tasks
2+
3+
Note: this costs money
4+
5+
### Objectives
6+
7+
Create a task in ECS to launch in Fargate.
8+
9+
The task itself can be a sample app.

exercises/aws/solutions/ecs_task.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## AWS Containers - Run Tasks
2+
3+
Note: this costs money
4+
5+
### Objectives
6+
7+
Create a task in ECS to launch in Fargate.
8+
9+
The task itself can be a sample app.
10+
11+
### Solution
12+
13+
#### Console
14+
15+
1. Go to Elastic Container Service page
16+
2. Click on "Get Started"
17+
3. Choose "sample-app"
18+
4. Verify it's using Farget and not ECS (EC2 Instance) and click on "Next"
19+
5. Select "None" in Load balancer type and click on "Next"
20+
6. Insert cluster name (e.g. my_cluster) and click on "Next"
21+
7. Review everything and click on "Create"
22+
8. Wait for everything to complete
23+
24+
1. Go to clusters page and check the status of the task (it will take a couple of seconds/minutes before changing to "Running")
25+
26+
1. Click on the task and you'll see the launch type is Fargate

exercises/git/README.md

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
## Git
1+
# Git
2+
3+
## Exercises
24

35
|Name|Topic|Objective & Instructions|Solution|Comments|
46
|--------|--------|------|----|----|
57
| My first Commit | Commit | [Exercise](exercises/git/commit_01.md) | [Solution](exercises/git/solutions/commit_01_solution.md) | |
68
| Time to Branch | Branch | [Exercise](exercises/git/branch_01.md) | [Solution](exercises/git/solutions/branch_01_solution.md) | |
79
| Squashing Commits | Commit | [Exercise](exercises/git/squashing_commits.md) | [Solution](exercises/git/solutions/squashing_commits.md) | |
810

11+
## Questions
12+
913
<details>
1014
<summary>How do you know if a certain directory is a git repository?</summary><br><b>
1115

@@ -56,6 +60,14 @@ There are different ways to check whether a file is tracked or not:
5660
<summary>What <code>git status</code> does?</summary><br><b>
5761
</b></details>
5862

63+
### Branches
64+
65+
<details>
66+
<summary>True or False? A branch is basically a simple pointer or reference to the head of certain line of work</summary><br><b>
67+
68+
True
69+
</b></details>
70+
5971
<details>
6072
<summary>You have two branches - main and devel. How do you make sure devel is in sync with main?</summary><br><b>
6173

@@ -67,10 +79,28 @@ git merge main
6779
```
6880
</b></details>
6981

70-
#### Git - Merge
82+
<details>
83+
<summary>Describe shortly what happens behind the scenes when you run <code>git branch <BRANCH></code></summary><br><b>
84+
85+
Git runs update-ref to add the SHA-1 of the last commit of the branch you're on into the new branch you would like to create
86+
</b></details>
87+
88+
<details>
89+
<summary>When you run <code>git branch <BRANCH></code> how does Git know the SHA-1 of the last commit?</summary><br><b>
90+
91+
Using the HEAD file: `.git/HEAD`
92+
</b></details>
93+
94+
<details>
95+
<summary>True or False? when you <code>git checkout some_branch</code>, Git updates .git/HEAD to <code>/refs/heads/some_branch</code></summary><br><b>
96+
97+
True
98+
</b></details>
99+
100+
### Merge
71101

72102
<details>
73-
<summary>You have two branches - main and devel. How do you put devel into main?</summary><br><b>
103+
<summary>You have two branches - main and devel. How do you merge devel into main?</summary><br><b>
74104

75105
git checkout main
76106
git merge devel
@@ -125,7 +155,7 @@ is currently pointing at.
125155
</p>
126156
</b></details>
127157

128-
#### Git - Rebase
158+
### Rebase
129159

130160
<details>
131161
<summary>You would like to move forth commit to the top. How would you achieve that?</summary><br><b>
@@ -198,3 +228,11 @@ If you would like to also discard the changes you `git reset --hard``
198228

199229
False. If you would like to keep a file on your filesystem, use `git reset <file_name>`
200230
</b></details>
231+
232+
## References
233+
234+
<details>
235+
<summary>How to list the current git references in a given repository? </summary><br><b>
236+
237+
`find .git/refs/`
238+
</b></details>

0 commit comments

Comments
 (0)