https://github.com/dbrower/bendo

API based archival tape storage service

https://github.com/dbrower/bendo

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.1%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

API based archival tape storage service

Basic Info
  • Host: GitHub
  • Owner: dbrower
  • License: apache-2.0
  • Language: Go
  • Default Branch: master
  • Homepage:
  • Size: 31.1 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 19
  • Releases: 1
Created almost 11 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.md

Bendo

APACHE 2 License Contributing Guidelines Go Report Card

Bendo is a content agnostic storage service. It provides services useful to digital preservation and an API on top ofour tape system, and is designed to be a piece of a larger digital library architecture. Bendo provides the abstraction of a versioned directory, similar to the Moab storage design or Git. Every version of every file it stores has a unique URI. All files are collected into uncompressed Zip files in the BagIt format. The created Zip files are treated as immutable, and are never changed once created. Updates and deletions are handled by adding more Zip files. Content is deduplicated within each item, so unchanged files do not need to be duplicated when new versions are created.

Bendo runs periodic fixity checks on content. It also caches content, so popular items do not need to be read from tape every time. It can store the cache either on disk or in S3.

Description of this repository

This repository contains the code for the Bendo server along with related command-line tools, tests, and documentation. The repository is organized as so:

  • cmd/bendo is the top-level application
  • cmd/bclient is a command line utility to interact with a Bendo server
  • server contains everything relating with the REST API and databases
  • blobcache is the cache logic
  • transaction for the code to create and update items
  • items for reading and writing the stored bundle files
  • bagit, fragment, store handle details with file format, storage, and organization
  • architecture has some design documents and other guides
  • bclientapi has supporting code for the bclient utility

Getting Started

To install Bendo, first install Go. This is probably easiest with a package manager, e.g. brew install go or yum install golang.

There are instructions in ./CONTRIBUTING.md for installing and running Bendo locally.

S3

Bendo can use S3 as storage for the cache. To use it specify the bucket name and an optional prefix to use by setting the CacheDir to be s3:/bucket/prefix. Put the credentials in the environment variables AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY.

You can use a local instance of Minio as well. For example, using docker:

docker run -p 9000:9000 -e "MINIO_ACCESS_KEY=bob" -e "MINIO_SECRET_KEY=1234567890" minio/minio server /data

Then set the CacheDir to access this server by supplying a host name:

CacheDir = s3://localhost:9000/bucket/prefix

And set the environment variables to have the correct access key and secret access key. To run the S3 tests in the store/ directory run

env "AWS_ACCESS_KEY_ID=bob" "AWS_SECRET_ACCESS_KEY=1234567890" go test -tags=s3 -run S3

BlackPearl

Bendo can use the SpectraLogic BlackPearl appliance as a storage location. To configure it give a storage dir location in the form of blackpearl://[hostname or IP address]:[port]/bucket/prefix. Or use blackpearls:// if the device is configured to use https for its API. Put the credentials in the environment variables DS3_ACCESS_KEY and DS3_SECRET_KEY. The blackpearl support requires enough temporary drive space to store the largest file being uploaded or 1 GB, whichever is larger. By default the system temp file directory is used. To change this, give an alternate directory in the DS3_TEMPDIR environment variable.

Sentry

Bendo can optionally send error messages to the Sentry service. Enable it by setting the environment variables SENTRY_DSN, SENTRY_RELEASE, and SENTRY_ENVIRONMENT.

Copy-On-Write

It is possible for one Bendo server to pull content from a second Bendo server. In this way, the first Bendo server will appear to have all the content the second one has, but any writes or changes to the data are kept only in the first one. The transfer of data happens in the background, and is not noticeable to any clients. The ability is only a proof-of-concept now, and entire bundle files are transferred. If the Copy-on-Write ability is useful, the code should be rewritten so that only individual blobs are transferred between the two Bendo servers.

Enable COW mode by setting the http address for the second Bendo server in the configuration file. If the second Bendo server is protected by a token, also give an access token.

CowHost = "http://bendo.example.com:14000"
CowToken = "1234567890"

The second Bendo server supports the copying by default and does not need to be configured in any way.

Deployment in Production

TBD

Codebuild and the Docker buildimage container

You can configure codebuild to build RPM images using a docker image to do the compiling. The Dockerfile is docker/buildimage/Dockerfile. You can rebuild it locally using make buildimage in the root of the repository.

Update the container image in Docker Hub by running make upload-buildimage in the root of the repository.

Contributions

Structure imports like:

import (
    // standard library packages

    // other external packages

    // ndlib packages
)

Before committing, run go fmt on the repository. We also use go vet and golint occasionally, but for now they are not required on each check-in.

