|
1 | | -ELBE with update support |
2 | | -======================== |
3 | | - |
4 | | -v1, 20140313 |
| 1 | +TESTS |
| 2 | +===== |
5 | 3 |
|
6 | | -Files |
7 | | ------ |
8 | | - |
9 | | -elbe-test.tbz |
10 | | -~~~~~~~~~~~~~ |
11 | | -Debian Repository including the current development version of ELBE. Never use |
12 | | -this prerelease to generate rootfilesystems for productive use! |
13 | | - |
14 | | -Extract the contents of this archive, so that a debian mirror is reachable on |
15 | | -the localhost webserver: |
16 | | - |
17 | | ------------------------------------------------------------------------------- |
18 | | -host-pc:~/# sudo tar xjf elbe-test -C /var/www/html |
19 | | ------------------------------------------------------------------------------- |
20 | | - |
21 | | -'http://localhost/elbe-test' in a webbrowser needs to show: |
22 | | - |
23 | | ------------------------------------------------------------------------------- |
24 | | -Index of /elbe-test |
25 | | -Name Last modified Size Description |
26 | | -Parent Directory - |
27 | | -[DIR] conf/ 2014-03-12 13:30 - |
28 | | -[DIR] db/ 2014-03-12 13:30 - |
29 | | -[DIR] dists/ 2014-03-12 13:30 - |
30 | | -[DIR] pool/ 2014-03-12 13:30 - |
31 | | -Apache/2.4.7 (Debian) Server at localhost Port 80 |
32 | | ------------------------------------------------------------------------------- |
33 | | - |
34 | | - |
35 | | -elbe-0.7.0-beta1.tar.gz |
36 | | -~~~~~~~~~~~~~~~~~~~~~~~ |
37 | | - |
38 | | -This archive contains the current sourcetree of the development version of ELBE. |
39 | | -It can be used on the test machine to get acess to the test scripts, examples |
40 | | -and to create an initial development environment. |
41 | | - |
42 | | -It can be extracted to any directory: |
43 | | - |
44 | | ------------------------------------------------------------------------------- |
45 | | -host-pc:~/# tar xzf elbe-0.7.0-beta1.tar.gz |
46 | | ------------------------------------------------------------------------------- |
47 | | - |
48 | | -create a ELBE buildmachine |
49 | | --------------------------- |
50 | | - |
51 | | -create a VM that hosts ELBE development (webinterface, rootfilesystems, ..) |
52 | | - |
53 | | ------------------------------------------------------------------------------- |
54 | | -host-pc:~/elbe-0.7.0-beta1# ./elbe init examples/elbe-init.xml --directory=../elbe-init |
55 | | -host-pc:~/elbe-0.7.0-beta1# cd ../elbe-init |
56 | | -host-pc:~/elbe-init# make |
57 | | -host-pc:~/elbe-init# make run-con |
58 | | - |
59 | | -Debian GNU/Linux 7 elbe-daemon ttyS0 |
60 | | - |
61 | | -elbe-daemon login: root |
62 | | -Password: root |
63 | | -root@elbe-daemon:~# |
64 | | ------------------------------------------------------------------------------- |
65 | | - |
66 | | -build a ELBE project |
67 | | --------------------- |
68 | | - |
69 | | -Now an initial target image will be created inside the VM. The buildchroot |
70 | | -command will block for several minutes without any output. |
71 | | - |
72 | | -Take care that the elbe-updated is in the pkg list for the traget! |
73 | | - |
74 | | ------------------------------------------------------------------------------- |
75 | | -root@elbe-daemon:~# scp [email protected]:~/projects/elbe/elbe/examples/beaglebone-black.xml . |
76 | | - |
77 | | -beaglebone-black.xml 100% 403KB 402.6KB/s 00:00 |
78 | | -root@elbe-daemon:~# elbe buildchroot -t beagle -o beagle.log -n beagle --skip-cdrom beaglebone-black.xml |
79 | | ------------------------------------------------------------------------------- |
80 | | - |
81 | | -The elbe project is now available in /root/beagle |
82 | | - |
83 | | -generate an update file |
84 | | ------------------------ |
85 | | - |
86 | | -To add or update some packages modify the python script: |
87 | | - |
88 | | ------------------------------------------------------------------------------- |
89 | | -root@elbe-daemon:~# cd beagle |
90 | | -root@elbe-daemon:~/beagle# scp [email protected]:~/projects/elbe/elbe/test/modify_rfs.py . |
91 | | - |
92 | | -modify_rfs.py 100% 744 0.7KB/s 00:00 |
93 | | -root@elbe-daemon:~/beagle# python modify_rfs.py |
94 | | ------------------------------------------------------------------------------- |
95 | | - |
96 | | -Increment the version number in the source.xml file. |
97 | | - |
98 | | ------------------------------------------------------------------------------- |
99 | | -root@elbe-daemon:~# vi source.xml |
100 | | ------------------------------------------------------------------------------- |
101 | | - |
102 | | -Then generate an update file. |
103 | | - |
104 | | ------------------------------------------------------------------------------- |
105 | | -root@elbe-daemon:~/beagle# elbe gen_update -t . -n beagle source.xml |
106 | | -root@elbe-daemon:~/beagle# ls -lh *.upd |
107 | | --rw-r--r-- 1 root root 18M Mar 12 16:10 beaglebone-black_2.0.upd |
108 | | ------------------------------------------------------------------------------- |
109 | | - |
110 | | -Optional sign the update file (note gpg needs to be configured) |
111 | | -It is useful to install haveged to increase the entrophy in the VM |
112 | | - |
113 | | ------------------------------------------------------------------------------- |
114 | | -root@elbe-daemon:~/beagle# apt-get install pgp haveged |
115 | | -root@elbe-daemon:~/beagle# gpg --gen-key |
116 | | -... |
117 | | -root@elbe-daemon:~/beagle# gpg --list-keys |
118 | | -... |
119 | | -pub 2048R/7C8F7060 2014-03-12 |
120 | | -... |
121 | | -root@elbe-daemon:~/beagle# elbe sign beaglebone-black_2.0.upd 7C8F7060 |
122 | | -Signed file written to: beaglebone-black_2.0.upd.gpg |
123 | | ------------------------------------------------------------------------------- |
124 | | - |
125 | | -Copy the update files to the host pc: |
126 | | - |
127 | | ------------------------------------------------------------------------------- |
128 | | -root@elbe-daemon:~/beagle# scp beagle*upd* [email protected]:/tmp |
129 | | - |
130 | | -beaglebone-black_2.0.upd 100% 17MB 16.5MB/s 00:00 |
131 | | -beaglebone-black_2.0.upd.gpg 100% 17MB 16.5MB/s 00:01 |
132 | | ------------------------------------------------------------------------------- |
133 | | - |
134 | | - |
135 | | -start the target system (in qemu) |
136 | | ---------------------------------- |
137 | | - |
138 | | -To simplify testing no real target hw is used. Instead we currently use qemu |
139 | | -to boot our beaglebone-black image. |
140 | | - |
141 | | -First the necessary files are copied from the VM to the host pc: |
142 | | - |
143 | | ------------------------------------------------------------------------------- |
144 | | -root@elbe-daemon:~/beagle# scp chroot/boot/*versatile* [email protected]:/tmp |
145 | | - |
146 | | -config-3.2.0-4-versatile 100% 88KB 87.6KB/s 00:00 |
147 | | -initrd.img-3.2.0-4-versatile 100% 7373KB 7.2MB/s 00:01 |
148 | | -System.map-3.2.0-4-versatile 100% 1100KB 1.1MB/s 00:00 |
149 | | -vmlinuz-3.2.0-4-versatile 100% 1383KB 1.4MB/s 00:00 |
150 | | -root@elbe-daemon:~/beagle# scp sdcard.img [email protected]:/tmp |
151 | | - |
152 | | -sdcard.img 48% 916MB 41.1MB/s 00:23 ETA |
153 | | ------------------------------------------------------------------------------- |
154 | | - |
155 | | -Then the qemu-system-arm is started on the host-pc: |
156 | | - |
157 | | ------------------------------------------------------------------------------- |
158 | | -local@host-pc:/tmp# qemu-system-arm -M versatilepb\ |
159 | | - -kernel vmlinuz-3.2.0-4-versatile -initrd initrd.img-3.2.0-4-versatile\ |
160 | | - -net nic,vlan=1,model=smc91c111,macaddr="ba:26:80:5a:c1:4c" -net user,vlan=1\ |
161 | | - -redir tcp:6022::22 -redir tcp:8088::8088\ |
162 | | - -hda sdcard.img -append "root=/dev/sda2" |
163 | | ------------------------------------------------------------------------------- |
164 | | - |
165 | | -(to login use 'root' with the password 'foo') |
166 | | - |
167 | | -The elbe-updated should be startet automatically. The SOAP interface should be |
168 | | -reachable from the host-pc. A quick check is to retrieve the WSDL Interface |
169 | | -description with a browser: "http://localhost:8088/?wsdl" |
170 | | - |
171 | | ------------------------------------------------------------------------------- |
172 | | -<definitions targetNamespace="elbepack.commands.updated.UpdateService" |
173 | | -name="UpdateService"><types><schema |
174 | | -targetNamespace="elbepack.commands.updated.UpdateService"><xs:complexType |
175 | | -name="list_snapshots"><xs:sequence/></xs:complexType> |
176 | | -... |
177 | | ------------------------------------------------------------------------------- |
178 | | - |
179 | | - |
180 | | -apply an update file |
181 | | --------------------- |
182 | | - |
183 | | -To monitor the update progress the 'updated.py' test script may be used: |
184 | | - |
185 | | ------------------------------------------------------------------------------- |
186 | | -host-pc:~/elbe/test# ./updated.py --listen=10.0.2.2 2> /dev/null |
187 | | -monitor ready :8087 |
188 | | -connection established |
189 | | -select snapshot: |
190 | | - [0] base_version |
191 | | -% |
192 | | ------------------------------------------------------------------------------- |
193 | | - |
194 | | -Now copy an update file to the monitored directory: |
195 | | - |
196 | | ------------------------------------------------------------------------------- |
197 | | -host-pc:~/# scp -P 6022 beaglebone-black_2.0.upd.gpg root@localhost:/var/cache/elbe/updates/ |
198 | | -root@localhost's password: foo |
199 | | -beaglebone-black_2.0.upd.gpg 100% 17MB 2.8MB/s 00:06 |
200 | | ------------------------------------------------------------------------------- |
201 | | - |
202 | | -Due to a bug in the gpg checker, the upd file is always applied, even if |
203 | | -the signature is unknown. |
204 | | - |
205 | | -If the file without the gpg ending will be uploaded, nothing will happen. |
206 | | -This behaviour can be changed, if '--nosign' is added to the 'DAEMON_ARGS' in |
207 | | -'/etc/init.d/elbe-updated'. The daemon needs to be restarted by |
208 | | -'/etc/init.d/elbe-updated restart' that the change takes effect. |
209 | | - |
210 | | -The update progress can be monitored in the updated.py test script: |
211 | | - |
212 | | ------------------------------------------------------------------------------- |
213 | | -monitor ready :8087 |
214 | | -connection established |
215 | | -select snapshot: |
216 | | - [0] base_version |
217 | | -% updating.. /var/cache/elbe/updates/beaglebone-black_2.0.upd |
218 | | -preparing update: /var/cache/elbe/beaglebone-black_2.0/ |
219 | | -(1/3) updating package cache ... |
220 | | -(1/3) Ign file: wheezy Release.gpg |
221 | | -(1/3) Get:1 file: wheezy Release [932 B] |
222 | | -(1/3) Ign file: wheezy/main Translation-en |
223 | | -(2/3) calculating packages to install/remove ... |
224 | | -(2/3) 10% - 24/248 |
225 | | -(2/3) 20% - 48/248 |
226 | | -(2/3) 30% - 72/248 |
227 | | -(2/3) 40% - 96/248 |
228 | | -(2/3) 50% - 120/248 |
229 | | -(2/3) 60% - 144/248 |
230 | | -(2/3) 70% - 168/248 |
231 | | -(2/3) 80% - 192/248 |
232 | | -(2/3) 90% - 216/248 |
233 | | -(2/3) 100% - 240/248 |
234 | | -(3/3) applying snapshot ... |
235 | | -(3/3) 0.0% Running dpkg |
236 | | -(3/3) 0.0% Installing libpcre3 |
237 | | -(3/3) 0.0% Installing libglib2.0-0 |
238 | | -(3/3) 0.0% Installing libatk1.0-data |
239 | | -(3/3) 0.0% Preparing libatk1.0-data |
240 | | -(3/3) 0.327869% Unpacking libatk1.0-data |
241 | | -(3/3) 0.655738% Preparing to configure libatk1.0-data |
242 | | -(3/3) 0.983607% Installing libatk1.0-0 |
243 | | -... |
244 | | -(3/3) 20.0% Configuring libvorbisenc2 |
245 | | -(3/3) 20.0% Configuring libsndfile1 |
246 | | -(3/3) 20.0% Configuring quickplot |
247 | | -(3/3) 20.0% Configuring quickplot |
248 | | -(3/3) 20.3279% Installed quickplot |
249 | | -update done: /var/cache/elbe/beaglebone-black_2.0/ |
250 | | ------------------------------------------------------------------------------- |
251 | | - |
252 | | -select a specific update state |
253 | | ------------------------------- |
254 | | - |
255 | | -Use the updated.py test script to switch the target to a specific update state: |
256 | | - |
257 | | -Enter the number of the snapshot that should be applied. |
258 | | -Any other input will terminate the testscript. |
259 | | - |
260 | | ------------------------------------------------------------------------------- |
261 | | -host-pc:~/elbe/test# ./updated.py --listen=10.0.2.2 2> /dev/null |
262 | | -monitor ready :8087 |
263 | | -connection established |
264 | | -select snapshot: |
265 | | - [0] base_version |
266 | | - [1] beaglebone-black_2.0 |
267 | | -% 0 |
268 | | -(1/3) updating package cache ... |
269 | | -(1/3) Ign file: wheezy Release.gpg |
270 | | -(1/3) Get:1 file: wheezy Release [932 B] |
271 | | -(1/3) Ign file: wheezy/main Translation-en |
272 | | -(2/3) calculating packages to install/remove ... |
273 | | -(2/3) 10% - 24/248 |
274 | | -(2/3) 20% - 48/248 |
275 | | -(2/3) 30% - 72/248 |
276 | | -(2/3) 40% - 96/248 |
277 | | -(2/3) 50% - 120/248 |
278 | | -(2/3) 60% - 144/248 |
279 | | -(2/3) 70% - 168/248 |
280 | | -(2/3) 80% - 192/248 |
281 | | -(2/3) 90% - 216/248 |
282 | | -(2/3) 100% - 240/248 |
283 | | -(3/3) applying snapshot ... |
284 | | -(3/3) 0.0% Running dpkg |
285 | | -(3/3) 0.0% Removing quickplot |
286 | | -... |
287 | | -(3/3) 0.0% Preparing to completely remove quickplot |
288 | | -(3/3) 0.819672% Completely removing quickplot |
289 | | -(3/3) 0.819672% Completely removed quickplot |
290 | | -(3/3) 1.63934% Removing libgtk-3-0 |
291 | | -(3/3) 1.63934% Completely removing libgtk-3-0 |
292 | | -(3/3) 18.8525% Completely removed ttf-dejavu-core |
293 | | -(3/3) 19.6721% Removing ucf |
294 | | -(3/3) 19.6721% Preparing to completely remove ucf |
295 | | -(3/3) 20.4918% Completely removing ucf |
296 | | -host-pc:~/elbe/test# |
297 | | ------------------------------------------------------------------------------- |
| 4 | +updated |
| 5 | +------- |
| 6 | +is a simple soap client for updated to test rollback of updates |
0 commit comments