• Stars
    star
    175
  • Rank 210,188 (Top 5 %)
  • Language
    Shell
  • Created over 10 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Ansible playbooks to install common platforms and tools (e.g. JVM, Ruby, Postgres etc.)

Snowplow Ansible Playbooks

Ansible playbooks to install common tools, including:

  • The JVM ecosystem
  • Ruby
  • Postgres

Currently these are all used to configure Vagrant VMs (specifically dev-environment) to hack on specific parts of the Snowplow stack. Going forwards, we plan to extend the playbooks to also manage server environments at Snowplow Analytics.

We have tried to write each playbook in a generic way, so that this may be a useful resource if you want to set up similar development environments that are not related to Snowplow specifically.

Repo structure

Plays to install individual bundles of software e.g. Ruby / RVM, Java, Scala, SBT, Thrift, NodeJS etc. have each been bundled into separate roles.

Those roles are then combined into larger playbooks that are saved in the project root directory. For example, the snowplow-batch-pipeline.yml runs the base, Java, Scala, SBT and Ruby / RVM roles required to enable development on the Snowplow Hadoop-based data pipeline.

This structure makes it simple to compose new playbooks out of the roles. For example, to create a playbook that installs Ruby / RVM and PostgreSQL, we'd create a new playbook file e.g. ruby-postgres.yml with the following contents:

---
- hosts: vagrant
  remote_user: vagrant
  roles:
    - base
    - ruby-rvm
    - postgres

Running the playbooks to install packages on local machine (e.g. Vagrant VM)

Once you've SSHed into Vagrant,

ansible-playbook boto.yml -i /vagrant/home/ansible/ansible_hosts --connection=local

Note you can update the reference to the hosts file (/vagrant/home/ansible/ansible_hosts) to point at any file on the VM with the following contents:

[vagrant]
127.0.0.1:2222

Installing specific versions of different packages e.g. Postgres

We are moving to making it possible to decide, at run time, what version of each package you wish to install. This has been implemented with the Postgres playbook, for example.

By default, running the Postgres playbook will install version 8.4. (That default is specified in ansible-playbooks/roles/postgres/defaults/main.yml).

If instead you'd like to install Postgres 9.3, simply execute:

ansible-playbook /vagrant/ansible-playbooks/postgres.yml -i /vagrant/home/ansible/ansible_hosts --connection=local --extra-vars "postgres_version=9.3"

For more information on roles in Ansible playbooks, consult the Ansible documentation

Running the playbooks against a remote server (e.g. on EC2)

To use the different roles in this repo to install the applications on a remote server e.g. on EC2:

  1. Update your hosts / inventory file with details of the server you wish to install the apps on
  2. Create a new playbook pointing at the appropriate host in your inventory file, and set to use the appropriate user
  3. Run it! Note that in general, we add the ---ask-sudo-pass flag,

For example, to install any of the applications to a box called 'snowplow-external-server-1', make sure that the ~/.ssh/config file contains something like the following:

...
Host snowplow-external-server-1
  Hostname ec2-11-222-333-4444.compute-1.amazonaws.com
  User username_with_sudo_permissions
  IdentityFile "~/.ssh/id_rsa"
  Port 22
  ForwardAgent yes
 ...

Then Update the hosts file:

[snowplow-external-server-1]
snowplow-external-server-1

Then create a playbook like the following:

- hosts: snowplow-external-server-1
  remote_user: username_with_sudo_permissions
  
  roles:
   - role: oracle-java 

A note on RStudio setup

RStudio uses PAM to do user management. Once you've run the RStudio Server playbook, create a new user to log in with:

$ sudo adduser rstudio

Assign that user a password. On your host machine, you'll then be able to log in (e.g. to localhost:8788) with the credentials you just created on the Ubuntu guest.

Copyright and license

Snowplow Ansible Playbooks is copyright 2014-2017 Snowplow Analytics Ltd.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

snowplow

The enterprise-grade behavioral data engine (web, mobile, server-side, webhooks), running cloud-natively on AWS and GCP
Scala
6,684
star
2

