-
Notifications
You must be signed in to change notification settings - Fork 5
Getting Started
Tested with Ruby 2.5.1, but I'm currently running Ruby 2.6.1 and Bundler
-
Get the latest version of LEDbelly
git clone https://github.com/ccsd/ledbelly.git
-
Edit
cfg/sqs.yml.exampleand save assqs.yml -
Edit
cfg/database.yml.exampleand save asdatabase.yml -
Edit
Gemfile, choosing (uncomment) the appropriate driver adapter for your database.-
gem tiny_tdsfor MS SQL Server* -
gem mysql2for MySQL -
gem pgfor PostgreSQL* -
gem ruby-oci8for 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" -
-
Run
bundle install -
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
extensionsyou use or create like Live Stream
- Add schemas and manage tables for any
-
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/nullworks.[FAIL] You should set a logfile if you're going to daemonize
-
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
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