forked from openmina/openmina
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.yaml
104 lines (104 loc) · 2.67 KB
/
run.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
apiVersion: v1
kind: Service
metadata:
name: debugger-service
spec:
type: NodePort
selector:
app: debugger
ports:
- port: 80
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: node-service
spec:
type: NodePort
selector:
app: debugger
ports:
- port: 10000
protocol: TCP
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: debugger
name: debugger
spec:
replicas: 1
selector:
matchLabels:
app: debugger
template:
metadata:
labels:
app: debugger
spec:
runtimeClassName: kata-clh
containers:
- name: bpf-debugger
imagePullPolicy: Always
image: openmina/mina-network-debugger:f267f777
securityContext:
privileged: true
command: ["sh", "-ce", "bpf-recorder"]
env:
- name: RUST_LOG
value: "info"
- name: SERVER_PORT
value: "80"
ports:
- name: http
containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /sys/kernel/debug
name: sys-kernel-debug
- mountPath: /proc
name: proc
resources:
requests:
memory: 16G
limits:
memory: 32G
- name: openmina
image: debian:buster
command: ["sh", "-c"]
args:
- |
apt-get update && apt-get -y install git curl gcc libssl-dev pkg-config
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
PATH=$PATH:~/.cargo/bin && rustup update 1.77
git clone https://github.com/openmina/openmina
cd openmina
git fetch && git checkout feat/tweak-for-debugger
PATH=$PATH:~/.cargo/bin && cargo +1.77 build --release --bin openmina -p cli --no-default-features
cp target/release/openmina /usr/local/bin/openmina
openmina node -p 10000 --libp2p-port 8302
ports:
- name: external-ip
containerPort: 8302
protocol: TCP
- name: node-server
containerPort: 10000
protocol: TCP
env:
- name: BPF_ALIAS
value: "/coda/0.0.1/fd7d111973bf5a9e3e87384f560fdead2f272589ca00b6d9e357fca9839631da-0.0.0.0"
resources:
requests:
memory: 16G
limits:
memory: 32G
volumes:
- name: sys-kernel-debug
hostPath:
path: /sys/kernel/debug
- name: proc
hostPath:
path: /proc
---