snowplow-javascript-tracker

Snowplow event tracker for client-side and server-side JavaScript. Add analytics to your websites, web apps and servers.
TypeScript
531
star
3

factotum

A system to programmatically run data pipelines
Rust
217
star
4

iglu

Iglu is a machine-readable, open-source schema repository for JSON Schema from the team at Snowplow
Shell
205
star
5

schema-guru

JSONs -> JSON Schema
Scala
150
star
6

snowplow-mini

An easily-deployable, single-instance version of Snowplow
Go
120
star
7

spark-example-project

A Spark WordCountJob example as a standalone SBT project with Specs2 tests, runnable on Amazon EMR
Scala
118
star
8

iglu-central

Contains all JSON Schemas, Avros and Thrifts for Iglu Central
Shell
112
star
9

snowplow-android-tracker

Snowplow event tracker for Android. Add analytics to your Android apps and games
Kotlin
104
star
10

aws-lambda-nodejs-example-project

An AWS Lambda function in Node.js reading events from Amazon Kinesis and writing event counts to DynamoDB
JavaScript
101
star
11

spark-streaming-example-project

A Spark Streaming job reading events from Amazon Kinesis and writing event counts to DynamoDB
Scala
94
star
12

scala-maxmind-iplookups

Scala client for MaxMind Geo-IP
Scala
86
star
13

scalding-example-project

The Scalding WordCountJob example as a standalone SBT project with Specs2 tests, runnable on Amazon EMR
Scala
82
star
14

sql-runner

Run templatable playbooks of SQL scripts in series and parallel on Redshift, PostgreSQL, BigQuery and Snowflake
Go
79
star
15

snowplow-ios-tracker

Snowplow event tracker for Swift and Objective-C. Add analytics to your iOS, macOS, tvOS and watchOS apps and games
Swift
76
star
16

snowplow-docker

Docker images for Snowplow, Iglu and associated projects
Dockerfile
61
star
17

snowplow-web-data-model

SQL data model for working with Snowplow web data. Supports Redshift and Looker. Snowflake and BigQuery coming soon
LookML
61
star
18

aws-lambda-scala-example-project

An AWS Lambda function in Scala reading events from Amazon Kinesis and writing event counts to DynamoDB
Scala
57
star
19

chrome-snowplow-inspector

Web Extension for debugging Snowplow pixels.
TypeScript
49
star
20

dbt-snowplow-web

A fully incremental model, that transforms raw web event data generated by the Snowplow JavaScript tracker into a series of derived tables of varying levels of aggregation.
Shell
47
star
21

scala-forex

High-performance Scala library for performing exchange rate lookups and currency conversions
Scala
45
star
22

scala-weather

High-performance Scala library for looking up the weather
Scala
45
star
23

snowplow-python-tracker

Snowplow event tracker for Python. Add analytics to your Python and Django apps, webapps and games
Python
42
star
24

snowplow-s3-loader

Mirrors a Kinesis stream to Amazon S3 using the KCL
Scala
41
star
25

data-models

⚠️ MAINTENANCE-ONLY MODE: Snowplow maintained SQL data models for working with Snowplow web and mobile behavioral data.
PLpgSQL
41
star
26

snowplow-php-tracker

Snowplow event tracker for PHP. Add analytics into your PHP apps and scripts
PHP
34
star
27

snowplow-rdb-loader

Stores Snowplow enriched events in Redshift, Snowflake and Databricks
Scala
31
star
28

snowplow-react-native-tracker

Snowplow event tracker for react-native apps
TypeScript
30
star
29

google-cloud-dataflow-example-project

Example stream processing job, written in Scala with Apache Beam, for Google Cloud Dataflow
Scala
29
star
30

stream-collector

Collector for cloud-native web, mobile and event analytics, running on AWS and GCP
Scala
26
star
31

snowplow-golang-tracker

Snowplow event tracker for Golang. Add analytics to your Go apps and servers
Go
25
star
32

snowplow-nodejs-tracker

Snowplow event tracker for Node.js. Add analytics to your JavaScript apps, node-webkit projects and Node.js servers
TypeScript
24
star
33

