Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix README.md
  • Loading branch information
kimoonkim committed Dec 19, 2017
commit 0f8fad9c7a08f1d27692e4beda41df50b973fd31
38 changes: 28 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,26 @@ is subject to change.

Note that currently the integration tests only run with Java 8.

Running the integration tests requires a Spark distribution tarball. It also
needs a local path to the directory that contains `Dockerfile`s.
Running the integration tests requires a Spark distribution package tarball that
contains Spark jars, submission clients, etc. You can download a tarball from
http://spark.apache.org/downloads.html. Or, you can create a distribution from
source code using `make-distribution.sh`. For example:

```
$ git clone [email protected]:apache/spark.git
$ cd spark
$ ./dev/make-distribution.sh --tgz \
-Phadoop-2.7 -Pkubernetes -Pkinesis-asl -Phive -Phive-thriftserver
```

The above command will create a tarball like spark-2.3.0-SNAPSHOT-bin.tgz in the
top-level dir. For more details, see the related section in
[building-spark.md](https://github.com/apache/spark/blob/master/docs/building-spark.md#building-a-runnable-distribution)


The integration tests also need a local path to the directory that
contains `Dockerfile`s. In the main spark repo, the path is
`/spark/resource-managers/kubernetes/docker/src/main/dockerfiles`.

Once you prepare the inputs, the integration tests can be executed with Maven or
your IDE. Note that when running tests from an IDE, the `pre-integration-test`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a line explaining what each phase does?

Expand All @@ -23,17 +41,17 @@ With Maven, the integration test can be run using the following command:

```
$ mvn clean integration-test \
-Dspark-distro-tgz=/tmp/spark-2.3.0-SNAPSHOT-bin-20171216-0c8fca4608.tgz \
-Dspark-dockerfiles-dir=.../spark/resource-managers/kubernetes/docker/src/main/dockerfiles
-Dspark-distro-tgz=spark/spark-2.3.0-SNAPSHOT-bin.tgz \
-Dspark-dockerfiles-dir=spark/resource-managers/kubernetes/docker/src/main/dockerfiles
```

# Running against an arbitrary cluster

In order to run against any cluster, use the following:
```sh
$ mvn clean integration-test \
-Dspark-distro-tgz=/tmp/spark-2.3.0-SNAPSHOT-bin-20171216-0c8fca4608.tgz \
-Dspark-dockerfiles-dir=.../spark/resource-managers/kubernetes/docker/src/main/dockerfiles
-Dspark-distro-tgz=spark/spark-2.3.0-SNAPSHOT-bin.tgz \
-Dspark-dockerfiles-dir=spark/resource-managers/kubernetes/docker/src/main/dockerfiles
-DextraScalaTestArgs="-Dspark.kubernetes.test.master=k8s://https://<master> -Dspark.docker.test.driverImage=<driver-image> -Dspark.docker.test.executorImage=<executor-image>"
```

Expand All @@ -48,8 +66,8 @@ property `spark.docker.test.persistMinikube` to the test process:

```
$ mvn clean integration-test \
-Dspark-distro-tgz=/tmp/spark-2.3.0-SNAPSHOT-bin-20171216-0c8fca4608.tgz \
-Dspark-dockerfiles-dir=.../spark/resource-managers/kubernetes/docker/src/main/dockerfiles
-Dspark-distro-tgz=spark/spark-2.3.0-SNAPSHOT-bin.tgz \
-Dspark-dockerfiles-dir=spark/resource-managers/kubernetes/docker/src/main/dockerfiles
-DextraScalaTestArgs=-Dspark.docker.test.persistMinikube=true
```

Expand All @@ -66,7 +84,7 @@ is an example:

```
$ mvn clean integration-test \
-Dspark-distro-tgz=/tmp/spark-2.3.0-SNAPSHOT-bin-20171216-0c8fca4608.tgz \
-Dspark-dockerfiles-dir=.../spark/resource-managers/kubernetes/docker/src/main/dockerfiles
-Dspark-distro-tgz=spark/spark-2.3.0-SNAPSHOT-bin.tgz \
-Dspark-dockerfiles-dir=spark/resource-managers/kubernetes/docker/src/main/dockerfiles
"-DextraScalaTestArgs=-Dspark.docker.test.persistMinikube=true -Dspark.docker.test.skipBuildImages=true"
```