kafka pubnub #5

Supports: trusty

Add to new model

Description

Ingest sample data from PubNub.


Overview

PubNub offers a realtime data streaming service with a publish/subscribe model.
This charm subscribes to a PubNub channel and publishes incoming messages to a
Kafka topic.

Usage

This charm requires Kafka, which requires the Zookeeper distributed
coordination service. Deploy and relate these prerequisites as follows:

juju deploy apache-zookeeper zookeeper
juju deploy apache-kafka kafka
juju add-relation kafka zookeeper

Now add this charm to your environment:

juju deploy kafka-pubnub pubnub
juju add-relation kafka pubnub

Configuration

The default PubNub channel is set to pubnub-market-orders, which is an
artificial stream providing market order data for a fictitious marketplace.
You may set a different channel with the following:

juju set pubnub pubnub_channel='<channel>'

A PubNub subscription key is required to use this charm. The default key is
for demo purposes and works with the default pubnub-market-orders channel.
Set your own key with the following:

juju set pubnub pubnub_key='<your_subscription_key>'

The default Kafka topic where messages are published is set to demo. You
may set a different topic with the following:

juju set pubnub kafka_topic='<topic>'

Starting the service

Prior to starting the producer script, ensure your configured Kafka topic
exists. If needed, you can create a demo topic as follows:

juju action do kafka/0 create-topic topic=demo \
 partitions=1 replication=1
juju action fetch <id>  # <-- id from above command

Once you have a valid Kafka topic, start the producer script:

juju action do pubnub/0 start-producer

You can verify this action has completed successfully with the following:

juju action fetch <id>  # <-- id from above command

Stopping the service

Run the following to stop the PubNub producer:

juju action do pubnub/0 stop-producer

Verify this action has completed successfully with the following:

juju action fetch <id>  # <-- id from above command

Contact Information

Help


Configuration

kafka_topic
(string) The Kafka topic to publish PubNub events to.
demo
pubnub_channel
(string) The PubNub channel to ingest.
pubnub-market-orders
pubnub_key
(string) Your PubNub subscription key. The default value is a demo key that works with the sample 'pubnub-market-orders' channel.
sub-c-4377ab04-f100-11e3-bffd-02ee2ddab7fe
resources_mirror
(string) URL from which to fetch resources (e.g., Hadoop binaries) instead of Launchpad.