Public | Automated Build

Last pushed: 22 days ago
Short Description
binnacle.io web application
Full Description

== Binnacle.io

RESTful Multi-channel Push Service

....
/\____/\\\__
\/\____\////\____
\/\__/\__\/\____ \/\___\////\/\\\_/\/\\\_/\\\\___/\\\\_\/\___/\\\\
_\/\\\\__
/\_\/\\////\__\/\\////\_\////////\____/\\//////__\/\___/\\/////\_
\/\\////\__\/\__\/\__\//\__\/\__\//\__/\\\\\__/\____\/\__/\\\\\_ \/\_\/\__\/\__\/\__\/\_\/\__\/\_/\\/////\_\//\____\/\__\//\///////
\/\\\\__\/\_\/\__\/\_\/\__\/\_\//\\\\/\__\///\\\\/\\\\\\//\\\\\ \/////////_\///\///_\///\///\///\////////\//__\////////\/////////__\//////////__
....

Customer Website for Binnacle Distributed Logging and Push Service

Status

image:https://www.codeship.io/projects/4e9c5390-c381-0133-3c8a-5a80e4317151/status?branch=master[CI Status]
image:https://codeclimate.com/repos/55d50f70e30ba05d3b007a50/badges/5b3bfb026da75d239f37/gpa.svg[
"Code Climate",link="https://codeclimate.com/repos/55d50f70e30ba05d3b007a50/feed"]
image:https://codeclimate.com/repos/55d50f70e30ba05d3b007a50/badges/5b3bfb026da75d239f37/coverage.svg[
"Test Coverage",link="https://codeclimate.com/repos/55d50f70e30ba05d3b007a50/coverage"]

Description

The web application powering https://binnacle.io, it's the customer portal/admin/console tool as well as the marketing site/face of the application.

Features

  • Registration
  • Subscription Management
  • Account Management
  • Binnacle App and Binnacle Channel creation and management
  • Dashboard with usage statistics
  • Notifications
  • Analytics (Graphs and Counts)
  • Documentation
  • Widget Documentation

Dependencies

  • Ruby: Version 2.2.2: rvm install ruby-2.2.2 if using RVM
  • Postgres: brew install postgres
  • Bundler: gem install bundler
  • Foreman: gem install foreman

Configuration

Environment variables are required for the app to properly function. Add a .env file to the root of the project with the following contents:

STRIPE_SECRET_KEY=sk_test_DDWQnkQHtzmI4FxRUaxAwvkW
STRIPE_PUBLISHABLE_KEY=pk_test_9zysLUZMwu9o5Wqs5Mjis80U
BINNACLE_ENDPOINT=localhost
BINNACLE_ADMIN_EMAIL=admin@binnacle.io
BINNACLE_SPI_KEY=binnacle_admin
BINNACLE_SPI_SECRET=3iNNaC1e!
BINNACLE_APP=n7f05b76tr4xsc6slstl
BINNACLE_ACCT=bv4sfcz28up6q6bophx4
BINNACLE_API_KEY=vceth4xcwqfoowpz2esi
BINNACLE_API_SECRET=1grttyb8ozbe9axt88ji
BINNACLE_APP_LOG_CHANNEL=icoc0tnol3obe8pas207
BINNACLE_APP_ERR_CHANNEL=id0czm8eryfffcgp875c
BINNACLE_APP_HEROKU_CHANNEL=qhfvkrr2b2d8j5hoctn7
BINNACLE_ENCRYPTED=FALSE
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=0BFEWWAYQN50JC9J32G2
AWS_SECRET_ACCESS_KEY=SPQtmcTQW6RtMoaFrF6N0ZYCkL6EMlfEa9mKcsj3
S3_BUCKET=binnacle
SHOW_RELEASE_RIBBON=true
BINNACLE_RELEASE=Beta
HEROKU_SSO_SALT=3aefd7ca1b3c96c66990c8622644831a
HEROKU_ADDON_ID=binnacle
HEROKU_ADDON_PASSWORD=1900ff5d211451dbaa2c3a5a0a0949b3
SWIFTYPE_URL=https://Kr4g8TN2kPY47epm-YKh:@api.swiftype.com/api/v1
SWIFTYPE_API_KEY=Kr4g8TN2kPY47epm-YKh
SWIFTYPE_ENGINE_SLUG=engine
SWIFTYPE_ENGINE_KEY=ZcKrCmoZhMZEqTVEasY8
TWITTER_APP_ID=7mFQnHPLcZAhK8GLnKqiCZm04
TWITTER_APP_SECRET=fC6B9Q6U1b8MhORX4y8moFJIlFr8OZUnO5pcurm8Z3HfkszlOF
SLACK_APP_ID=2179404659.19122051472
SLACK_APP_SECRET=b546ea6e1e4b4e2d59b20ae9ef2b019a
GITHUB_KEY=7ee3ab1d6a7e57747eaa
GITHUB_SECRET=1a30797bba674f98998e622dc87182f8f46a235d

