Skip to content

Latest commit

 

History

History
71 lines (60 loc) · 1.46 KB

Installation.md

File metadata and controls

71 lines (60 loc) · 1.46 KB

Tools Required:

  1. Ruby 2.7.0
  2. awscli
  3. docker

Steps:

  1. Pull docker images
docker pull pafortin/goaws:latest
docker pull timescale/timescaledb:latest-pg12
  1. Run docker instances of dependent services
docker run --name sqs --network host -dit pafortin/goaws:latest
docker run -d --name db --network host -e POSTGRES_PASSWORD=postgres timescale/timescaledb:latest-pg12
  1. Create SQS queues
aws configure # set random values for access id and secret key, use any valid region.
aws --endpoint-url http://localhost:4100 sqs create-queue --queue-name influencer_id_store
aws --endpoint-url http://localhost:4100 sqs create-queue --queue-name influencer_data_points
  1. Start Mockstagram
cd mockstagram-api-master
npm install
npm start
  1. Setup rails environment
ruby -v # 2.7.0
cd influencer_analytics
bundle install
rake db:create db:migrate
  1. Seed data in SQS
rake sqs:seed:million_influencer_id
  1. Start processor pipeline
rake influencer:processor
  1. Start sink to db pipeline
rake influencer:sink_to_db

Management Commands

  1. Check logs for sqs docker
docker logs --follow --tail 100 <sqs/db>
  1. Connect to docker db using psql
psql -h localhost -U postgres -d postgres # use password provided in docker run command above, default: postgres
  1. Check rails logs
cd influencer_analytics
tail -100f log/development.log # use specific environment name for test and production