snowplow-java-tracker

Snowplow event tracker for Java. Add analytics to your Java desktop and server apps, servlets and games. (See also: snowplow-android-tracker)
Java
24
star
34

kinesis-example-scala-consumer

Example Scala/SBT event consumer for Amazon Kinesis
Scala
22
star
35

kinesis-example-scala-producer

Example Scala/SBT event producer for Amazon Kinesis
Scala
21
star
36

snowplow-dotnet-tracker

Snowplow event tracker for .NET. Add analytics to your ASP.NET, C#, F# and Visual Basic apps, servers and games
C#
21
star
37

snowplow-python-analytics-sdk

Python SDK for working with Snowplow enriched events in Spark, AWS Lambda et al.
Python
21
star
38

snowplow-ruby-tracker

Snowplow event tracker for Ruby. Add analytics to your Ruby and Rails apps and gems
Ruby
21
star
39

enrich

Snowplow Enrichment jobs and library
Scala
20
star
40

snowplow-scala-analytics-sdk

Scala SDK for working with Snowplow enriched events in Spark, AWS Lambda, Flink et al.
Scala
20
star
41

quickstart-examples

Examples of how to automate creating a Snowplow Community Edition pipeline
HCL
19
star
42

dataflow-runner

Run templatable playbooks of Hadoop/Spark/et al jobs on Amazon EMR
Go
19
star
43

cloudfront-log-deserializer

A Hive Deserializer for CloudFront access logs (supports download distribution files only)
Java
17
star
44

snowplow-unity-tracker

Snowplow event tracker for Unity. Add analytics to your Unity games and apps
C#
16
star
45

iglu-example-schema-registry

Example static schema registry for Iglu
15
star
46

avalanche

Load testing for event analytics platforms (Snowplow, more coming soon)
Scala
13
star
47

kinesis-tee

Unix tee, but for Kinesis streams
Scala
12
star
48

iglu-server

A RESTful schema registry
Scala
12
star
49

snowplowanalytics.com

The Snowplow website
HTML
12
star
50

snowbridge

For replicating streams across clouds, accounts and regions
Go
12
star
51

documentation

Snowplow Documentation Website
JavaScript
11
star
52

dbt-snowplow-mobile

A fully incremental model, that transforms raw mobile event data generated by the Snowplow mobile trackers into a series of derived tables of varying levels of aggregation.
Shell
11
star
53

dev-environment

Vagrant-based Snowplow development environment with Ansible playbooks to install common tools
Shell
11
star
54

snowplow-elasticsearch-loader

Writes Snowplow enriched events from Kinesis to Elasticsearch
Scala
11
star
55

factotum-server

Rust
10
star
56

dbt-snowplow-fractribution

Snowplow Fractribution (marketing attribution) model for dbt
Python
9
star
57

dbt-snowplow-utils

Snowplow utility functions to be used in conjunction with the snowplow-web dbt package.
PLpgSQL
9
star
58

r-data-science-environment

VM with complete R (RStudio) environment
Shell
9
star
59

snowplow-tracking-cli

Command-line app for tracking Snowplow events. Add analytics to your shell scripts and terminal sessions
Go
8
star
60

snowplow-cpp-tracker

Snowplow event tracker for C++. Add analytics to your C++ applications, games and servers
C++
8
star
61

igluctl

A command-line tool for working with Iglu schema registries
Scala
8
star
62

snowplow-scala-tracker

Snowplow event tracker for Scala. Add analytics to your Scala, Akka and Play apps and servers
Scala
8
star
63

snowplow-badrows

Scala
7
star
64

release-manager

Uploads zipfiles to Bintray and creates versions
Python
7
star
65

snowplow-gtm-server-side-client

A Google Tag Manager Server-side Client template for collecting events using the Snowplow JavaScript Tracker
Smarty
7
star
66

snowplow-rust-tracker

Rust
7
star
67

snowplow-arduino-tracker

Snowplow event tracker for Arduino. Add analytics to sketches on IP-connected Arduino boards
C++
7
star
68

