[ADR] Community implementation for RAFS DDMS
Title
Community Implementation for RAFS
Context
The service is limited with main cloud providers (GC, AWS, Azure, IBM). And, if we want to add a new implementation (e.g., BareMetal), we will have to create a new folder under the providers
directory.
Decision
As a solution, we can introduce a new concept called Community Implementation
, when developers can write their own implementations without changing the main repository, and connect their implementations with environment variables.
The only requirement of the implementations is following the abstract classes from the repository.
For demonstration purposes, we did the following:
- Added a new provider with the name "cimpl" (community implementation). MR.
- Created abstract classes for BlobLoader
- Now, users can write their own BlobLoader implementations, create a package from it; The class should be under the following path
provider_obm.blob_manager.BlobLoaderAsync
- it is a requirement - TBD: Create BareMetal implementation.
Running the Community Implementation will look like the following:
# some initial actions of cloning the project, and installing the basic dependencies
...
# linking the concrete GC implementation
# Install the package with abstract classes
pip install os-obm-python --index-url https://community.opengroup.org/api/v4/projects/1505/packages/pypi/simple
# Install the concrete implementation
pip install your-implementation
# Choose community implementation
export CLOUD_PROVIDER="cimpl"
uvicorn app.main:app
Edited by Yan Sushchynski (EPAM)