An asset reservation and sharing web app
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bellhop-auth-dummy Switch to 0.2.1-dev Jan 17, 2019
bellhop-auth-header Default domain for header auth Jan 18, 2019
bellhop-demo Switch to 0.2.1-dev Jan 17, 2019
bellhop-hook-email Switch to 0.2.1-dev Jan 17, 2019
bellhop-hook-jenkins Switch to 0.2.1-dev Jan 17, 2019
bellhop More delete endpoints! (#40) Feb 11, 2019
.gitignore Initial Commit Dec 5, 2018
.travis.yml
Cargo.lock Cargo Update Feb 7, 2019
Cargo.toml
LICENSE.md Initial Commit Dec 5, 2018
README.md Rename bellhop-bin to bellhop-demo Jan 7, 2019
rustfmt.toml Don't format schema.rs since it's generated Dec 13, 2018

README.md

Bellhop

Bellhop is a web application for reserving different assets, like machines or IP addresses


Introduction

Purpose

Are you part of a team of ten that shares three testing environments? Do you keep a spreadsheet of who's using what IP addresses? Need a way to keep track of who's borrowing which virtual machine?

If you answered yes to any of those questions, Bellhop might be able to help. Bellhop is a super simple asset reservation tool that keeps track of who's using what, until when.

For more information, including a live demo, checkout bellhop.rs.

Project Structure

  • bellhop/ - The core library that implements most of Bellhop's features.
  • bellhop-demo/ - A runnable example that demos adding hooks and starting the server.
  • bellhop-hook-email/ - A hook that sends an email when your lease is expiring.
  • bellhop-hook-jenkins/ - A hook that starts a Jenkins job for each event.
  • bellhop-auth-dummy/ - Authentication plugin that only requires an email address.
  • bellhop-auth-header/ - Authentication plugin that creates users based on a header.

Design

Bellhop is designed to be heavily customized and installed internally. Additional functionality can be added by writing hooks (like bellhop-hook-jenkins.) Authentication is customizable as well, with pluggable modules like bellhop-auth-header.

Usage

At this point, Bellhop is more like a set of crates you assemble yourself into a web application than a web application itself.

A good starting point is getting bellhop-demo running, then using that as an example to build your own deployment.

First Time Setup

The following instructions are roughly tailored for Ubuntu, but should be relatively similar regardless of the platform. Bellhop is regularly compiled for Ubuntu and OS X, and should compile on Windows as well.

Installing Rust

The project requires the latest Rust nightly. You can install that with rustup:

$ curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly

Installing PostgreSQL

Bellhop uses PostgreSQL as its database. Any version greater than or equal to 9.5 should work.

# Install the server and client libraries.
$ sudo apt install postgresql-9.5 postgresql-client libpq-dev

# Create a user, identified with a password.
$ sudo -u postgres createuser -P bellhop

# Create a new database owned by the same user.
$ sudo -u postgres createdb -O bellhop bellhop

Installing Diesel

To perform database migrations, you'll need to install diesel_cli:

$ cargo install diesel_cli --no-default-features --features postgres

Obtain Bellhop

The easiest way to grab all the components is to clone the Bellhop repository:

$ git clone https://github.com/bellhop-rs/bellhop

Perform Migrations

The core application, as well as some hooks, will have database migrations that need to be applied for the application to function.

# Make sure to update this line with the password supplied earlier.
$ export DATABASE_URL=postgres://bellhop:bellhop@localhost/bellhop

# Apply the core application's migrations.
$ cd bellhop
$ diesel migration run

# Apply any hook's migrations.
$ cd ../bellhop-hook-jenkins
$ diesel migration run

Run Bellhop, Finally

To run Bellhop in "demo" mode:

$ cd bellhop-demo
$ cargo run

Note that bellhop-demo doesn't require any kind of passwords to log in. It really isn't suitable for production use without some customization.

License

Bellhop is licensed under:

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Bellhop by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.