Skip to content

Commit 3bc95fa

Browse files
authored
Requirements setup (#2)
Requirements setup
2 parents 60af72a + 53aaf9a commit 3bc95fa

30 files changed

+236
-35
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# BPF Workshop
22

3+
Let's share some eBPF love!
4+
35
## Authors
46

57
- [David Calavera](https://github.com/calavera)
68
- [Lorenzo Fontana](https://github.com/fntlnz)
79

10+
*Add your name here if you contributed to this workshop*
11+
812
## Build and run
913

1014
You need [hugo](https://gohugo.io/) in your path, then

config.yaml

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
baseURL: "http://example.org/"
1+
baseURL: "https://workshop.bpf.sh/"
22
languageCode: "en-us"
33
title: "BPF Workshop"
44
theme: "workshop"
@@ -8,23 +8,34 @@ menu:
88
main:
99
- identifier: introduction
1010
weight: 100
11+
title: "Introduction"
1112
- identifier: program-types
1213
weight: 200
14+
title: "eBPF Program types"
1315
- identifier: bpf-vm
1416
weight: 300
17+
title: "The BPF in Kernel Virtual Machine"
1518
- identifier: bcc
1619
weight: 400
20+
title: "BCC"
1721
- identifier: bpftrace
1822
weight: 500
23+
title: "bpftrace"
1924
- identifier: gobpf
2025
weight: 600
26+
title: "gobpf"
2127
- identifier: kubernetes
2228
weight: 700
29+
title: "eBPF and Kubernetes"
2330
- identifier: clang
2431
weight: 800
32+
title: "Clang BPF backend"
2533
- identifier: tools
2634
weight: 900
35+
title: "Any other tools?"
2736
- identifier: networking
2837
weight: 1000
38+
title: "eBPF and Linux Networking"
2939
- identifier: security
3040
weight: 1100
41+
title: "Linux Kernel security and eBPF"

content/31-environment-setup.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: "requirements"
3+
weight: 30
4+
class: extra-details
5+
---
6+
7+
# Pre-requirements
8+
9+
- A machine with Linux Kernel 4.18+ (or the provided Vagrant machine)
10+
11+
- Be comfortable with the UNIX command line
12+
13+
- navigating directories
14+
15+
- editing files
16+
17+
- a little bit of bash-fu (environment variables, loops)
18+
19+

content/32-environment-setup-tmux.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: "environment-setup-tmux"
3+
weight: 32
4+
---
5+
6+
# Terminals
7+
8+
Once in a while, the instructions will say:
9+
<br/>"Open a new terminal."
10+
11+
There are multiple ways to do this:
12+
13+
- create a new window or tab on your machine, and SSH into the VM;
14+
15+
- use screen or tmux on the VM and open a new window from there;
16+
17+
- Or if you are executing in a local Linux machine just open a new terminal in there;
18+
19+
You are welcome to use the method that you feel the most comfortable with.
20+

content/33-environment-tmux-cheat.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: "environment-tmux-cheat"
3+
weight: 33
4+
---
5+
6+
# Tmux cheatsheet
7+
8+
[Tmux](https://en.wikipedia.org/wiki/Tmux) is a terminal multiplexer like `screen`.
9+
10+
*You don't have to use it or even know about it to follow along.
11+
<br/>
12+
But some of us like to use it to switch between terminals.
13+
<br/>
14+
It comes preinstalled in the Vagrant machine we provided*
15+
16+
- Ctrl-b c → creates a new window
17+
- Ctrl-b n → go to next window
18+
- Ctrl-b p → go to previous window
19+
- Ctrl-b " → split window top/bottom
20+
- Ctrl-b % → split window left/right
21+
- Ctrl-b Alt-1 → rearrange windows in columns
22+
- Ctrl-b Alt-2 → rearrange windows in rows
23+
- Ctrl-b arrows → navigate to other windows
24+
- Ctrl-b d → detach session
25+
- tmux attach → reattach to session
26+

content/33-toc.md

-8
This file was deleted.

content/34-environment-vagrant.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: "environment-vagrant"
3+
weight: 34
4+
---
5+
6+
# Vagrant
7+
8+
- If you don't know what Vagrant is, **don't worry**.
9+
- It's just a tool to create Virtual machines that we use to create a common VM with all the eBPF tools for everyone!
10+
- This workshop comes with a reference environment expressed in a `Vagrantfile`.
11+
- You don't have to use this one, but be prepared to install stuff!
12+
OS X
13+
14+
```
15+
brew cask install virtualbox
16+
brew cask install vagrant
17+
```
18+
19+
Windows
20+
21+
Download [Vagrant](https://www.vagrantup.com/downloads.html) and [Virtualbox](https://www.virtualbox.org/)
22+
23+
24+
Ubuntu
25+
26+
```
27+
apt install vagrant virtualbox
28+
```
29+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: "environment-vagrant-cheatsheet"
3+
weight: 35
4+
---
5+
6+
# Vagrant
7+
8+
After cloning the workshop repository, enter the environment folder:
9+
10+
```
11+
git clone https://github.com/bpftools/bpf-workshop.git
12+
cd bpf-workshop/environment
13+
```
14+
15+
Then there are three major things you can do:
16+
17+
```bash
18+
# Start the environment
19+
vagrant up
20+
21+
# Stop the environment
22+
vagrant halt
23+
24+
# Destroy the environment
25+
vagrant destroy
26+
27+
# Obtain a shell
28+
vagrant ssh
29+
```

content/36-environment-others.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: "environment-others"
3+
weight: 35
4+
---
5+
6+
# Non-Vagrant (aka. All the other environments)
7+
8+
Make sure to have:
9+
10+
- git
11+
- an editor of your choice
12+
- gcc
13+
- clang
14+
- go
15+
16+
The other tools we need, `bpftrace` and `bcc` will have their own setup
17+
instructions in the respective chapters.

content/32-intro-exercieses.md content/42-intro-exercieses.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "intro-exercises"
3-
weight: 32
3+
weight: 42
44
---
55

66
## Hands-on sections

content/43-toc.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "toc"
3+
weight: 43
4+
---
5+
6+
# Table of content
7+
8+
{{< toc >}}

content/999999-thanks.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: "credits"
3+
weight: 999
4+
class: extra-details
5+
---
6+
7+
## Credits
8+
9+
- Thanks to all the eBPF authors and tools makers for their awesome work on it;
10+
- Many thanks to [Jérôme Petazzoni](https://github.com/jpetazzo), we adapted Jérôme's template
11+
from [container.training](https://container.training) to Hugo, we also used the terminals setup instructions and the tmux cheatsheet from that deck!
12+
- Thanks to the [remark](https://github.com/gnab/remark) authors for their work on it, it's the tool
13+
we use to generate the slides;
14+
- Thanks to the [hugo](https://gohugo.io/) authors, for the awesome static site generator;
15+

content/bcc/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "bcc"
33
weight: 400
44
class: title
5-
navTitle: "BCC"
5+
66
---
77
{{< nav >}}
88

content/bpf-vm/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "bpf-vm"
33
weight: 300
44
class: title
5-
navTitle: "The BPF in Kernel Virtual Machine"
5+
66
---
77
{{< nav >}}
88

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: "bpftrace-install"
3+
weight: 502
4+
---
5+
6+
# bpftrace: Installation
7+
8+
We will need to do some exercises with bpftrace.
9+
If you are not using the Vagrant environment, you might want to install it now!
10+
11+
Ubuntu snap package
12+
13+
```
14+
sudo snap install --devmode bpftrace
15+
sudo snap connect bpftrace:system-trace
16+
```
17+
18+
Fedora (28 or later)
19+
20+
```
21+
sudo dnf install bpftrace
22+
```
23+
24+
You can find further instructions [here](https://github.com/iovisor/bpftrace/blob/master/INSTALL.md)
25+
26+

content/bpftrace/529-bpftrace-oneliner-uretprobe-contd.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
---
33
title: "bpftrace-oneliners-uretprobe-contd"
4-
weight: 528
4+
weight: 529
55
class: extra-details
66
---
77

@@ -21,6 +21,7 @@ bpftrace -e \
2121
'uretprobe:./randomnumbers:"main.giveMeNumber"
2222
{ printf("%d\n", retval) }'
2323
```
24-
Bonus point, try to do an `objdump -t randomnumbers | grep -i giveMe`, what do you notice?
2524
]
2625

26+
.footnote[.smaller[Bonus point! Try to do an `objdump -t randomnumbers | grep -i giveMe`, what do you notice?]]
27+

content/bpftrace/598-takeaways.md content/bpftrace/598-bpftrace-takeaways.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
21
---
3-
title: "bpftrace-credits"
4-
weight: 599
2+
title: "bpftrace-takeaways"
3+
weight: 598
54
---
65

76
# Takeaways

content/bpftrace/599-bpftrace-credits.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
---
32
title: "bpftrace-credits"
43
weight: 599

content/bpftrace/index.md content/bpftrace/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "bpftrace"
33
weight: 500
44
class: title
5-
navTitle: "bpftrace"
5+
66
---
77
{{< nav >}}
88

content/clang/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "clang"
33
weight: 800
44
class: title
5-
navTitle: "Clang BPF backend"
5+
66
---
77
{{< nav >}}
88

content/gobpf/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "gobpf"
33
weight: 600
44
class: title
5-
navTitle: "gobpf"
5+
66
---
77
{{< nav >}}
88

content/introduction/101-introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "introduction"
2+
title: "introduction-content"
33
weight: 101
44
---
55
# Introduction

content/introduction/intro.md

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: "introduction"
33
weight: 100
44
class: title
5-
navTitle: "Introduction"
65
---
76
{{< nav >}}
87

content/kubernetes/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "kubernetes"
33
weight: 700
44
class: title
5-
navTitle: "eBPF and Kubernetes"
5+
66
---
77
{{< nav >}}
88

content/networking/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "networking"
33
weight: 1000
44
class: title
5-
navTitle: "eBPF and Linux Networking"
5+
66
---
77
{{< nav >}}
88

content/program-types/intro.md

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: "program-types"
33
weight: 200
44
class: title
5-
navTitle: "eBPF Program types"
65
---
76
{{< nav >}}
87

content/security/intro.md

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: "security"
33
weight: 1100
44
class: title
5-
navTitle: "Linux Kernel security and eBPF"
65
---
76
{{< nav >}}
87

0 commit comments

Comments
 (0)