From 8854b470444f0671e032aa742da2a89327143090 Mon Sep 17 00:00:00 2001 From: Trevor McKay Date: Tue, 20 Sep 2016 09:23:14 -0400 Subject: [PATCH] Remove the openshift-spark-py27-sti subdirectory Rather than use a generated Dockerfile to create an openshift spark image based on python s2i as a base for other pyspark images, the spark install will be duplicated in images that need it. --- openshift-spark-py27-sti/Makefile | 50 ------------------------------ openshift-spark-py27-sti/README.md | 34 -------------------- 2 files changed, 84 deletions(-) delete mode 100644 openshift-spark-py27-sti/Makefile delete mode 100644 openshift-spark-py27-sti/README.md diff --git a/openshift-spark-py27-sti/Makefile b/openshift-spark-py27-sti/Makefile deleted file mode 100644 index 70a362f..0000000 --- a/openshift-spark-py27-sti/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -BASE_IMAGE=centos/python-27-centos7:latest -LOCAL_IMAGE=openshift-spark-py27-sti - -# If you are going to push the built image to a registry -# using the "push" make target then you should replace -# "project" with an appropriate path for your registry and/or project -SPARK_IMAGE=project/openshift-spark-py27-sti - -.PHONY: build clean push create destroy artifacts clean-artifacts clean-dockerfile clean-scripts clean-template - -build: - docker build -t $(LOCAL_IMAGE) . - -clean: - - docker rmi $(LOCAL_IMAGE) - -push: build - docker tag -f $(LOCAL_IMAGE) $(SPARK_IMAGE) - docker push $(SPARK_IMAGE) - -create: template.yaml - oc process -f template.yaml -v SPARK_IMAGE=$(SPARK_IMAGE) > template.active - oc create -f template.active - -destroy: template.active - oc delete -f template.active - rm template.active - -artifacts: Dockerfile scripts template.yaml - -Dockerfile: - cp ../Dockerfile . - sed -i '/FROM/c \FROM ${BASE_IMAGE}' Dockerfile - -scripts: - cp -r ../scripts . - -template.yaml: - cp ../template.yaml . - -clean-artifacts: clean-dockerfile clean-scripts clean-template - -clean-dockerfile: Dockerfile - rm Dockerfile - -clean-scripts: scripts - rm -r scripts - -clean-template: template.yaml - rm template.yaml diff --git a/openshift-spark-py27-sti/README.md b/openshift-spark-py27-sti/README.md deleted file mode 100644 index 223c243..0000000 --- a/openshift-spark-py27-sti/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# openshift-spark-py27-sti - -The Makefile in this directory builds an openshift-spark image based -on the standard python27 s2i image (centos/python-27-centos7). - -It does this by copying files from the parent directory and modifying -the ``FROM`` field in the local Dockerfile before building. The motivation -is to provide a python s2i builder which has Apache Spark installed -without having to manually maintain the Spark installation commands and -to guarantee that this image and an openshift-spark image built in -the parent directory contain the same version of spark. - -## How to use this Makefile - -The `clean`, `build`, `push`, `create`, and `destroy` targets are analagous -to the targets in the parent directory's Makefile. - -By default the `push` target will tag the image as `project/openshift-spark-py27-sti`, -edit the Makefile and change `SPARK_IAMGE` to control this. - -However, files must be copied from the parent directory before the -image may be built. To do this use `make artifacts`: - -``` - $ make artifacts - $ sudo make push -``` - -To refresh the files copied from the parent directory: - -``` - $ make clean-artifacts - $ make artifacts -``` \ No newline at end of file