• Stars
    star
    178
  • Rank 214,989 (Top 5 %)
  • Language
    Shell
  • Created almost 11 years ago
  • Updated over 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 leader in Next-Generation Customer Data Infrastructure
Scala
6,834
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
546
star
3

iglu

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

snowplow-mini

An easily-deployable, single-instance version of Snowplow
Go
125
star
5

iglu-central

Contains all JSON Schemas, Avros and Thrifts for Iglu Central
Shell
118
star
6

snowplow-android-tracker

Snowplow event tracker for Android. Add analytics to your Android apps and games
Kotlin
109
star
7

aws-lambda-nodejs-example-project

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

scala-maxmind-iplookups

Scala client for MaxMind Geo-IP
Scala
86
star
9

sql-runner

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

snowplow-ios-tracker

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

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
12

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
55
star
13

chrome-snowplow-inspector

Web Extension for debugging Snowplow pixels.
TypeScript
49
star
14

scala-forex

High-performance Scala library for performing exchange rate lookups and currency conversions
Scala
46
star
15

scala-weather

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

snowplow-python-tracker

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

snowplow-s3-loader

Mirrors a Kinesis stream to Amazon S3 using the KCL
Scala
42
star
18

data-models

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

snowplow-php-tracker

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

snowplow-rdb-loader

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

snowplow-react-native-tracker

Snowplow event tracker for react-native apps
TypeScript
31
star
22

stream-collector

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

snowplow-golang-tracker

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

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
25

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
26

snowplow-dotnet-tracker

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

snowplow-ruby-tracker

Snowplow event tracker for Ruby. Add analytics to your Ruby and Rails apps and gems
Ruby
22
star
28

enrich

Snowplow Enrichment jobs and library
Scala
21
star
29

quickstart-examples

Examples of how to automate creating a Snowplow Community Edition pipeline
HCL
21
star
30

snowplow-python-analytics-sdk

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

snowplow-scala-analytics-sdk

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

dataflow-runner

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

snowplow-unity-tracker

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

snowbridge

For replicating streams across clouds, accounts and regions
Go
15
star
35

iglu-example-schema-registry

Example static schema registry for Iglu
15
star
36

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
14
star
37

iglu-server

A RESTful schema registry
Scala
13
star
38

dbt-snowplow-utils

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

kinesis-tee

Unix tee, but for Kinesis streams
Scala
12
star
40

snowplowanalytics.com

The Snowplow website
HTML
12
star
41

dbt-snowplow-fractribution

Snowplow Fractribution (marketing attribution) model for dbt
Python
11
star
42

snowplow-elasticsearch-loader

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

documentation

Snowplow Documentation Website
JavaScript
10
star
44

dbt-snowplow-unified

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

snowplow-tracking-cli

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

snowplow-gtm-server-side-client

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

snowplow-cpp-tracker

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

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
9
star
49

igluctl

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

snowplow-scala-tracker

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

snowplow-looker-demo

LookML for the Snowplow Looker demo
LookML
7
star
52

snowplow-badrows

Scala
7
star
53

release-manager

Uploads zipfiles to Bintray and creates versions
Python
7
star
54

snowplow-rust-tracker

Rust
7
star
55

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
7
star
56

snowplow-arduino-tracker

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

dbt-snowplow-attribution

An incremental dbt package revolving around marketing attribution analysis
PLpgSQL
6
star
58

snowplow-flutter-tracker

Snowplow event tracker for Flutter apps
Dart
5
star
59

schema-ddl

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

iglu-scala-client

Scala client for Iglu schema registry
Scala
5
star
61

snowplow-golang-analytics-sdk

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

iab-spiders-and-robots-java-client

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

snowplow-gtm-server-side-tag

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

beam-enrich

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

snowplow-dotnet-analytics-sdk

C#
4
star
66

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
4
star
67

marketing-attribution-accelerator

A Snowplow accelerator which describes how to do marketing attribution with Snowplow
Shell
4
star
68

snowplow-lua-tracker

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

snowplow-aws-lambda-source

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

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
71

advanced-analytics-web-accelerator

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

dbt-snowplow-normalize

A dbt package to support modelling event data via split tables for use in downstream tools and systems.
Python
3
star
73

mobile-hybrid-apps-accelerator

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

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

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

advanced-analytics-mobile-accelerator

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

scala-util

Reusable Scala code from Snowplow Analytics
Scala
2
star
77

snowplow-server-agent

Server monitoring agent compatible with Snowplow
1
star
78

iglu-scala-core

Core entities for working with Iglu in Scala
Scala
1
star
79

looker-snowplow-mobile

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

stream-enrich

Application reading tracked events from Kafka/Kinesis/NSQ, validating and enriching them and writing them back to Kafka/Kinesis/NSQ
Scala
1
star
81

common-enrich

Library containing the logic to validate and enrich tracked events. Used by Stream Enrich and Beam Enrich
Scala
1
star
82

snowplow-full-demo-lookml

LookML for the full Snowplow Looker demo
LookML
1
star
83

snowplow-ecommerce-tracking-accelerator

Shell
1
star
84

iglu-javascript-client

Browser JavaScript client for Iglu
JavaScript
1
star