Releasing New Versions

  1. Add the new version to the CHANGELOG.md along with a summary of the changes since the previous release. (A high level summary with attention paid to any gotchas when upgrading).
  2. Commit the edits
  3. Tag the git repo with the new version using git tag -a v2016.1 -m 'Tag v2016.1' where each occurrence of "v2016.1" is replaced with the version number. I've been prefixing the git tags for versions with a lower case "v".

TODO

  • Update README to have
    • list of procedures for development, testing
    • list of any external tooling
    • directions on how to set up a development environment
    • directions on how to set up a remote copy-on-write
    • information on user tokens

Owner

  • Name: Don Brower
  • Login: dbrower
  • Kind: user
  • Company: University of Notre Dame

GitHub Events

Total
  • Delete event: 2
  • Issue comment event: 2
  • Public event: 1
  • Pull request event: 3
  • Create event: 2
Last Year
  • Delete event: 2
  • Issue comment event: 2
  • Public event: 1
  • Pull request event: 3
  • Create event: 2

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 3
  • Total pull requests: 97
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 12 days
  • Total issue authors: 2
  • Total pull request authors: 8
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.39
  • Merged pull requests: 87
  • Bot issues: 0
  • Bot pull requests: 7
Past Year
  • Issues: 0
  • Pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 4 months
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.67
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 3
Top Authors
Issue Authors
  • msuhovec (2)
  • ialford (1)
