Mode
This gem provides command line tools for interacting with the Mode Analytics APIs.
To learn how to install and use this gem please visit Mode Analytics Help
Installing Mode
tl;dr
\curl -sSL https://get.rvm.io | bash -s stable && source ~/.rvm/scripts/rvm
rvm install jruby-1.7.9 && rvm default use jruby-1.7.9@mode --create
gem install mode --no-ri --no-rdoc
Step-by-step
Install RVM
\curl -sSL https://get.rvm.io | bash -s stable && source ~/.rvm/scripts/rvm
Install JRuby
rvm install jruby-1.7.9 && rvm default use jruby-1.7.9@mode --create
Install Mode
gem install mode --no-ri --no-rdoc
Configuring Mode
mode login
More info here:
http://help.modeanalytics.com/connecting-data-sources/logging-in.html
Adding Data Sources
Mode's configuration lives at ~/.mode/config.yml. Logging in will configure some pieces of this file and adding data sources to it is easy. Here's an example of what your file might look like:
username: besquared
access_token:
token: [API TOKEN]
password: [PASSWORD]
environment: production
data_sources:
mysql-prod:
adapter: jdbc:mysql
host: [HOST]
username: readonly
password: [PASSWORD]
Here's a bit more documentation about the overall configuration
http://help.modeanalytics.com/connecting-data-sources/mode-configuration.html
Verify
mode connect verify
Start
mode connect restart
Appendix: Installing Java
Ubuntu
sudo apt-get update
sudo apt-get install openjdk-7-jdk | yes
Redhat
sudo yum check-update
sudo yum install java-1.7.0-openjdk