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.
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]
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].
This driver currently supports:
- Creating a Share
- Deleting a Share
- Extending a Share
- Shrinking a Share
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:
- 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
- Switch to the "stack" user.
$ sudo su - stack
- Clone the DevStack repository and change directories into the newly downloaded folder.
$ git clone https://opendev.org/openstack/devstack
$ cd devstack
- Copy "local.conf" file from /devstack/samples into the devstack folder.
$ cp samples/local.conf ./
- 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
- 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.
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.
- 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
- 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'],
}
- 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
...
]
- Define EOSException.
$ vi ~/manila/manila/exception.py
class EOSException(ManilaException):
message = _("EOS exception occurred: %(msg)s")
- Add "EOS" as a share protocol constant.
vi ~/manila/manila/common/constants.py
SUPPORTED_SHARE_PROTOCOLS = (
'NFS', 'CIFS', 'GLUSTERFS', 'HDFS', 'CEPHFS', 'MAPRFS', 'EOS')
- Restart all Manila services.
$ sudo systemctl restart devstack@m*
Before beginning these series of steps, ensure that:
- You are recognized as an admin user on your OpenStack instance.
- EOS is integrated as a share protocol as described in the section "Enabling EOS as a Share Protocol."
- 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
- Modify the bottom of Manila configuration file.
$ vi /etc/manila/manila.conf
- 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
- 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
- Create a new share type for EOS.
$ manila type-create eos False --extra-specs share_backend_name=EOS
- Restart all Manila services.
$ sudo systemctl restart devstack@m*
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.