Pull Request Authors
  • dbrower (70)
  • msuhovec (9)
  • dependabot[bot] (9)
  • jeremyf (4)
  • ialford (4)
  • ssummer3 (1)
  • hanstra (1)
  • seansummers (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (9) go (3)

Dependencies

.github/workflows/bendo-ci.yml actions
  • actions/checkout v2 composite
  • actions/setup-go v2 composite
docker/buildimage/Dockerfile docker
  • centos ${CENTOS_VERSION} build
docker/runimage/Dockerfile docker
  • centos ${CENTOS_VERSION} build
Gopkg.lock go
  • github.com/BurntSushi/migration c45b897f13350786ccaf2b7403b92b1c7ad85844
  • github.com/BurntSushi/toml bbd5bb678321a0d6e58f1099321dfa73391c1b6f
  • github.com/antonholmquist/jason c23cef7eaa75a6a5b8810120e167bd590d8fd2ab
  • github.com/aws/aws-sdk-go 45f40fbbeba8a5dee288025ce32ee24bc643ba0a
  • github.com/certifi/gocertifi deb3ae2ef2610fde3330947281941c562861188b
  • github.com/cznic/b a26611c4d92dc9181cdb5e8d67fb712700fcd4a3
  • github.com/cznic/db 661fca3aa13d7c6a866498ee35d2ccba2c7b5a6f
  • github.com/cznic/file 666493a488b5fc9d1e871b1a8e03fa962f6a9fa5
  • github.com/cznic/fileutil 4d67cfea8c87a5ea35f02b7716ffe87753abb64a
  • github.com/cznic/golex 9c343928389cc59a56eb4494e0b781f1a9145ec0
  • github.com/cznic/internal 3279554c546e0f1fa7eac9bb4d45cea926d141ea
  • github.com/cznic/lldb bea8611dd5c407f3c5eab9f9c68e887a27dc6f0e
  • github.com/cznic/mathutil 297441e035482346a960053c9ea29669b13e1025
  • github.com/cznic/ql b60735abf8a0c153d60b21634d650fbaa9e9a288
  • github.com/cznic/sortutil f5f958428db822072e84a845d95c490468f5e96d
  • github.com/cznic/strutil 275e9034453778034cf2718cec00c840f5a34299
  • github.com/cznic/zappy ca47d358d4b1fee03c89617b25fc2d7bac45a9a6
  • github.com/edsrzf/mmap-go 188cc3b666ba704534fa4f96e9e61f21f1e1ba7c
  • github.com/facebookgo/clock 600d898af40aa09a7a93ecb9265d87b0504b6f03
  • github.com/facebookgo/httpdown 5979d39b15c26299dc282711b0d65b113daccea6
  • github.com/facebookgo/stats 1b76add642e42c6ffba7211ad7b3939ce654526e
  • github.com/getsentry/raven-go f04e7487e9a6b9d9837d52743fb5f40576c56411
  • github.com/go-sql-driver/mysql 72cd26f257d44c1114970e19afddcd812016007e
  • github.com/jmespath/go-jmespath c2b33e84
  • github.com/julienschmidt/httprouter 4eec211fa4e8df74ed978dc5681612131854144f
  • github.com/pkg/errors ba968bfe8b2f7e042a574c888954fccecfa385b4
  • github.com/remyoudompheng/bigfft 6a916e37a237384e18eefa3270c09247db1ecf50
  • golang.org/x/sys b09406accb4736d857a32bf9444cd7edae2ffa79
  • google.golang.org/appengine 971852bfffca25b069c31162ae8f247a3dba083b
Gopkg.toml go
  • github.com/BurntSushi/toml ^0.2.0
  • github.com/cznic/ql *
  • github.com/go-sql-driver/mysql ^1.3.0
go.mod go
  • github.com/BurntSushi/migration v0.0.0-20140125045755-c45b897f1335
  • github.com/BurntSushi/toml v0.2.0
  • github.com/SpectraLogic/ds3_go_sdk v5.2.0+incompatible
  • github.com/antonholmquist/jason v1.0.0
  • github.com/aws/aws-sdk-go v1.29.3
  • github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261
  • github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d
  • github.com/cznic/db v0.0.0-20181122101858-661fca3aa13d
  • github.com/cznic/file v0.0.0-20181122101858-666493a488b5
  • github.com/cznic/fileutil v0.0.0-20181122101858-4d67cfea8c87
  • github.com/cznic/golex v0.0.0-20181122101858-9c343928389c
  • github.com/cznic/internal v0.0.0-20181122101858-3279554c546e
  • github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548
  • github.com/cznic/ql v1.2.1-0.20181122101857-b60735abf8a0
  • github.com/cznic/sortutil v0.0.0-20181122101858-f5f958428db8
  • github.com/cznic/strutil v0.0.0-20181122101858-275e90344537
  • github.com/cznic/zappy v0.0.0-20181122101859-ca47d358d4b1
  • github.com/edsrzf/mmap-go v1.0.0
  • github.com/getsentry/raven-go v0.2.0
  • github.com/go-sql-driver/mysql v1.5.0
  • github.com/julienschmidt/httprouter v1.3.0
  • github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237
  • golang.org/x/net v0.0.0-20201021035429-f5854403a974
  • golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
go.sum go
  • github.com/BurntSushi/migration v0.0.0-20140125045755-c45b897f1335
  • github.com/BurntSushi/toml v0.2.0
  • github.com/SpectraLogic/ds3_go_sdk v5.2.0+incompatible
  • github.com/antonholmquist/jason v1.0.0
  • github.com/aws/aws-sdk-go v1.29.3
  • github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261
  • github.com/cznic/b v0.0.0-20180115125044-35e9bbe41f07
  • github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d
  • github.com/cznic/db v0.0.0-20181122101858-661fca3aa13d
  • github.com/cznic/file v0.0.0-20181122101858-666493a488b5
  • github.com/cznic/fileutil v0.0.0-20180108211300-6a051e75936f
  • github.com/cznic/fileutil v0.0.0-20181122101858-4d67cfea8c87
  • github.com/cznic/golex v0.0.0-20170803123110-4ab7c5e190e4
  • github.com/cznic/golex v0.0.0-20181122101858-9c343928389c
  • github.com/cznic/internal v0.0.0-20180608152220-f44710a21d00
  • github.com/cznic/internal v0.0.0-20181122101858-3279554c546e
  • github.com/cznic/lldb v1.1.0
  • github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369
  • github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548
  • github.com/cznic/ql v1.2.1-0.20181122101857-b60735abf8a0
  • github.com/cznic/sortutil v0.0.0-20150617083342-4c7342852e65
  • github.com/cznic/sortutil v0.0.0-20181122101858-f5f958428db8
  • github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186
  • github.com/cznic/strutil v0.0.0-20181122101858-275e90344537
  • github.com/cznic/zappy v0.0.0-20160723133515-2533cb5b45cc
  • github.com/cznic/zappy v0.0.0-20181122101859-ca47d358d4b1
  • github.com/davecgh/go-spew v1.1.0
  • github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712
  • github.com/edsrzf/mmap-go v1.0.0
  • github.com/getsentry/raven-go v0.2.0
  • github.com/go-sql-driver/mysql v1.5.0
  • github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db
  • github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
  • github.com/julienschmidt/httprouter v1.3.0
  • github.com/pkg/errors v0.9.1
  • github.com/pmezard/go-difflib v1.0.0
  • github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237
  • github.com/stretchr/objx v0.1.0
  • github.com/stretchr/testify v1.4.0
  • golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
  • golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
  • golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3
  • golang.org/x/net v0.0.0-20200202094626-16171245cfb2
  • golang.org/x/net v0.0.0-20201021035429-f5854403a974
  • golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
  • golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
  • golang.org/x/sys v0.0.0-20190412213103-97732733099d
  • golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f
  • golang.org/x/text v0.3.0
  • golang.org/x/text v0.3.3
  • golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e
  • gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
  • gopkg.in/yaml.v2 v2.2.2