Differences

This shows you the differences between two versions of the page.

Link to this comparison view

iot:labs:11 [2015/07/01 02:21]
avner.solomon
iot:labs:11 [2020/01/07 18:55] (current)
jan.vaduva [Lab 11: IoT usecase for Yocto Project]
Line 1: Line 1:
-===== Lab 11 Web Services ​=====+======Lab 11: IoT usecase for Yocto Project======
  
-===== 1) Chat ===== +Open the AGL getting ​started ​guide located ​at: [[https://docs.automotivelinux.org/docs/en/​guppy/​getting_started/​reference/​getting-started/​image-workflow-intro.html|Developing an AGL Image]]
-Using the what you learned in course 11 continue the chat app you started ​in laboratory 10. +
-For this you have an api at +
-http://api.my-sandbox.co/chat/chat.php +
-When you call get on it you will receive all the messages +
-When you send via post the variables username and msg to it, it will add a message to the chat. +
-For visibility show only last 5-10 messagesEach message is separated by "​\n"​+
  
-===== 2Newsfeed =====+Set up your Linux system with the right packages (instruction are provided for Ubuntu, Fedora, CentOS and openSUSE)
  
-Continue the newsfeed you started in laboratory 10. +  - Install prerequisites:​ <​code>​$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ 
-Implement support for reading the whole article bu showing it on a new page +     build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \ 
-and support for liking articles and display the number of likes+     xz-utils debianutils iputils-ping libsdl1.2-dev xterm xsltproc docbook-utils \ 
- +     fop dblatex xmlto make python-git curl</​code>​ 
-For this you will have an api at+  - Define the work directory<​code>​$ export AGL_TOP=$HOME/​workspace_agl 
- +$ mkdir -p $AGL_TOP 
-http://api.my-sandbox.co/chat/get.php +</code> 
-used to fetch latesd news and +  - Setup //repo// tool: <​code>​$ mkdir -p ~/bin 
-http://api.my-sandbox.co/chat/get.php?​id=PRIMARY_KEY_OF_ARTICLE +$ export PATH=~/bin:$PATH 
-to fetch the full article +$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo 
- +$ chmod a+x ~/bin/repo 
-and for likes +</​code>​ 
- +  - Download latest stable AGL release: <​code>​$ cd $AGL_TOP 
-GET http://api.my-sandbox.co/chat/like.php with +$ repo init -b guppy -u https://gerrit.automotivelinux.org/gerrit/AGL/​AGL-repo 
-with id set in order to get the number of likes for an article +$ repo sync 
- +</​code>​ 
-GET http://api.my-sandbox.co/chat/like.php with +  - Source ​//aglsetup.sh// script, ​to create the build directory<​code>​$ source meta-agl/scripts/aglsetup.sh -f -m qemux86-64 agl-demo agl-devel<​/code> 
-with id and uuid set in order to get if you liked or not an article +  ​- Build the OS image<​code>​$ bitbake agl-demo-platform</​code>​ 
- +  - Build the OS SDK image<​code>​$ bitbake agl-demo-platform-crosssdk</​code> ​ 
-POST http://api.my-sandbox.co/chat/​like.php with a JSON +  ​- Decompress the OS image that resulted after the build<​code>​$ cd tmp/deploy/images/​qemux86-64 
-  ​+$ xz -d agl-demo-platform-qemux86-64.vmdk.xz</​code>​ 
-    method:"​like",​ +  ​- Boot the image with QEMU: <​code>​$ sudo apt-get install qemu-system-x86 
-    uuid:"phone-uuid", +$ qemu-system-x86_64 -enable-kvm -m 2048 \ 
-    pk:"​article-pk" +    ​-hda agl-demo-platform-qemux86-64.vmdk \ 
-  ​+    -cpu kvm64 -cpu qemu64,​+ssse3,​+sse4.1,​+sse4.2,+popcnt \ 
-in order to like an article +    -vga virtio -show-cursor \ 
- +    ​-device virtio-rng-pci \ 
-POST http://api.my-sandbox.co/​chat/​like.php with a JSON +    ​-serial mon:stdio -serial null \ 
-  ​{ +    ​-soundhw hda \ 
-    ​method:"​unlike",​ +    -net nic,vlan=0 \ 
-    ​uuid:"​phone-uuid"+    -net user,​hostfwd=tcp::​2222-:​22 
-    ​pk:"​article-pk" +</​code>​
-  } +
-in order to dislike an article. +
- +
-To get the uuid of the phone just access +
-device.uuid +
-The device plugin must be installed (it should be installed in your apps by default but you will have to move the config.xml from the root folder in the www folder)+
  
 +===== Exercises=====
 +  - Replicate a successful AGL setup.
 +  - Get the list of packages the newly defined image has
 +  - Check if packages such as openssh and screen are included in the image.
 +  - Deploy the AGL image onto VirtualBox 5.2.0 or later. You could also try using the latest snapshot available: [[https://​download.automotivelinux.org/​AGL/​snapshots/​master/​latest/​qemux86-64/​deploy/​images/​qemux86-64/​|AGL Snapshot]]
iot/labs/11.1435706501.txt.gz · Last modified: 2015/07/01 02:21 by avner.solomon
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0