Skip to content

Getting Started

Robert Carroll edited this page Sep 6, 2019 · 1 revision

Tested with Ruby 2.5.1, but I'm currently running Ruby 2.6.1 and Bundler

Installation

  1. Get the latest version of LEDbelly

    git clone https://github.com/ccsd/ledbelly.git

Setup

  1. Edit cfg/sqs.yml.example and save as sqs.yml

  2. Edit cfg/database.yml.example and save as database.yml

  3. Edit Gemfile, choosing (uncomment) the appropriate driver adapter for your database.

    • gem tiny_tds for MS SQL Server*
    • gem mysql2 for MySQL
    • gem pg for PostgreSQL*
    • gem ruby-oci8 for Oracle

    For SQL Server, you may need to install and configure freetds first.

    If PostgreSQL is installed on another system, you will need to install libpq first and then install the Ruby GEM 'pg' with options. gem install pg -v '1.0.0' -- --with-opt-dir="/usr/local/opt/libpq"

  4. Run bundle install

  5. Run rake create_tables, evaluate the schema files and run them against your db instance

  • You may choose to use only the Canvas Raw or the Caliper Formats for your database. LEDBelly is available to process either all the time.
    • Add schemas and manage tables for any extensions you use or create like Live Stream
  1. Start LEDbelly, from the directory root

    bundle exec shoryuken -r ./ledbelly -C cfg/sqs.yml -L /dev/null -d

    -d flag daemonizes Shoryuken and detaches the terminal Note, you will get an error if you try to daemonize Shoryuken without logging, so /dev/null works.

    [FAIL] You should set a logfile if you're going to daemonize

  2. Daemonize the Daemon

    Once LEDbelly is installed and working you may want to run it as a service. So that, if it crashes, or disconnects it will retry or restart when the system restarts. There are probably as many ways to do this as operating systems, but I've provided an example of what I'm trying on RHEL in SYSTEMD.md

Other startup options

terminal output without Shoryuken logging

bundle exec shoryuken -r ./ledbelly -C cfg/sqs.yml

terminal output with Shoryuken logging

bundle exec shoryuken -r ./ledbelly -C cfg/sqs.yml -L log/shoryuken.log

Clone this wiki locally