Sign inSign up

godatadriven/divolte

By godatadriven

•Updated almost 8 years ago

Docker container containing the Divolte collector

Image
1

620

godatadriven/divolte repository overview

⁠Divolte Base image

Base image with Divolte⁠.

⁠Configuration options

The following environment variables can influence the default configuration:

env vardefaultoptionsdescription
DIVOLTE_HOSTHostname the application binds on
DIVOLTE_PORT8290The port the application runs on
DIVOLTE_USE_XFORWARDED_FORfalsetrue, falseWhether to trust the X-Forwarded-For header HTTP header
DIVOLTE_SERVE_STATIC_RESOURCEStruetrue, falseServe the static testing page
DIVOLTE_HDFS_ENABLEDfalsetrue, falseWrite events in avro format to HDFS
DIVOLTE_HDFS_SINK_SYNC_NR_OF_RECORDS1000Max nr of records before file is synced
DIVOLTE_HDFS_SINK_SYNC_DURATION30 minutesa durationMax duration before file is synced
DIVOLTE_HDFS_SINK_WORKING_DIR/tmp/workingHDFS working directory path
DIVOLTE_HDFS_SINK_PUBLISH_DIR/tmp/publishHDFS publish directory path
DIVOLTE_GFS_ENABLEDfalsetrue, falseWrite events in avro format to GFS
DIVOLTE_KAFKA_ENABLEDtruetrue, falseWrite events in avro format to Kafka
DIVOLTE_KAFKA_BROKER_LISTlocalhost:9092The Kafka bootstrap server list
DIVOLTE_KAFKA_CLIENT_IDdivolte.collectorThe Kafka client id for the producer
DIVOLTE_PARTY_COOKIE_dvpName of the party cookie
DIVOLTE_PARTY_TIMEOUT730 daysValidity of the party cookie
DIVOLTE_SESSION_COOKIE_dvsName of the session cookie
DIVOLTE_SESSION_TIMEOUT30 minutesValidity of the session cookie
DIVOLTE_COOKIE_DOMAIN''The cookie domain for the cookies
DIVOLTE_JAVASCRIPT_NAMEdivolte.jsName of the js file to include in the web application
DIVOLTE_JAVASCRIPT_LOGGINGfalsetrue, falseEnable javascript logging in the console
DIVOLTE_JAVASCRIPT_DEBUGfalsetrue, falseEnable javascript debug logging in the console
DIVOLTE_JAVASCRIPT_AUTO_PAGE_VIEW_EVENTtruetrue, falseGenerate the default page view event on loading the js library
DIVOLTE_KAFKA_TOPICdivolteThe topic where the events are published

⁠Running the container

docker-compose pull
docker-compose --project-name divolte up

⁠Testing

Testing if the image works can be done by using the Kafka console producer/consumer since we named the image we need to add an entry to the /etc/hosts file to connect the name divolte-kafka to the local ip 127.0.0.1:

127.0.0.1       divolte-kafka

Now we can use that hostname (the same as the advertised host) to connect the producer and consumer:

kafka-console-producer --broker-list divolte-kafka:9092 \
  --topic divolte

Sending messages can be done by typeing the following in the console:

message1
message2

To consume this use the following in a separate terminal window:

kafka-console-consumer --bootstrap-server divolte-kafka:9092 \
  --topic divolte \
  --from-beginning

message1
message2

⁠Divolte test page

Open the page http://localhost:8290 in your browser. A pageview event is sent onload. If you click the button a custom event is sent to divolte. If you still have the console consumer running you should see the Avro-encoded message passing by. Something like this:

?ĖԞW?ĖԞW192.168.0.1,http://localhost:8290/??
                                           ??V0:j4it1gyt:k3Ch09eSqfZLxs9si86U8iw_ANxUimkqV0:j4it1gyt:JqUiAcIiYjNv7rpK4GvjUR0a1bxgA4LjD0:1npO4TIYAVmC6Tb2L4Edpf~32KmcMDGNpageView?Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36
                                                            Chrome
                                                                  ChromeGoogle Inc.Browser59.0.3071.104"Personal computeOS X10.12.5(Apple Computer, Inc.
??ԞW??ԞW192.168.0.1,http://localhost:8290/??
                                           ??V0:j4it1gyt:k3Ch09eSqfZLxs9si86U8iw_ANxUimkqV0:j4it1gyt:JqUiAcIiYjNv7rpK4GvjUR0a1bxgA4LjD0:1npO4TIYAVmC6Tb2L4Edpf~32KmcMDGNbannerClick?Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.104 Safari/537.36
                                                               Chrome
                                                                     ChromeGoogle Inc.Browser59.0.3071.104"Personal computeOS X10.12.5(Apple Computer, Inc.

⁠Kerberos

If you want to have a Kerberized Kafka cluster use the docker-compose-kerberos file to spin up the images. You need to provide the projectname divolte for it to work:

docker-compose --project-name divolte -f docker-compose-kerberos.yml up

Tag summary

Content type

Image

Digest

Size

226.5 MB

Last updated

almost 8 years ago

docker pull godatadriven/divolte