-
Notifications
You must be signed in to change notification settings - Fork 11
Home
Cloudlets are discoverable, generic, stateless servers located in single-hop proximity of mobile devices, that can operate in disconnected mode and are virtual-machine (VM) based to promote flexibility, mobility, scalability, and elasticity. In our implementation of cloudlets, applications are statically partitioned into a very thin client that runs on the mobile device and a computation-intensive Server that runs inside a Service VM. Read more about cloudlets at http://sei.cmu.edu/mobilecomputing/research/tactical-cloudlets/.
KD-Cloudlet comprises a total of 7 GitHub projects:
- pycloud (Cloudlet Server)
- cloudlet-client (Cloudlet Client)
- client-lib-android (Library for Cloudlet-Ready Apps)
- client-lib (Java REST Client Library)
- android-logger (SLF4J Logger for Android)
- speech-server (Test server: Speech Recognition Server based on Sphinx)
- speech-android (Test client: Speech Recognition Client)
pycloud is the Cloudlet Server component of KD-Cloudlet. The three main components of pycloud are:
- Cloudlet Server: runtime component that manages computation offload requests from mobile devices. It includes capabilities to provide cloudlet metadata to cloudlet clients for use in cloudlet selection algorithms. It also provides app store capabilities for the Cloudlet Client app.
- Cloudlet Manager: web-based application for visualizing and managing Service VMs on a cloudlet
- Service VM creation, edit and deletion
- Service VM import and export
- Service VM instance start, stop and migration
- Cloudlet-ready app repository (i.e., app store)
- Discovery Service: cloudlet broadcast mechanism based on zeroconf
The prerequisites for the machine where pycloud will be run in are:
- It must be running Ubuntu 16.04 or higher
- Virtualization must be enabled in the BIOS
When modifying Pycloud's code, it is easier to set up a development enviornment to work on, where all the required libraries are set up, and where changes to the code do not require recreating a package and reinstalling it. In this case, instead of following the Packaging and Installation processes below, the following process can be performed:
- Log in with the Linux user you are going to use to run Pycloud
- Clone this repo from GitHub into a folder. All paths below are relative to this folder
- From the command line, change folders into the
./scripts
folder - Execute the command
bash full_dev_setup.sh
- Log out from your Linux user, and log back in (or restart the computer if this doesn't work)
- If it was not created, create the
./data
folder
Running this script will achieve the following:
- Install all required debian packages on the system
- Set up a Python Virtual Environment on a new
./env
subfolder, with all the required Python packages - Set up the discovery service and other dependent services
- Set up all required permissions for the user running the script, including adding the user to groups it will need to be in to properly run pycloud (this is what requires the log-out and log-in)
To start the system in the foreground, execute the following commands from the root repo folder:
-
sudo bash start_dev_manager.sh
to start the Pycloud Cloudlet Manager -
sudo bash start_dev_api.sh
to start the Pycloud API
When running in development mode, all data with be stored in a new the ./data
subfolder. Also, the configuration files used in this mode are ./development_manager.ini
for the Manager, and ./development_api.ini
for the API.
Optional configurations that may be needed include:
- If the cloudlet will not be connecting to the network through an Ethernet card, or if the card is not called eth0, you will have to configure the network adapter name. This has to be done in both .ini files mentioned above. Look for the parameter
pycloud.network.adapter
and change its value to your network adapter's name (e.g., wlan0). - To enable migration, the additional configuration steps indicated in Enabling VM Migration.
- To enable security, the additional configuration steps indicated in Enabling Cloudlet Security.
Optionally, to create a debian package that can be used to install a production-level cloudlet, the instructions in Production Setup can be followed.
- Pycloud Cloudlet Manager: Open a browser window and go to http://127.0.0.1:9998 to access the Cloudlet Manager. The Cloudlet Manager will only be accessible locally (that is, from the same computer it is installed on).
- Pycloud API: the HTTP API will be available on port 9999. This will be used by the Cloudlet Client app, or another cloudlet-ready app. See more details at Pycloud API.
In order to actually use a cloudlet, Service VMs must be created on the host. Please see Service VMs for more information on this.