A cloudlet is a new architectural element that arises from the convergence of mobile computing and cloud computing. It represents the middle tier of a 3-tier hierarchy: mobile device - cloudlet - cloud. A cloudlet can be viewed as a "data center in a box" whose goal is to "bring the cloud closer". A cloudlet has four key attributes:
Copyright (C) 2011-2012 Carnegie Mellon University This is a developing project and some features might not be stable yet. Please visit our website at Elijah page.
Cloudlet is licensed under the GNU General Public License, version 2.
You will need:
- qemu-kvm
- libvirt-bin
- gvncviewer
- python-libvirt
- python-xdelta3
- python-dev (for message pack)
- liblzma-dev (for pyliblzma)
- Java JRE (for UPnP server)
- apparmor-utils (for disable apparmor for libvirt)
- python library
- msgpack-python
- bson
- pyliblzma
- psutil
- SQLAlchemy
To install:
-
install library dependency Example at ubuntu 12 LTS x86.
> $ sudo apt-get install qemu-kvm libvirt-bin gvncviewer python-libvirt python-xdelta3 python-dev openjdk-6-jre liblzma-dev apparmor-utils python-pip > $ sudo pip install msgpack-python bson pyliblzma psutil sqlalchemy -
Disable security module. Example at Ubuntu 12
> $ sudo aa-complain /usr/sbin/libvirtd -
add current user to kvm, libvirtd group.
> $ sudo adduser [your_account_name] kvm > $ sudo adduser [your_account_name] libvirtd
We have tested at Ubuntu 12.04 LTS 64-bit
This version of Cloudlet has several dependencies on other projects for further optimization, and currently we include this dependency as a binary. Therefore, we recommend you to use Ubuntu 12.04 LTS 64-bit
-
Creating
base vm.
You will first createbase vmfrom a regular VM disk image. Thisbase vmwill be a template VM for overlay VMs. To createbase vm, you need regular VM disk image in a raw format.> $ cd ./bin > $ ./cloudlet base /path/to/base_disk.img > (__Use raw file format__)This will launch remote connection(VNC) to guest OS and cloudlet module will automatically start creating
base vmwhen you close VNC window. After finishing all the processing, you can check generatedbase vmusing below command.> $ cd ./bin > $ ./cloudlet list_base -
Creating
overlay vmon top ofbase vm.
Now you can create your customized VM based on top ofbase vm> $ cd ./bin > $ ./cloudlet overlay /path/to/base_disk.imgThis will launch VNC again. On top of this
base vm, you can install(and execute) your custom server. For example, if you're a developer offace recognitionbackend server, we will install required libraries and start your server. Cloudlet will automatically extracts this customized part from thebase vmwhen you close VNC, and it will be your overlay.overlay VMis composed of 2 files; 1)overlay-meta fileends with .overlay-meta, 2) compressedoverlay blob filesends with .xzNote: if your application need specific port and you want to make a port forwarding host to VM, you can use -redir parameter as below.
> $ ./cloudlet overlay /path/to/base_disk.img -- -redir tcp:2222::22 -redir tcp:8080::80This will forward client connection at host port 2222 to VM's 22 and 8080 to 80, respectively.
If you have kernel related issue like this, You should follow workaround for this problem. It happens at low-end machine with EPT support, and you can avoid it by disabling EPT support.
-
Synthesizing
overlay vmHere, we'll show 3 different ways to perform VM synthesis using
overlay vmthat you just generated; 1) verifying synthesis using command line interface, 2) synthesize over network using desktop client, and 3) synthesize over network using Android client.-
Command line interface: You can resume your
overlay vmusing$ cd ./bin $ ./cloudlet synthesis /path/to/base_disk.img /path/to/overlay-meta
-
Network client (python version)
We have a synthesis server that received
VM synthesisrequest from mobile client and you can start the server as below.> $ cd ./bin > $ ./synthesisYou can test this server using the client. You also need to copy the overlay that you like to reconstruct to the other machine when you execute this client.
> $ ./rapid_client.py -s [cloudlet ip address] -o [/path/to/overlay-meta]- Network client (Android version)
We have source codes for android client at ./src/client/andoid and you can import it to
Eclipseas an Android porject. This client program will automatically find nearby Cloudlet using UPnP if both client and Cloudlet are located in same broadcasting domain (ex. share WiFi access point)Once installing application at your mobile device, you should copy your overlay VM (both overlay-meta and xz file) to Android phone. You can copy it to /sdcard/Cloudlet/overlay/ directory creating your overlay directory name. For example, you can copy your
face recognition overlay vmto /sdcard/Cloudlet/overlay/face/ directory. This directory name will be appeared to your Android application when you're asked to selectoverlay vm. Right directory name is important since the directory name will be saved as appName in internal data structure and being used to launch associated mobile application after finishingVM synthesis. See more details at handleSucessSynthesis() method at CloudletConnector.java file. -
You will need:
- qemu-kvm 1.1.1 (for Free memory and TRIM support)
- libc6-dev-i386 (for Free memory support)
- The Case for VM-based Cloudlets in Mobile Computing
- The Impact of Mobile Multimedia Applications on Data Center Consolidation (To be appeared)
- Just-in-Time Provisioning for Cyber Foraging
- Scalable Crowd-Sourcing of Video from Mobile Devices