Bundle

Change directories out of the application and back to activate the RVM gemset:

cd ..
cd binnacle-io

Then run the bundle command:

bundle install

Database Initialization

With a clean slate environment, you'll need to create, migrate and seed the database:

rake db:create:all
rake db:migrate

Seed the engine with the Admin Publisher

The BINNACLE_SPI_KEY and BINNACLE_SPI_SECRET is how binnacle-io authenticates
with binnacle-engine.
A rake task is provided to generate the CQL statement to create the admin publisher:

rake binnacle:admin_publisher_seeds

Which generates a CQL INSERT statement need to be executed against your C* binnacle keyspace:

      INSERT INTO binnacle.publishers (
        account_id,
        app_id,
        name,
        api_key,
        api_secret,
        created_at,
        active,
        publisher_type
      )
      VALUES (
        '*', '*', 'admin', 'binnacle_admin', '$2a$10$IfGjVgmBhYDCch142PZsx.NsWc4QWS09vdHubGkL/t.fwx4EYfhLa', '2016-04-29T14:58:52-07:00', true, 'spi'
      );

Copy and paste into the CQL shell:

cqlsh> INSERT INTO binnacle.publishers (
   ...         account_id,
   ...         app_id,
   ...         name,
   ...         api_key,
   ...         api_secret,
   ...         created_at,
   ...         active,
   ...         publisher_type
   ...       )
   ...       VALUES (
   ...         '*', '*', 'admin', 'binnacle_admin', '$2a$10$sW0Ifb9Xk2MzBxYEeFZ8NeXCHbtdaARN5jbn04KuKRkk1PJXRUj2a', '2016-04-29T15:36:43-07:00', true, 'spi'
   ...       );

Verify that the entry was created:

cqlsh> select * from  binnacle.publishers;

 api_key        | created_at                      | account_id | active | api_secret                                                   | app_id | name  | publisher_type
----------------+---------------------------------+------------+--------+--------------------------------------------------------------+--------+-------+----------------
 binnacle_admin | 2016-04-29 22:36:43.000000+0000 |          * |   True | $2a$10$sW0Ifb9Xk2MzBxYEeFZ8NeXCHbtdaARN5jbn04KuKRkk1PJXRUj2a |      * | admin |            spi

(1 rows)

Seeding the Database

Run the seeds:

rake db:seed

Launch the Application

Now you can launch the application with:

foreman start

Binnacle IO will be available at http://localhost:5000

Staging notes

To run a 'staging' environment, which is just a production environment with a
basic-auth front, to prevent 'outside' access you'll need to add an ENV var
called STAGING_AUTH with the required creds:

export STAGING_AUTH="user:password"

Reference: https://coderwall.com/p/cgmksa/restrict-access-to-your-rails-staging-environment

You can set multiple credentials too.

Docker Pull Command
Owner
binnacleio
Source Repository

Comments (0)