Skip to content

Instantly share code, notes, and snippets.

@mattf
Created February 22, 2017 12:02
Show Gist options
  • Save mattf/110256167bc2d8d9dc1c725cddb60af2 to your computer and use it in GitHub Desktop.
Save mattf/110256167bc2d8d9dc1c725cddb60af2 to your computer and use it in GitHub Desktop.
: Start up an OpenShift Origin cluster locally
oc cluster up
: Install Oshinko components
oc create -f http://radanalytics.io/resources.yaml
: Install Apache Kafka for OpenShift components
oc create -f https://raw.githubusercontent.com/mattf/openshift-kafka/master/resources.yaml
: Launch an Apache Kafka instance, it is 1-pod, not replicated, not persistent, just-enough kafka
oc new-app apache-kafka
: Launch an Apache Kafka producer that writes words to a topic
oc new-app openshift/python-27-centos7~https://github.com/mattf/word-fountain -e SERVERS=apache-kafka:9092
: Launch an Apache Spark app that processes an Apache Kafka topic and
: presents a web ui
oc new-app --template=oshinko-pyspark-build-dc \
-p GIT_URI=https://github.com/mattf/grafzahl \
-e SERVERS=apache-kafka:9092 \
-e SPARK_OPTIONS='--packages org.apache.spark:spark-sql-kafka-0-10_2.11:2.1.0' -lapp=grafzahl
: Expose the web ui
oc create service clusterip grafzahl --tcp=8080
oc expose svc/grafzahl
: Connect to the web ui at...
oc get route/grafzahl --template 'http://{{.spec.host}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment