Skip to content

Installation guide for local development

Eric Pantera edited this page Jun 6, 2014 · 5 revisions

tl;dr

Edit database.yml to declare your redshift instance, then

$ bundle install
$ rake db:migrate
$ foreman start

snowplow-dashboard is a standard Ruby on Rails project. If Ruby on Rails is new for you - and for your OS - don't worry, this section will help you step by step.

Step 1 - Have a standard Ruby on Rails environment

If you already have installed Ruby on Rails, simply skip this section.

Otherwise, we recommend you to use a ready-to-use Vagrant box shipped with this project.

Step 2 - Checkout the repo

# Clone this repo 
$ git clone git@github.com:viadeo/snowplow-dashboard.git
$ cd snowplow-dashboard

Step 3 - Run the Vagrant virtual machine (Vagrant users only)

If you have a clean Ruby installation on your OS, simply jump to next section.

# Run the Vagrant
# The First time will download the dedian image + configure the VM (about 5 min).
# Next time, 'vagrant up' will start in few second
$ vagrant up

# Access to the vagrant
$ vagrant ssh

# Your local project is mapped under /vagrant
$ cd /vagrant

# Then run all following command here in the Vagrant box.

Press ˆD to jump out of the Vagrant, and type vagrant halt to stop the Vagrant.

Step 4 - Initialize the application

# Install project dependencies
$ bundle install

# Init local embedded database (use only for logging job history)
$ rake db:migrate

Step 5 - Declare your Redshift Database

Edit config/database.yml to declare your Redshift instance

redshift_sandbox:
  adapter: redshift
  host:  # Set here you AWS Redshift host
  port: 5439
  schema_search_path: atomic
  username: read_only # Replace with your Redshift readonly user
  password: # Set your Redshift readonly password
  database: snowplow # Replace with your Redshift database name, typically 'snowplow'
  encoding: utf8
  timeout: 5000
  pool: 5

Step 6 - Start !

# Run project
$ foreman start

# Access to the application in your browser
$ open http://localhost:5000

Are you done with the installation ? You are now ready to Develop your first analytic dashboard in less than 5 min !