Giter VIP home page Giter VIP logo

sliproad's Introduction

Sliproad

Merging filesystems together

About

This project aims to be an easy-to-use web API and frontend that allows the management of cloud storage alongside local filesystems. While this is intended mostly for my own use, I am documenting it in a way that I hope allows others to use it!

Configuration

Sliproad uses "Providers" to support various filesystems "types", whether it be remote or local. Currently, three exist - disk for filesystems local to the machine, backblaze to leverage Backblaze B2 file storage and s3 for AWS S3 (and other compatible providers).

An example of leveraging all three, in various forms, can be found below. As more are added, this example will be updated, and more examples can be found in the assets/config_examples directory.

disk:
  provider: disk
  path: /tmp/nas
backblaze:
  provider: backblaze
  config:
    bucket: some-bucket
    applicationKeyId: application-key-id
    applicationKey: application-key
s3:
  provider: s3
  config:
    region: eu-west-2
    bucket: some-bucket
# An example of an S3 compatible API, doesn't have to be Backblaze.
backblazes3:
  provider: s3
  config:
    bucket: some-bucket
    region: us-west-000
    endpoint: s3.us-west-000.backblazeb2.com
    keyid: key-id
    keysecret: key-secret

Running

After configuring the providers you would like to utilize, simply run ./sliproad. This will spin up the webserver at 127.0.0.1:3000, listening on all addresses.

Frontend

The frontend is a very lightweight JavaScript application and aims to be very functional, if a bit rough around the edges.

Screenshot_2021-05-29 Sliproad

It should scale reasonably well for smaller devices. Because it's now bundled into the binary (as opposed to distributed alongside), it's no longer possible to swap it out for a custom frontend without serving the frontend seperately.

API

This project is largely API-first, and documentation can be found here:

https://github.com/gmemstr/sliproad/wiki/API

Building

This project leverages a Makefile to macro common commands for running, testing and building this project.

  • make will build the project for your system's architecture.
  • make run will run the project with go run
  • make pi will build the project with the GOOS=linux GOARCH=arm GOARM=5 go flags set for Raspberry Pi.
  • make dist will build and package the binaries for distribution.

Adding Providers

New file providers can be implemented by building off the FileProviderInterface struct, as the existing providers demonstrate. You can then instruct the TranslateProvider() function that it exists and how to configure it.

Authentication [!]

Authentication is a bit tricky and due to be reworked in the next iteration of this project. Currently, support for Keycloak is implemented, if a bit naively. You can turn this authentication requirement on by adding auth.yml alongside your providers.yml file with the following:

provider_url: "https://url-of-keycloak"
realm: "keycloak-realm"
redirect_base_url: "https://location-of-sliproad"

Keycloak support is not currently actively supported, and is due to be removed in the next major release of Sliproad. That said, if you encounter any major bugs utilizing it before this, please open an issue so I can dig in further.

Credits

SVG Icons provided by Paweł Kuna: https://github.com/tabler/tabler-icons (see assets/web/icons/README.md)

sliproad's People

Contributors

gmemstr avatar

Stargazers

Xiaobo avatar Razak Wasiu avatar Hoverhuang avatar Michael Jett avatar Romeo avatar  avatar  avatar  avatar  avatar

Watchers

James Cloos avatar Cory Gillenkirk avatar  avatar Miroslav Ivanov avatar  avatar

sliproad's Issues

Consolidate file writing

Currently it depends whether the file is local or remote -- if local, we go into a os.Open -> serve up to client at the router level, if remote we pass through an io writer. Should ideally be an io writer regardless.

Google Drive Provider

I'm intentionally avoiding this right now because Google's API tends to be pretty heavy and tricky to authenticate with.

Redesign Frontend

Functionally the frontend is where I want it, it's a matter of making is pretty.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.