-
Notifications
You must be signed in to change notification settings - Fork 1
/
devfile.yaml
138 lines (138 loc) · 3.92 KB
/
devfile.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
schemaVersion: 2.2.2
metadata:
generateName: openwrt-helloworld
attributes:
controller.devfile.io/storage-type: ephemeral
projects:
- name: openwrt-helloworld
git:
remotes:
origin: https://github.com/che-incubator/openwrt-helloworld-package.git
- name: openwrt
zip:
location: https://github.com/openwrt/openwrt/archive/refs/tags/v21.02.3.zip
components:
- name: runtime
container:
image: quay.io/che-incubator/openwrt-builder:latest
memoryLimit: 6656Mi
memoryRequest: 512Mi
cpuLimit: 10000m
cpuRequest: 1000m
mountSources: true
endpoints:
- exposure: public
name: file-server
protocol: https
targetPort: 8080
path: /bin/targets
- name: qemu
container:
image: quay.io/che-incubator/openwrt-runner:latest
memoryLimit: 1536Mi
memoryRequest: 256Mi
cpuLimit: 1500m
cpuRequest: 500m
mountSources: true
endpoints:
- exposure: public
name: luci
protocol: https
targetPort: 30080
- exposure: internal
name: ssh
protocol: tcp
targetPort: 30022
commands:
- id: installpackagedefinitions
exec:
label: Install all package definitions
component: runtime
workingDir: ${PROJECTS_ROOT}/openwrt
commandLine: scripts/feeds update -a -f && scripts/feeds install -a -f
group:
kind: build
- id: linkhelloworldpackage
exec:
label: Link helloworld package
component: runtime
workingDir: ${PROJECTS_ROOT}
commandLine: ln -sr openwrt-helloworld/package/helloworld openwrt/package/
group:
kind: build
- id: unlinkhelloworldpackage
exec:
label: Unlink helloworld package
component: runtime
workingDir: ${PROJECTS_ROOT}
commandLine: unlink /projects/openwrt/package/helloworld
group:
kind: build
- id: copyconfig
exec:
label: Copy diff-config to OpenWRT
component: runtime
workingDir: ${PROJECTS_ROOT}/openwrt-helloworld
commandLine: scripts/copy-config.sh
group:
kind: build
- id: savedifconfig
exec:
label: Save diff-config to openwrt-helloworld
component: runtime
workingDir: ${PROJECTS_ROOT}/openwrt
commandLine: scripts/diffconfig.sh > /projects/openwrt-helloworld/configs/.x86-generic.config
group:
kind: build
- id: buildhelloworldpackage
exec:
label: Build helloworld package
component: runtime
workingDir: ${PROJECTS_ROOT}/openwrt
commandLine: make package/helloworld/compile V=s CONFIG_DEBUG=y
group:
kind: build
- id: prebuiltresources
exec:
label: Add prebuilt resources
component: runtime
workingDir: ${PROJECTS_ROOT}/openwrt-helloworld
commandLine: scripts/add-prebuilt-resources.sh
group:
kind: build
- id: buildallpackages
exec:
label: Build all packages and the kernel
component: runtime
workingDir: ${PROJECTS_ROOT}/openwrt-helloworld
commandLine: scripts/build.sh
group:
kind: build
- id: qemustart
exec:
label: Running OpenWRT in a QEMU VM
component: qemu
workingDir: ${PROJECTS_ROOT}
commandLine: /usr/local/bin/prepare-and-run-vm.sh
- id: gdbsshstart
exec:
label: Start remote GDB Server
component: runtime
workingDir: ${PROJECTS_ROOT}/openwrt-helloworld
commandLine: scripts/start-gdb-server.sh
- id: gdbsshaccess
exec:
label: Remote access to OpenWRT via SSH
component: runtime
workingDir: ${PROJECTS_ROOT}/openwrt-helloworld
commandLine: scripts/start-ssh.sh
group:
kind: build
- id: serverstart
exec:
label: Start Http-Server
component: runtime
workingDir: ${PROJECTS_ROOT}/openwrt
commandLine: npx http-server -a 0.0.0.0 -p 8080 -o bin/targets
group:
kind: build