Middleware and Compute Engine for an OpenStack Swift compute framework that runs compute within a Swift cluster
Go to file
Takashi Kajinami e9e1efe07e Fix the fd leak in SDaemon
This patch prevent SDaemon from leaking the following two file
descriptors.
 * fd for log file
 * fd for task id pipe

This patch also adds some "close"s to make sure output streams
get closed in SDaemon.

Change-Id: I59119243c785526f7b97ac379b0e541cabd44750
Closes-Bug: #1537982
2016-01-28 15:52:00 +09:00
Deploy/playbook update location of get-pip script 2016-01-25 13:57:16 +02:00
Engine Fix the fd leak in SDaemon 2016-01-28 15:52:00 +09:00
StorletSamples added storlet for GZIP compression / decompression 2016-01-18 15:06:48 +02:00
common Introducing initial cluster config 2016-01-16 03:33:47 +02:00
doc/source Merge "Update the dev and test guide with the recent port to func tests" 2015-12-02 19:43:03 +00:00
tests added storlet for GZIP compression / decompression 2016-01-18 15:06:48 +02:00
.coveragerc Change ignore-errors to ignore_errors 2015-09-21 14:55:43 +00:00
.functests Porting SystemTests to functional tests 2015-11-29 11:39:14 +02:00
.gitignore Introducing initial cluster config 2016-01-16 03:33:47 +02:00
.gitreview Initial Cookiecutter Commit. 2015-08-09 18:08:41 +03:00
.mailmap Initial Cookiecutter Commit. 2015-08-09 18:08:41 +03:00
.testr.conf Initial Cookiecutter Commit. 2015-08-09 18:08:41 +03:00
.unittests Porting SystemTests to functional tests 2015-11-29 11:39:14 +02:00
CONTRIBUTING.rst Updating the CONTRIBUTING landing page 2015-09-24 08:47:58 +00:00
HACKING.rst Fix few typos 2015-09-20 08:11:57 +05:30
LICENSE Initial Cookiecutter Commit. 2015-08-09 18:08:41 +03:00
MANIFEST.in Initial Cookiecutter Commit. 2015-08-09 18:08:41 +03:00
README.md Updating EU funding support comment 2015-12-20 17:20:11 +02:00
README.rst Fix few typos 2015-09-20 08:11:57 +05:30
SBusPythonFacade Add unittests about validation method in storlet_docker_gateway 2015-12-22 20:28:09 +09:00
babel.cfg Initial Cookiecutter Commit. 2015-08-09 18:08:41 +03:00
build.xml added storlet for GZIP compression / decompression 2016-01-18 15:06:48 +02:00
cluster_config.json-sample Introducing initial cluster config 2016-01-16 03:33:47 +02:00
openstack-common.conf Initial Cookiecutter Commit. 2015-08-09 18:08:41 +03:00
requirements.txt Add oslosphinx to requirements.txt 2015-09-06 12:36:33 +03:00
s2aio.sh Adding the ability to install s2aio not only from a jenkins job 2015-10-22 13:53:22 +03:00
setup.cfg Merge "Add unittests about validation method in storlet_docker_gateway" 2015-12-24 23:08:25 +00:00
setup.py Initial Cookiecutter Commit. 2015-08-09 18:08:41 +03:00
storlet_gateway Create unittest runner env for storlet_middleware 2015-12-16 02:03:20 -08:00
storlet_middleware Create unittest runner env for storlet_middleware 2015-12-16 02:03:20 -08:00
test-requirements.txt Introducing initial cluster config 2016-01-16 03:33:47 +02:00
tox.ini Merge "Create unittest runner env for storlet_middleware" 2015-12-18 08:53:12 +00:00

README.md

============== Swift Storlets

Quick Installation Guide

  • Get a fresh 14.04 Ubuntu (A disposal VM is a good start)
  • Create a sudoer that can sudo without a password

::

sudo apt-get install python-tox
sudo apt-get install python-nose
git clone https://github.com/openstack/storlets.git
cd storlets
./s2aio.sh

Browse through the StorletSamples directory so see storlet code examples, and through the SystemTests to see samples of deploying and invoking a storlet

Introduction

