Skip to content

An Adapter for os.js to work with Openstack Swift object storage.

License

Notifications You must be signed in to change notification settings

BurnaSmartLab/osjs-monster-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OS.js SWIFT VFS Adapter

This is the SWIFT VFS (Server) Adapter for OS.js.

Prerequisites

Install Openstack Swift All in One Deployment (SAIO) using this manual:

https://docs.openstack.org/swift/latest/development_saio.html

Installation

There are two approaches to install swift vfs adapter:

1. Installing by using source:

1- Go to below directory:

cd src/server

2- Create vfs directory:

mkdir vfs

3- Then go to vfs directory:

cd vfs

4- Clone adapter to this directory:

git clone https://github.com/BurnaSmartLab/osjs-monster-adapter.git

5- Then go to osjs-monster-adapter directory:

cd osjs-monster-adapter

6- At last use bellow command to install dependency:

npm install

2. Installing using npm dependency manager:

Just execute bellow command:

npm i @burna/osjs-monster-adapter

Usage

// src/server/index.js

// If first approach for installing has used:
const monsterAdapter = require('./vfs/osjs-monster-adapter')

// If second approach for installing has used:
// const monsterAdapter = require('@burna/osjs-monster-adapter')

osjs.register(VFSServiceProvider, {
  args: {
    adapters: {
      monster: monsterAdapter
    }
  }
});

Then create a mountpoint. Example using default Swift Account:

// src/server/config.js
{
  vfs: {
          mountpoints: [{
              name: 'myMonster',
              adapter: 'monster',
              attributes: {
                  endpoint: "http://localhost:12345/auth/v1.0",
                  username: "test:tester",
                  password: "testing"
              }
          }]
      }
}

// src/client/config.js
{
  vfs: {
      defaultPath: 'myMonster:/',
      mountpoints: [{
        name: 'myMonster',
        label: 'Monster Drive'
      }]
    }
}

About

An Adapter for os.js to work with Openstack Swift object storage.

Resources

License

Stars

Watchers

Forks

Packages

No packages published