This repository contains the code of Crystal Controller, the Software-Defined-Storage (SDS) REST API in the IOStack architecture. It is a Django project that implements the REST API needed to handle filters, storlets and policies on top of Openstack Swift object-storage system. This API also includes a set of python processes who use the PyActor middleware, an Object Oriented implementation of the Actor model. This part allows to create simple policies using a DSL (integrated in the Crystal Controller API) and to deploy them as an actor process, who analyze the system data thanks to the monitoring system, and allows to set or remove filters to tenants depending on the established policy.
To build the APIs in an easy way we use Django REST Framework.
- Clone the Crystal controller repository
git clone https://github.com/Crystal-SDS/controller /usr/share/crystal-controller
- Install Python package dependencies:
pip install -r /usr/share/crystal-controller/requirements.txt
- Edit Crystal controller settings file
api/api/settings.py: configure Swift proxy IP and port, Keystone IP, OpenStack credentials, Redis location, RabbitMQ credentials.
- You can start the controller running the following command from the source folder (
python manage.py runserver 0.0.0.0:9000
- Alternatively, it is possible to start the controller by using an Apache Http Server. Copy the config file to the Apache sites folder, and enable it.
cp /usr/share/crystal-controller/etc/apache2/sites-available/crystal_controller.conf /etc/apache2/sites-available/ a2ensite crystal_controller service apache2 reload
API usage is detailed in the API specification.
Run unit tests from the source folder (
./api) with the following command:
python manage.py test
Please open an issue for support.
For more information, please visit crystal-sds.org.