A Java implementation of SparkPi using Spring Boot
This application is an example tutorial for the radanalytics.io community. It is intended to be used as a source-to-image application.
You should have access to an OpenShift cluster and be logged in with the
oc
command line tool.
-
Create the necessary infrastructure objects
oc create -f http://radanalytics.io/resources.yaml
-
Launch spring-sparkpi
oc new-app --template oshinko-java-spark-build-dc \ -p APPLICATION_NAME=spring-sparkpi \ -p GIT_URI=https://github.com/radanalyticsio/spring-sparkpi \ -p APP_FILE=SparkPiBoot-0.0.1-SNAPSHOT.jar
-
Expose an external route
oc expose svc/spring-sparkpi
-
Visit the exposed URL with your browser or other HTTP tool, for example:
$ curl http://`oc get routes/spring-sparkpi --template='{{.spec.host}}'` Pi is rouuuughly 3.1335