From 7950bc683f439b880c3e65b9dbdaaba42b7b3a9c Mon Sep 17 00:00:00 2001
From: Jiadi Su <20302010043@fudan.edu.cn>
Date: Thu, 27 Apr 2023 19:48:02 +0800
Subject: [PATCH] 2023-04-27 meeting

---
 ...11\350\243\205\346\220\255\345\273\272.md" | 116 ++++++++++++++++++
 doc/note/Su/eBPF.md                           |   2 +
 ...32\350\256\256\350\256\260\345\275\225.md" |  18 +++
 3 files changed, 136 insertions(+)
 create mode 100644 "doc/log/Su/k8s_docker\345\256\211\350\243\205\346\220\255\345\273\272.md"

diff --git "a/doc/log/Su/k8s_docker\345\256\211\350\243\205\346\220\255\345\273\272.md" "b/doc/log/Su/k8s_docker\345\256\211\350\243\205\346\220\255\345\273\272.md"
new file mode 100644
index 0000000..849cb8a
--- /dev/null
+++ "b/doc/log/Su/k8s_docker\345\256\211\350\243\205\346\220\255\345\273\272.md"
@@ -0,0 +1,116 @@
+# k8s与docker安装搭建
+
+## docker的安装
+
+### 安装过程
+
+1、删除旧版本
+
+```bash
+$ sudo apt-get remove docker docker-engine docker.io containerd runc
+```
+
+2、设置仓库
+
+æ›´æ–°apt
+
+```bash
+$ sudo apt-get update
+```
+
+安装依赖包
+
+```bash
+$ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
+```
+
+添加Docker官方密钥
+
+```bash
+$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
+OK
+```
+
+验证密钥
+
+```bash
+$ apt-key fingerprint 0EBFCD88
+pub   rsa4096 2017-02-22 [SCEA]
+      9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
+uid           [ unknown] Docker Release (CE deb) <docker@docker.com>
+sub   rsa4096 2017-02-22 [S]
+
+```
+
+设置稳定版仓库
+
+```bash
+$ add-apt-repository \
+   "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ \
+  $(lsb_release -cs) \
+  stable"
+```
+
+3、安装docker(最新版本)
+
+```bash
+$ sudo apt-get install docker-ce docker-ce-cli containerd.io
+```
+
+### 遇到的问题
+
+"Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
+
+原因是docker未启动,使用如下指令启动
+
+```bash
+$ systemctl start docker
+```
+
+报错:"System has not been booted with systemd as init system (PID 1). Can't operate."
+
+原因是不是用`systemctl`管理服务,修改指令:
+
+```bash
+$ service docker start
+ * Starting Docker: docker           [ OK ]
+```
+
+启动后尝试运行hello-world容器:
+
+```bash
+$ sudo docker run hello-world
+
+Unable to find image 'hello-world:latest' locally
+latest: Pulling from library/hello-world
+1b930d010525: Pull complete                                                                                                                                  Digest: sha256:c3b4ada4687bbaa170745b3e4dd8ac3f194ca95b2d0518b417fb47e5879d9b5f
+Status: Downloaded newer image for hello-world:latest
+
+
+Hello from Docker!
+This message shows that your installation appears to be working correctly.
+
+
+To generate this message, Docker took the following steps:
+ 1. The Docker client contacted the Docker daemon.
+ 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
+    (amd64)
+ 3. The Docker daemon created a new container from that image which runs the
+    executable that produces the output you are currently reading.
+ 4. The Docker daemon streamed that output to the Docker client, which sent it
+    to your terminal.
+
+
+To try something more ambitious, you can run an Ubuntu container with:
+ $ docker run -it ubuntu bash
+
+
+Share images, automate workflows, and more with a free Docker ID:
+ https://hub.docker.com/
+
+
+For more examples and ideas, visit:
+ https://docs.docker.com/get-started/
+```
+
+出现如上结果,安装成功。
\ No newline at end of file
diff --git a/doc/note/Su/eBPF.md b/doc/note/Su/eBPF.md
index f6fcff7..0753127 100644
--- a/doc/note/Su/eBPF.md
+++ b/doc/note/Su/eBPF.md
@@ -919,6 +919,8 @@ $ clang -v
 $ llc --version
 # test iproute2
 $ ip link
+# libbpf
+$ apt-get install libbpf-dev
 ```
 
 libbpf其实就包括了eBPF程序中常见的头文件`<bpf/bpf_helpers.h>`、`<bpf/bpf_tracing.h>`等,在安装好libbpf后上述文件会出现在`/usr/include/bpf`下供使用。
diff --git "a/doc/\344\274\232\350\256\256\350\256\260\345\275\225.md" "b/doc/\344\274\232\350\256\256\350\256\260\345\275\225.md"
index 39febab..7550444 100644
--- "a/doc/\344\274\232\350\256\256\350\256\260\345\275\225.md"
+++ "b/doc/\344\274\232\350\256\256\350\256\260\345\275\225.md"
@@ -93,3 +93,21 @@
 8. 从需求如手的思路转为从问题如手,构造一个场景,通过场景描述问题;问题 => 需求;
 9. 把之前卡住的地方记录到git仓库上;
 
+### 2023-04-27 19 : 00
+
+地点:逸夫楼501
+
+主题:交流遇到的问题,讨论后续两天的学习内容
+
+人员:三位队员
+
+1. 运行[libbpf-bootstrap](https://github.com/libbpf/libbpf-bootstrap)项目给出的所有示例;
+2. 运行[bpf-developer-tutorial](https://github.com/eunomia-bpf/bpf-developer-tutorial)中的所有示例(可以用不同的方式运行,libbpf-bootstrap脚手架,eunomia-bpf框架,或者自己clang编译加载都可以);
+3. 有时间可以简单跑一下bcc和示例代码;
+4. 通过上面的项目,明确以下几件事:
+    - kernel态的bpf程序怎么用libbpf库编写(整理出来一个流程,如:设置license,引入哪些头文件,怎样设置处理函数)
+    - kernel态的bpf程序是怎么编译的,编译时需要有哪些依赖,与系统的结构有什么联系(整理出来一份libbpf编写的bpf程序编译时依赖的环境)
+    - 明确bpftool、btf、vmlinux.h、CO-RE都是什么,起到了什么作用,btf和linux内核以及libbpf库有什么关系,vmlinux.h怎么生成和使用,CO-RE怎么使用;
+    - 搞清楚libbpf-bootstrap的编译运行加载逻辑(似乎可以通过查看Makefile和libbpf-bootstrap的说明文档了解一下),整理出一个libbpf-bootstrap的结构文档;
+5. 简单尝试一下bpf-trace程序;
+6. 下一步开始了解bpf和k8s之间的联系,并研究一下eunomia-bpf这个框架;
-- 
GitLab