dbt-snowplow-media-player

A fully incremental model, that transforms media player event data generated by the Snowplow JavaScript tracker into derived tables for easier querying
Shell
6
star
69

dbt-snowplow-ecommerce

A fully incremental model, that transforms raw ecommerce event data generated by the Snowplow JavaScript tracker into a series of derived tables representing various ecommerce data objects.
Shell
6
star
70

snowplow-looker-demo

LookML for the Snowplow Looker demo
LookML
5
star
71

snowplow-omniture-ingest

Ingests Omniture data (exported as log files) into SnowPlow for more involved analysis
5
star
72

schema-ddl

ASTs and generators for producing various DDL and Schema formats
Scala
5
star
73

iglu-scala-client

Scala client for Iglu schema registry
Scala
5
star
74

iab-spiders-and-robots-java-client

Java 8+ client library for the IAB and ABC International Spiders and Robots list
Java
5
star
75

samza-scala-example-project

An Apache Samza stream processing job written in Scala
Scala
5
star
76

snowplow-dotnet-analytics-sdk

C#
4
star
77

beam-enrich

Dataflow job reading tracked events from PubSub, validating and enriching them and writing them back to PubSub
Scala
4
star
78

looker-snowplow-web

A LookML block, that uses data from the Snowplow JavaScript tracker and Web Data Model derived tables and makes it available for exploration in Looker.
LookML
4
star
79

snowplow-aws-lambda-source

Sends Amazon S3 object operations into Snowplow, implemented as an AWS Lambda
4
star
80

snowplow-gtm-custom-template

GTM Custom Template for the Snowplow JavaScript Tracker (v2)
Smarty
4
star
81

snowplow-golang-analytics-sdk

Golang Analytics SDK for working with Snowplow enriched events in cloud functions and other Go applications.
Go
4
star
82

snowplow-gtm-server-side-tag

A Google Tag Manager Server-side Tag template for sending events to a Snowplow Collector
Smarty
4
star
83

snowplow-actionscript3-tracker

Snowplow event tracker for ActionScript 3.0. Add analytics to your Flash Player 9+, Flash Lite 4 and AIR games, apps and widgets
ActionScript
4
star
84

iglu-ruby-client

Ruby and JRuby client for Iglu
Ruby
3
star
85

snowplow-gtm-server-side-amplitude-tag

A Google Tag Manager Server-side Amplitude Tag template for send events to the Amplitude HTTP API v2
Smarty
3
star
86

marketing-attribution-accelerator

A Snowplow accelerator which describes how to do marketing attribution with Snowplow
Shell
3
star
87

spark-data-science-environment

VM with Spark ready-to-go
Shell
3
star
88

snowplow-lua-tracker

Snowplow event tracker for Lua. Add analytics to your Lua apps and Lua-scripted games
Lua
3
star
89

neo4j-data-science-environment

VM with Neo4j installed
Shell
3
star
90

sp-js-assets

Contains all of the Snowplow JavaScript Tracker assets.
JavaScript
3
star
91

scala-serf-client

Minimal wrapper around https://github.com/tv2norge/java-serf-client
Scala
3
star
92

advanced-analytics-web-accelerator

Tutorial and visualisations showing how to instrument web analytics with Snowplow
Shell
3
star
93

python-data-science-environment

Shell
3
star
94

composable-cdp-with-predictive-ml-modeling-accelerator

A composable CDP accelerator using Snowplow, Databricks & Hightouch
HTML
3
star
95

snowplow-scala-project.g8

Shell
3
star
96

mobile-hybrid-apps-accelerator

Tutorial and demo apps showing how to instrument hybrid mobile apps with Snowplow tracking
Shell
3
star
97

hive-example-udf

Java
3
star
98

makefile-rs

WIP Rust crate for parsing extremely simple Makefiles
Rust
2
star
99

advanced-analytics-mobile-accelerator

Tutorial and visualisations showing how to instrument mobile analytics with Snowplow
Shell
2
star
100

scala-util

Reusable Scala code from Snowplow Analytics
Scala
2
star