Swift Storlets extend Swift with the capability to run computation near the data in a secure and isolated manner. With Swift Storlets a user can write code, package and deploy it as a Swift object, and then explicitly invoke it on data objects as if the code was part of the Swift pipeline. We use the term Storlet to refer to the binary code deployed as a Swift object. Invoking a Storlet on a data object is done in an isolated manner so that the data accessible by the computation is only the object's data and its user metadata. Moreover, the computation has no access to disks, network or to the Swift request environment.

The Swift Storlets repo provides:

  • A Swift storlet middleware that can intercept a request for running a storlet over some data, forward the data to the compute engine and stream back the compute engine results.
  • A Storlet gateway API, defining the compute engine API used by the Swift storlet middleware to invoke computations.
  • A StorletGateway implementation class that implements the StorletGateway API. This class runs in the context of the Swift storlet middleware inside the proxy and object service pipelines, and is responsible to communicate with the compute engine passing it the data to be processed and getting back the result.
  • The Docker based compute engine which is responsible for sandboxing the execution of the Storlet. The Docker based compute engine is described in https://github.com/openstack/storlets/blob/master/doc/source/docker_compute_engine.rst
  • Initial tools for managing and deploying Docker images within the Swift cluster.

The documentation in this repo is organized according to the various roles involved with Swift Storlets:

  1. Storlet developer. The Storlet developer develops, packages and deploys Storlets to Swift. This is described in: https://github.com/openstack/storlets/blob/master/doc/source/writing_and_deploying_storlets.rst
  2. Storlet user. A Swift user that wishes to invoke a deployed Storlet on some data object in Swift. https://github.com/openstack/storlets/blob/master/doc/source/invoking_storlets.rst describes how storlets can be invoked.
  3. Storlets account manager (or account manager in short). The account manager is an admin user on the customer side who is typically the one responsible for paying the bill (and perhaps setting ACLs). From Storlets perspective the account manager is responsible for managing the Docker image as well as the Storlets that can be executed on data in the account. Part of the echo system is giving the account manager a way to deploy a Docker image to be used for Storlets execution within that account. https://github.com/openstack/storlets/blob/master/doc/source/building_and_deploying_docker_images.rst has the details.
  4. Swift Storlet manager. Typically, this is the Swift admin on the provider side that deals with rings and broken disks. From the Storlets perspective (s)he is the one responsible for the below. https://github.com/openstack/storlets/blob/master/doc/source/storlets_management.rst has the details of the provided tools to do that. Those tools are installed on a designated node having a 'Storlet management' role (See installation section below)
  • Enabling a Swift account for Storlets. Since we wanted to give a self contained implementation we actuially give a tool for creating a Storlet enabled account. That is, we first create a tenant and account in Keystone, and then do the Swift related operations for enabling the account for Storlets.
  • Deploy an account's Docker image across the cluster. This allows the account admin to upload a self tailored Docker image that the Swift admin can then deploy across the cluster. Requests for running Storlets in that account would be served by Storlets running over this account's self tailored image.
  1. Swift storlet developer. Someone looking at playing with the code of the storlet middleware and the storlet gateway. If you are one of those, you will be interested in:

Installation

https://github.com/openstack/storlets/blob/master/doc/source/installation.rst describes how to install Storlets in an existing Swift cluster that uses Keystone. The installation is based on Ansible and was tested on Ubuntu 14.04, 14.10, and with Swift 1.13 and Swift 2.2.

Once installation is completed, you can try run the system tests as described in the https://github.com/openstack/storlets/blob/master/doc/source/dev_and_test_guide.rst The system tests are a good reference for writing and deploying a Storlet.

Acknowledgements

  • The research leading to the development of this code received funding from the European Community's Seventh Framework Programme (FP7/2007-2013) under the grant agreements for the CASPAR, ENSURE and VISION Cloud projects.
  • Various stages and different aspects of the development of this code received funding from the following European Community's Framework Programme:
    • Seventh Framework Programme (FP7/2007-2013) under the grant agreements for the ForgetIT project, where the code is used for offloading digital preservation functionalities to the storage.
    • Seventh Framework Programme (FP7/2007-2013) under the grant agreements for COSMOS project, where the code is used for analysis of IoT data.
    • Seventh Framework Programme (FP7/2007-2013) under the grant agreements for FI-CORE project where the code is integrated with a holistic cloud deployment solution, and from
    • Horizon 2020 (H2020/2014-2020) under the grant agreement for the IOStack project where the code is used as a backend implementing Storage policies and is used for analytics