Created
February 22, 2017 12:02
-
-
Save mattf/110256167bc2d8d9dc1c725cddb60af2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: 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