Cloud Agnostic Storage Management Interface (CASMI)
CASMI is a NodeJS solution that enables cloud-agnostic file management. The CASMI server provides access-controlled APIs to interact with file storage services of different cloud providers. It currently supports Amazon S3, Google Cloud Storage, and Azure Blob Storage.
- Hashicorp vault server to maintain provider secrets, with a role (and associated policy) for casmi-server
- Firebase authentication project for casmi-server with client and service account credentials, provided in a
firebase.config.js
file - MySQL database server (Setup script : casmi.sql)
.env
file (Reference : .env.example)
version: "3.1"
services:
casmi-vault:
image: vault
container_name: casmi-vault
ports:
- <host_port>:<container_port>
volumes:
- /path/to/volumes/logs:/vault/logs
- /path/to/volumes/file:/vault/file
- /path/to/volumes/config:/vault/config
cap_add:
- IPC_LOCK
entrypoint: vault server -config=/vault/config/vault.json
{
"backend": {
"mysql" {
"database": "",
"table": "",
"username": "",
"password": ""
}
},
"listener": {
"tcp": {
"address": "0.0.0.0:<container_port>",
"tls_disable": 1
}
},
"ui": true
}
{
FIREBASE: {
CLIENT: {
apiKey: "",
authDomain: "",
projectId: "",
storageBucket: "",
messagingSenderId: "",
appId: "",
},
ADMIN: {
type: "",
project_id: "",
private_key_id: "",
private_key: "",
client_email: "",
client_id: "",
auth_uri: "",
token_uri: "",
auth_provider_x509_cert_url: "",
client_x509_cert_url: "",
},
},
}
Developed and tested with - v16.16.0
Steps:
- Clone repository
- Place dependent .env and firebase.config.js in the project root directory
- Change directory to project root
- Install node package dependencies using :
npm install
- Run node server :
npm start
docker run -d \
-p 80:8000 \
-v /path/to/firebase.config.js:/app/firebase.config.js \
-v /path/to/uploads:/app/uploads \
--env-file /path/to/.env \
--name casmi-server \
sureshrahul/casmi:<tag>
version: "3.1"
services:
casmi-server:
image: sureshrahul/casmi:<tag>
container_name: casmi-server
ports:
- 80:8000
volumes:
- /path/to/firebase.config.js:/app/firebase.config.js
- /path/to/.env:/app/.env
- /path/to/uploads:/app/uploads