Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

cern-eos/eos-manila

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EOS Manila: Manila Driver for EOS Storage

The purpose of this driver is to directly connect CERN users with the OpenStack interface in order to request and configure in a self-service approach storage space at CERN. Every CERN user has a dashboard in OpenStack where one can for example request virtual machines and space in storage systems. The driver aims to connect the two systems using their APIs.

The driver in this repository is a generic baseline to understand how OpenStack Manila handles calls made to drivers in order to communicate with outside interfaces. Through this sample driver we are able to "interface" with the local machine in order to create fake shares in the logged-in user's home directory. The server-side of this system employs a Python GRPC server to process requests. All requests must use the EOS protocol and a valid "fake" authentication key.

About OpenStack

OpenStack is a popular open source cloud-computing software platform. The system makes use of commodity hardware as its main source for computing and is tied in with several other services, such as networking and authentication. [1]

About EOS Storage

EOS is a disk-based, low-latency storage service. Having a highly-scalable hierarchical namespace, and with data access possible by the XROOT protocol, it was initially used for physics data storage. Today, EOS provides storage for both physics and user use cases. The main target area for the EOS is physics data analysis, which is characterised by many concurrent users, a significant fraction of random data access and a large file-open rate [2].

Driver Capabilities

This driver currently supports:

  • Creating a Share
  • Deleting a Share
  • Extending a Share
  • Shrinking a Share

OpenStack Manila Installation With DevStack

To begin using the EOS Manila driver with OpenStack, it is first necessary to install OpenStack with Manila support. To do this, we will be using DevStack: scripts meant to seamlessly build an OpenStack environment on your desired machine.

After building a compatible Linux machine dedicated to OpenStack, using your machine's root account, run the following commands:

  1. Create a "stack" user with sudo privileges.
$ sudo useradd -s /bin/bash -d /opt/stack -m stack
$ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
  1. Switch to the "stack" user.
$ sudo su - stack
  1. Clone the DevStack repository and change directories into the newly downloaded folder.
$ git clone https://opendev.org/openstack/devstack
$ cd devstack
  1. Copy "local.conf" file from /devstack/samples into the devstack folder.
$ cp samples/local.conf ./
  1. Add the following lines at the bottom of the local.conf file just copied into the root directory of the devstack folder.
enable_plugin manila https://github.com/openstack/manila
enable_plugin manila-ui https://github.com/openstack/manila-ui
  1. Start the install.
$ ./stack.sh

The installation will take 30-40 minutes, depending on the speed of your internet connection. After it has finished, Devstack will supply sample admin and demo accounts to use freely.

NOTE: All subsquent instructions assume that DevStack was installed in stack's home directory.

Enabling EOS as a Share Protocol

As mentioned previously, the EOS driver will only communicate with Manila drivers that employ the EOS protocol. In any other case, the driver will deny permisson to the request. Use the instructions below to enable EOS as a share protocol on OpenStack Manila.

  1. Modify the Manila configuration file to add EOS as a share protocol.
$ vi /etc/manila/manila.conf
...
#modify the other enabled share protocols as neccesary
enabled_share_protocols = NFS,CIFS,EOS
  1. Modify Manila UI to enable EOS as a share protocol.
$ vi ~/manila-ui/manila_ui/local/local_settings.d/_90_manila_shares.py
OPENSTACK_MANILA_FEATURES = {
    'enable_share_groups': True,
    'enable_replication': True,
    'enable_migration': True,
    'enable_public_share_type_creation': True,
    'enable_public_share_group_type_creation': True,
    'enable_public_shares': True,
    'enabled_share_protocols': ['NFS', 'CIFS', 'GlusterFS', 'HDFS', 'CephFS',
                                'MapRFS', 'EOS'],
}
  1. Register the configuration options for the EOS Manila Driver.
$ vi ~/manila/manila/opts.py
import manila.share.drivers.eos-manila.driver
...
_global_opt_lists = [
    ...
    manila.share.drivers.eos-manila.driver.eos_opts
    ...
]
  1. Define EOSException.
$ vi ~/manila/manila/exception.py
class EOSException(ManilaException):
    message = _("EOS exception occurred: %(msg)s")
  1. Add "EOS" as a share protocol constant.
vi ~/manila/manila/common/constants.py
SUPPORTED_SHARE_PROTOCOLS = (
    'NFS', 'CIFS', 'GLUSTERFS', 'HDFS', 'CEPHFS', 'MAPRFS', 'EOS')
  1. Restart all Manila services.
$ sudo systemctl restart devstack@m*

Configuring the EOS Manila Driver

Before beginning these series of steps, ensure that:

  1. Navigate to the OpenStack Manila drivers folder and clone the repository.
$ cd ~/manila/manila/share/drivers/eos-manila
$ git clone https://github.com/cern-eos/eos-manila.git
  1. Modify the bottom of Manila configuration file.
$ vi /etc/manila/manila.conf
  1. Add a new stanza to manila.conf for the EOS Manila driver configuration:
[eos]
driver_handles_share_servers = False
share_backend_name = EOS
share_driver = manila.share.drivers.eos-manila.driver.EOSDriver
auth_key = BakTIcB08XwQ7vNvagi8 # arbitrary authentication key defined in server
  1. Enable the EOS Manila driver in the [DEFAULT] stanza of the manila.conf file and, if you have not aready done so, enable the EOS protocol.
#modify the other enabled share backends/protocols as neccesary
enabled_share_backends = eos
...
enabled_share_protocols = NFS,CIFS,EOS 
  1. Create a new share type for EOS.
$ manila type-create eos False --extra-specs share_backend_name=EOS
  1. Restart all Manila services.
$ sudo systemctl restart devstack@m*

Running the Sample GRPC Server with EOS Manila Driver

In the case that you would like to experiment with the capabilities of this driver without a dedicated server, this repository comes equipped with a sample GRPC server.

The GRPC server hosts "shares" in stack's home directory in a folder called 'eos_shares.' Here, the shares are organized according to which user created it. Each time a share is created, a share folder appears in the user's folder with a .txt file indicating the size of the share.

To run the server:

$ cd grpc_eos
$ python server.py 

With each request, the server will print the parameters of the request as well as if the requests were successful or not.

Modifying OpenStack UI for End-User

References:

About

Manila driver for EOS storage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published